2

I have Python 2.7 installed and I have Anaconda (using Python 3.6) installed on Windows. Whenever I try to run my .py scripts from Windows outside of the Anaconda environment Windows defaults to using the Python 2.7 interpreter. My Scripts fail to import modules (i'm assuming this is using the wrong interpreter).

I have tried changing the path variable as per this post How should I set the default Python version in Windows and this post Changing python interpreter windows. I have also tried changing the default .exe from the 2.7 version to the Python.exe in Anaconda directly from the command line.

Is there anything I need to consider that Anacondas version is in "C:\Users\william\AppData\Local\Continuum\anaconda3\python.exe"? All other posts refer to Python.exe as being in something like "C://python27/". I am expecting to be able to set the default interpreter to use from the above location and set this to be the default for .py files.

Current Python Version:

enter image description here

Assuming this is from:

enter image description here

I am assuming I want to use this version:

enter image description here

I have tried adding the below to the user and system path variables:

enter image description here

WillD
  • 131
  • 1
  • 10
  • Any assistance on this? I am sure others must use Anaconda and have come across this. – WillD Jan 07 '19 at 17:30
  • Uninstalling all Python versions and re-installing with only the latest required version fixed my issue as per this post: https://stackoverflow.com/questions/5087831/how-should-i-set-the-default-python-version-in-windows?noredirect=1&lq=1 – WillD Jan 16 '19 at 11:30
  • Link to answer that answered my question: https://stackoverflow.com/a/34867186/5183415 – WillD Jan 24 '19 at 15:35

0 Answers0