【发布时间】:2019-08-06 03:01:54
【问题描述】:
我的 PATH 有问题,似乎无法在任何地方找到答案。
我在我的 Mac 上使用 virtualenv,当我调用 which pip 时,它确认了这一点 - 但是当我 pip install 任何东西时,它会将它转储到我的“usr/local”路径中。
我在我的 .bash_profile 中添加了 export PATH=/usr/local/bin:$PATH 以确保用户安装的二进制文件优先,但我在我的 VSCode settings.json 中添加了 {
"python.pythonPath": "/Virtualenvs/py3/bin/python3.7"
} 以确保从那里正确的路径。
更具体地说,调用which pip 返回:
/Users/username/Virtualenvs/py3/bin/pip
但是pip install telegramreturns:
Requirement already satisfied: telegram in /usr/local/lib/python3.7/site-packages (0.0.1)
关于为什么会发生这种情况的任何想法?
【问题讨论】:
标签: python-3.x path visual-studio-code pip