0

I am using Visual Studio Code, and trying to set my python interpreter, then i come across this. The one in "opt/local/bin/python x.x", and the one in "/opt/miniconda3/bin/python" , How are they different? Thank you in advance. Are they basically the same? can i get rid of either one?

enter image description here

yts61
  • 1,142
  • 2
  • 20
  • 33

2 Answers2

1

You should be able to get rid of all of them except /usr/bin

The difference other than versions is how you've managed to install them and if you have any additional libraries from pip/conda

I suggest looking into using pyenv to more cleanly manage multiple python installations

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
1

For the doubts you describe, you could refer to the following points:

They are all Python environments.

  1. "What are these two environments."

    For "opt/local/bin/python3.7", it is the path of the python interpreter installed on your computer, which belongs to a 'global environment'.

    For "/opt/miniconda3/bin/python", it is the path of the python interpreter that comes with miniconda3 you installed, and it belongs to 'base conda environments'.

  2. "The difference between them."

    When used as an environment, they are different interpreters. They come from different sources, so pip sources in different environments are different, so we need to pay attention to the current environment when using pip to install modules.

  3. "How to deal with them."

    You could find the 'path' in the user variable of the environment variable of the computer, and these python interpreters are displayed here.You can remove unnecessary ones here.

Reference: Python environments in VS Code.

Jill Cheng
  • 9,179
  • 1
  • 20
  • 25
  • thank you , and what about the opt/local/bin/python x.x? and the the path with "~" in the front? – yts61 Aug 21 '20 at 04:49
  • @yts61 I updated the content of the reply. This '~' is the omission of part of the path. It emphasizes the source of python. It is a display method and will not affect the use of the environment. – Jill Cheng Aug 21 '20 at 05:07