3

I installed python 3.5, and then I installed anaconda package containing python 3.5. I think python 3.5 is now installed twice at different path. Is there something I need to do in this case? Or should I uninstall one of them?

enter image description here

5
  • 3
    Check your PATH system variable to see which one is used Commented May 3, 2016 at 2:45
  • thanks @cricket_007 - could two of them both be in PATH can cause some trouble? Commented May 3, 2016 at 2:46
  • Whichever is the right-most executable is the one that is used Commented May 3, 2016 at 2:47
  • oh i see. thanks a lot @cricket_007 Commented May 3, 2016 at 2:57
  • It depends, running a script directly or double clicking on it in Explorer has nothing to do with PATH. It's based on the association of .py files, which should be set up to use the py.exe launcher. Running python.exe at the command line depends on PATH, and there you need to look the system vs user value in the environment variable editor. The user value gets appended to the system value, so the system PATH takes precedence because it's searched from left to right. Commented May 3, 2016 at 5:30

2 Answers 2

1

It is OK to have both Python 3.5 on your Computer, but it is better to delete one of them to avoid confusion in the future.

If you still insist on having two same Python, please check at first your environment path whether it is the right Version for you. If you use some IDEs like eclipse or pycharm, you can easily choose the right python interpreter in property.

If you want to keep two seperate Python,you can easily use Python virtue environments http://docs.python-guide.org/en/latest/dev/virtualenvs/

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

Comments

1

It is fine to have both of them as long as you knew what version is invoked when you run your scripts. As stated by others, check your PATH system variable.

In the past I also had Python 2.7 and Python 3.5 installed together. What I did was I renamed my python.exe file in my Python 3.5 installation into python3.exe. This way, when I type "python3" in the command line, it would invoke the Python 3.5 version, and Python 2.7 if only "python" is entered.

Example for your case:

C:\Python35\python.exe ---> C:\Python35\python.exe (retain name)
C:\Anaconda3\python.exe ---> C:\Anaconda3\python_anaconda.exe (rename)

So that command line execution will be,

C:\Users\Hello>python helloworld.py ---> uses the version in C:\Python35
C:\Users\Hello>python_anaconda helloworld.py ---> uses the version in C:\Anaconda3

Depending on your IDE, they can also do this for you conveniently.

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.