我试图安装matplotlib和scipy到python,并使用pip这样做。但是,当我尝试使用pip install scipy --myuser
安装scipy时,我收到了以下消息:
无效要求' - myuser'
以前我用pip安装了numpy
python get-pip.py —myuser
和
pip install numpy —myuser
这很好,所以我不确定这里的问题是什么。
这是令人沮丧的,因为我想从终端而不是从我的Windows桌面使用python。
您应该能够在不使用--myuser参数的情况下安装它。
sudo python3 -m pip install scipy
sudo python3 -m pip install matplotlib
或者一体化
sudo python3 -m pip install scipy matplotlib
如果要安装到用户,请尝试以下提到的命令:
pip install --user scipy
这是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.)
试试这个:
sudo python3 -m pip install scipy matplotlib