在虚拟环境中错误安装matplotlib

时间:2019-11-01 15:23:14

标签: python matplotlib virtualenv zsh

尝试在虚拟环境中安装matplotlib。运行pip install matplotlib时出现以下错误:

zsh: /Users/username/Desktop/tensorflow_tutorials/.venv/bin/pip: bad interpreter:
/Users/username/Desktop/tensorflow/.venv/bin/python3: no such file or directory

tensorflow_tutorials是我在其中创建虚拟环境的目录。

我尝试了pip3 install matplotlib并收到以下消息:

zsh: /Users/username/Desktop/tensorflow_tutorials/.venv/bin/pip3: bad interpreter: /Users/username/Desktop/tensorflow/.venv/bin/python3: no such file or directory
Requirement already satisfied: matplotlib in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (3.1.1)
Requirement already satisfied: numpy>=1.11 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from matplotlib) (1.17.3)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from matplotlib) (2.4.2)
Requirement already satisfied: kiwisolver>=1.0.1 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from matplotlib) (1.1.0)
Requirement already satisfied: python-dateutil>=2.1 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from matplotlib) (2.8.0)
Requirement already satisfied: cycler>=0.10 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from matplotlib) (0.10.0)
Requirement already satisfied: setuptools in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from kiwisolver>=1.0.1->matplotlib) (40.8.0)
Requirement already satisfied: six>=1.5 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from python-dateutil>=2.1->matplotlib) (1.12.0)

我尝试在source ./.venv/bin/activate之前运行pip install,但也无法正常工作。

0 个答案:

没有答案