PythonAnywhere Forums

Pythonanywhere pip install and import new module in Python Console

Just posted this over at Stackoverflow, but I realized I might get a faster answer here.

I'm new to Pythonanywhere and want to install the 'soundcloud' Python module. I've opened up a Bash console and given the following 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?

Just for reference, here's the StackOverflow question. Thanks go to abarnert for the great answer.

Hmm. 2012 post. No answers yet.

I was just wondering about pip as well.

Tried to "import gglpot" into 2.7.. That it did not work was not a big surprise. But the next question, naturally, is "how to install it?"

As the original post specifies:

pip install --user ggplot

Thanks. After that I had to --user --update six. Unfortunately, to see a plot, there needs to be some mechanism to display it.

Is it possible to pop out a window with the plot?

from ggplot import * p = ggplot(aes(x='date', y='beef'), data=meat) p should display a grid. Instead all we get is the address of p

Something like: <ggplot: (4407389)>

We don't have a screen to display plot on, but you can save them to a file and then view the file in your browser.

I want to import pyfcm to my Flask python 2.7 site but when i run it dont find the directory (the pip install worked)

what is the exact error you are seeing?

Please update your help page to say that you must use the exact same version of pip as python, if you use pip3 it often will not work if you then run python3.4 or something. pipX only works with pythonX and pipX.Y onlly works with pythonX.Y. This is not the way I expected it to work.

Joshua

Please update your help page to say that you must use the exact same version of pip as python, if you use pip3 it often will not work if you then run python3.4 or something. pipX only works with pythonX and pipX.Y onlly works with pythonX.Y. This is not the way I expected it to work.

Joshua

Thanks for the suggestion. I've made a few changes to the page we have on installing new modules, hopefully it's a bit clearer now.

how to import the package(Tkinter) in pythonanywhere

Tkinter is a graphics library, and probably not what you want for PA. I suggest you search on 'tkinter' in this forum, e.g. this example post