指向我的Pycharm和CLI中的不同Python

2024-09-17 19:44:02 发布

您现在位置:Python中文网/ 问答频道 /正文

我遇到了一个错误,PyCharm指向一个python,而我的配置设置为另一个python

我得到的错误是:

ERROR: Could not find a version that matches python

当我在cli中键入“which python”(在项目目录的Pycharm中)时,我得到: /Library/Frameworks/Python.framework/Versions/3.7/bin/gunteh/bin/Python

看看Pycharm中的场景,我得到: ~/.local/share/virtualenvs/gunteh/bin/python3.7

我如何让Pycharm指向同一个Python根目录,并避免下面这样的问题,迫使我重新安装Pipfile并锁定依赖项

Invalid error on Python Interpreter