Pythonanywhere install and import new module

吃可爱长大的小学妹 提交于 2019-12-22 06:57:25

问题


I'm new to Pythonanywhere and want to install the 'soundcloud' Python module. I've opened up a Bash console and given the pip install --user soundcloud command.

It appears to have installed, as I see it in the list of modules when I used pip freeze in the Bash console. 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.

Any ideas on why this is happening?


回答1:


You've installed soundcloud for 2.6, but you're trying to use it in 2.7.

From the 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)



来源:https://stackoverflow.com/questions/11461846/pythonanywhere-install-and-import-new-module

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!