简体   繁体   English

我的 Mac 上有两个 python 3 版本。 如何使用新版本和/删除旧版本?

[英]I have two python 3 versions on my Mac. How do I use the new version and/remove the old one?

I have Python 3.6.5 and Python 3.7.4 installed.我安装了 Python 3.6.5 和 Python 3.7.4。

python --version

gives me 3.6, while给我 3.6,而

python3 --version

gives me 3.7.给我 3.7。 Running code in PyCharm indicates that it is still using 3.6.在 PyCharm 中运行代码表明它仍在使用 3.6。 How do I update it to start using 3.7, and/or remove 3.6?如何更新它以开始使用 3.7,和/或删除 3.6?

I've looked around SO and other forums, but so far nothing seemed to be relevant to this specific issue.我环顾了 SO 和其他论坛,但到目前为止,似乎没有与此特定问题相关的内容。

If you want to keep your other python versions and want PyCharm to run your code in the 3.7 version you can simply go into your PyCharm preference and set the project interpreter to 3.7.如果您想保留其他 Python 版本并希望 PyCharm 在 3.7 版本中运行您的代码,您只需进入 PyCharm 首选项并将项目解释器设置为 3.7。

Here is a stack overflow question showing you how这是一个堆栈溢出问题,向您展示如何

If you don't see the python interpreter there you can add it manually before setting it in the preferences.如果您在那里没有看到 python 解释器,您可以在首选项中设置它之前手动添加它。 Here is a doc page that might help这是一个可能有帮助文档页面

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 我在Mac上安装了python 2.7和3.6。 如何找到与Python3相关的pip版本? - I have python 2.7 and 3.6 installed on my mac. How to find the version of pip associated with Python3? 我是否必须卸载旧的 python 版本才能在 Windows 上更新到新版本? - Do I have to uninstall old python versions to update to a new one on Windows? 如何更新我的 Mac 以使用最新版本的 Python? - How do I update my Mac to use the latest version of Python? 我为Mac下载了Python,看来我有两个版本的Python? - I downloaded Python for Mac and it seems that I have two versions of Python? python想要一个旧版本的库,我没有,但我有一个新版本 - python wants an old version of the library, which I don't have, but I have a new one 我安装了 2 个版本的 python,但 cmake 使用的是旧版本。 如何强制 cmake 使用较新版本? - I have 2 versions of python installed, but cmake is using older version. How do I force cmake to use the newer version? 如何在Mac OS上更新Python并让RubyGems使用新版本? - How can I update Python on Mac OS and have RubyGems use the new version? 如何告诉我的 Mac 使用安装在我的计算机上的最新版本的 Python? - How do I tell my Mac to use the latest version of Python installed on my computer? 我的计算机上安装了两个版本的python,但一个没有响应 - I have two version of python installed on my computer but one is not responding 当我在Mac上安装python 3.5时,终端会运行python 2.7。 - terminal runs python 2.7 when I have python 3.5 installed on mac.
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM