简体   繁体   中英

Installing pip to import modules

I am attempting to install matplotlib and scipy to python, and using pip to do so. However when I attempted to install scipy with pip install scipy --myuser I received the message:

invalid requirement '--myuser'

Previously I had installed numpy using pip with

python get-pip.py —myuser

and

pip install numpy —myuser

This worked fine, so I am unsure what the problem is here.

This is frustrating as I would like to use python from the terminal rather than from my Windows desktop.

If you want to install to user try the below mentioned command:

pip install --user scipy

Here is the help from pip command:

pip install --help

  --user                      Install to the Python user install directory for
                              your platform. Typically ~/.local/, or
                              %APPDATA%\Python on Windows. (See the Python
                              documentation for site.USER_BASE for full
                              details.)

You should be able to install it without the use of the --myuser argument.

sudo python3 -m pip install scipy
sudo python3 -m pip install matplotlib

or all in one

sudo python3 -m pip install scipy matplotlib

试试这个:

sudo python3 -m pip install scipy matplotlib

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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