Forums

How can I install python modules ??

I want to make my python code work by uploading it to Files.

However, the 'module' of the file I uploaded is not installed, so it cannot work.

The 'module' I want to use is 'import telegram'.

In case you ever wanted, I made a Python 3.8 console in the console and tried pip install, but this also did not install.

What should I do?

I tried entering the command as shown on the page below.

https://help.pythonanywhere.com/pages/InstallingNewModules

I created a Python 3.8 console in the console and ran all of the commands below and got the following result. When I ran the code from Files, I got the same result from the console at the bottom of the page.

pip install --user telegram   File "<stdin>", line 1     pip install --user telegram         ^ SyntaxError: invalid syntax

======

pip3.6 install --user telegram   File "<stdin>", line 1     pip3.6 install --user telegram         ^ SyntaxError: invalid syntax

You're trying to run Bash commands in a Python console. Use a Bash console to run your installs in.

Where is the bash console?

You can start a Bash console either from your Dashboard or from the Consoles page.

I have install module in .local lib package successfully, however, the web keeps running error saying that there is no module name ''**''. I do not know what happened to my installation. Any advice, would appreciate so much, thanks.

Did you install the module for the same Python version that your web app is running? See also: https://help.pythonanywhere.com/pages/InstallingNewModules/.

yes, I did what the help page said.

What was the exact command that you ran?