[英]Installing pip to import modules
I am attempting to install matplotlib and scipy to python, and using pip to do so. 我试图安装matplotlib和scipy到python,并使用pip这样做。 However when I attempted to install scipy with pip install scipy --myuser
I received the message: 但是,当我尝试使用pip install scipy --myuser
我收到了以下消息:
invalid requirement '--myuser' 无效要求' - myuser'
Previously I had installed numpy using pip with 以前我用pip安装了numpy
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. 这是令人沮丧的,因为我想从终端而不是从我的Windows桌面使用python。
If you want to install to user try the below mentioned command: 如果要安装到用户,请尝试以下提到的命令:
pip install --user scipy
Here is the help from pip command: 这是pip命令的帮助:
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. 您应该能够在不使用--myuser参数的情况下安装它。
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
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.