繁体   English   中英

在 Mac OSX Catalina 上运行 Python 3+ 时出现问题

[英]Trouble running Python 3+ on Mac OSX Catalina

我正在尝试使用 VSCode 在我的本地计算机上执行 python 代码。 当我尝试导入 numpy、pandas 等时,我收到“无法导入 'numpy' pylint(导入错误)”。

当我查看“python --version”时,我收到 Python 2.7.16。

Have read a few threads that have included uninstalling Python extension, changing the settings.json files to the path of the python 3.8 and changing the bash_profile to export PythonPath, however when I run the code, the errors return and the version returns to Python 2.7 .16.

关于我错过了什么的任何想法?

首先尝试从控制台运行,而不是使用

python yourscript.py

运行 python 2,运行

python3 yourscript.py

希望这可以帮助!

暂无
暂无

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM