0

I had this problem for several months now. I have multiple versions of python interpreters located in different folders inside my mac. I have pycharm and anaconda installed. This is so far not an issue as I know that this would enable the choice to configure the environment per project. The problem starts when I try to install a library then it accepts the downloads but library fail to run when imported in the code field. also, the version of the python are the same.

I think it is matter of $Path pointing to the right interpreter.

side problems:

  • brew does not work, pip does.
  • I don't know which packages of libraries installed in which interpreter.
  • I am confused with the use of conda vs pip vs brew. do I need all of them for package management or one is sufficient.
  • I would like to know the easiest way to check the $PATH and modifies to point to the right interpreter in the easiest way possible.

Thank you for your help .

enter image description here

1
  • Look into pyenv, its main purpose is managing different python versions. You can use which to figure out which executable you're using. For example which python3 or which pip3. Easiest way to check the $PATH is echoing it Commented Aug 7, 2022 at 10:05

1 Answer 1

0

how do you install the libraries? a possible reason could be ambiguity of pip versions and python interpreters.
first, upgrade the corresponding pip modules of every python interpreter.

python3.x -m pip install --upgrade pip

after doing so, install modules with

python3.x -m pip install $MODULE

instead of pip3 install $MODULE. this way you will use the corresponding module and not executable that might be relevant for single version.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.