简体   繁体   English

Pythonanywhere安装并导入新模块

[英]Pythonanywhere install and import new module

I'm new to Pythonanywhere and want to install the 'soundcloud' Python module. 我是Pythonanywhere的新手,想要安装'soundcloud'Python模块。 I've opened up a Bash console and given the pip install --user soundcloud command. 我打开了一个Bash控制台并给出了pip install --user soundcloud命令。

It appears to have installed, as I see it in the list of modules when I used pip freeze in the Bash console. 它似乎已安装,正如我在模块列表中看到的那样,当我在Bash控制台中使用pip freeze时。 However, when I open up a Python 2.7 console and try import soundcloud , I get an error message saying that the Soundcloud module does not exist. 但是,当我打开Python 2.7控制台并尝试import soundcloud ,我收到一条错误消息,指出Soundcloud模块不存在。

Any ideas on why this is happening? 有关为什么会发生这种情况的任何想法?

You've installed soundcloud for 2.6, but you're trying to use it in 2.7. 你已经安装了2.6的soundcloud,但你试图在2.7中使用它。

From the FAQ : 来自FAQ

We've included both easy_install and pip for Python versions 2.6, 2.7 and 3.2 (the default is 2.6, add -2.7 or -3.2 at the end to specify the others) 我们为Python版本2.6,2.7和3.2包含了easy_install和pip(默认值为2.6,最后添加-2.7或-3.2以指定其他版本)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM