在 pip3 下安装了一个包,但在 Python3 下找不到。为什么?
所有这些都发生在我的 anaconda 基础环境中:
因此,我一直在为 tensorflow 及其版本苦苦挣扎(即将发布另一篇文章)。结果发现 2.1 版仅在 pip 上可用,而 conda install 则不可用。所以升级后pip3 install --upgrade pip
我安装pip3 install tensorflow==2.1.0
. 之后我打开 Jupyer-Notebook,结果发现 tensorflow 没有安装(运行 Python3)。我首先从终端检查版本,然后卸载 tensorflow。它没有安装在 pip 下(如预期的那样),但它确实安装在 pip3 下。通过 pip3 卸载时,我也收到此消息:
" pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
"
这可能是相关的。我的印象是 pip 为默认的 python 安装包(在我的例子中是 3.7.4),但 pip3 只为 Python3 安装它们。我错过了什么?
谢谢!
潇潇雨雨
相关分类