简体   繁体   中英

Python 3.7.3 Path and VS Code conflict

Last week I installed Anaconda but I continue to have problems using that environment in VS Code on Mac OS Mojave. For 2 weekends now I've struggled and struggled to try and figure out this path conflict myself but have not been able to get the interactive terminal in VS Code to match a terminal launched from the Anaconda Navigator. There seems to be ample materials online about how to run an Anaconda ENV in VS Code but after working through the possible solutions I can't figure out the root conflict and so it persists.

VS Code seems to indicate (bottom left status bar) that the correct 3.7.3 Conda environment is active in VS Code but $python --version returns 3.7.2 when tried. VS Code setting "python.pythonPath" for the workspace is pointing at the correct 3.7.3 python.exe location so I can only assume the conflict is with my PATH setting? Do I have to move the /Anaconda/bin to the front?

I really enjoy scripting with VS Code and would really like to get it up and working again with some of the tools from Anaconda.

在此处输入图片说明

Looks like you have both Mac python (from python.org) + anaconda, and the version from python.org is first in the PATH (the /Library/Frameworks/Python.framework stuff). You can move the python.org version later in the PATH, or even remove it altogether if you'd like.

If you decide to remove the other python, be sure you don't accidentally remove the MacOS system python (in /System/Library/Frameworks ) or you will have to reinstall MacOS.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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