pip正在安装到Python 3.7,但我只能访问Python 3.5

问题描述 投票:0回答:2

我安装了Python 3.5.7和Python 3.7的某些版本。 Python 3.7肯定是通过自制软件安装的,但我可能已经手动安装了Python 3.5。 pip3正在将软件包安装到Python 3.7的文件夹中,我想使用Python 3.7,但我不知道如何使用。命令python3使用Python 3.5,似乎没有Python 3.7的文件。

usern$ which python3 
/usr/local/bin/python3
usern$ python3
Python 3.5.7 (default, Apr 18 2019, 12:58:07) 
[GCC 4.2.1 Compatible Apple LLVM 10.0.1 (clang-1001.0.46.4)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
exit()
usern$ python3 --version
Python 3.5.7
usern$ pip3 --version
pip 19.0.3 from /usr/local/lib/python3.7/site-packages/pip (python 3.7)
usern$ /usr/local/lib/python3.7
-bash: /usr/local/lib/python3.7: is a directory
usern$ /usr/local/bin/python3.7
-bash: /usr/local/bin/python3.7: No such file or directory
usern$ python3.7
-bash: python3.7: command not found
python python-3.x macos pip
2个回答
0
投票

我其实刚刚用过

brew link --overwrite python

这非常有效。我的Python 3.5文件夹已被删除,但一切都按照Python 3.7的要求工作。


-1
投票
  1. 你在finder中去'go'然后按Alt /选项
  2. 然后单击库文件夹并将其打开
  3. 你会在其中找到一个python文件夹
  4. 删除它并再次从网站安装python最新版本
  5. 在此之后你的版本将会改变
© www.soinside.com 2019 - 2024. All rights reserved.