2

I have installed Anaconda3 (2019) which comes with Python 3.7.

However, when I run from cmd python I am informed that I run Python 3.6.5:

(base) C:\WINDOWS\system32>python
Python 3.6.5 |Anaconda, Inc.| (default, Mar 29 2018, 13:32:41) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>

I have declared Anaconda3 in my Path variable:

enter image description here

The python.exe is contained in a directory that I can not declare in my Path:

enter image description here

enter image description here


The directories under Anaconda3 are the following:

enter image description here

There is no bins subdirectory here.

But there is a python.exe file:

enter image description here

I have declared its path in the Path variable:

enter image description here

halfer
  • 19,824
  • 17
  • 99
  • 186
user8270077
  • 4,621
  • 17
  • 75
  • 140

1 Answers1

1

For anaconda3, the path to python is: /anaconda3/bin/python instead of /anaconda3/pkgs/... (as you did). Try the former one.

Also, make sure that you restart your terminal after changing your PATH.

Note: you can always use which python in your terminal to check your python location.

Vyvyen Yue
  • 36
  • 5
  • `(base) C:\WINDOWS\system32>python Python 3.6.5 |Anaconda, Inc.|` indicates that you are already using anaconda python. Did you make sure that you installed the correct version of anaconda? – Vyvyen Yue Oct 13 '19 at 20:56
  • Please check this new post of mine: https://stackoverflow.com/questions/58367721/c-windows-system32conda-update-all-conda-is-not-recognized-as-an-internal-or – user8270077 Oct 13 '19 at 20:58
  • In addtion to `C:\Users\yourusername\Anaconda3`, try PATH `C:\Users\yourusername\Anaconda3\Scripts C:\Users\yourusername\Anaconda3\Library\bin`. Not sure if this helps... : ) – Vyvyen Yue Oct 13 '19 at 21:22
  • You were right in that there was an installation of Anaconda under Visual Studio which I was not aware of. Moreover, there was a python installation under Microsoft ML Server. These have been cleared and now when I start python from cmd it is python 3.7. However now I can not launch Jupyter Notebook and conda -- both are not recognized. – user8270077 Oct 13 '19 at 22:01
  • I added C:\Users\Alienware\Anaconda3\Scripts to my path. Now I am getting error messages when trying to launch jupyter notebook and run conda update all. – user8270077 Oct 13 '19 at 22:23
  • You can see at this related post: https://stackoverflow.com/questions/58368256/when-running-jupyter-notebook-command-error-message-importerror-dll-load-fail – user8270077 Oct 13 '19 at 22:32
  • Moreover, when I try the command: conda update all I get the error message: TypeError: LoadLibrary() argument 1 must be str, not None – user8270077 Oct 13 '19 at 22:33
  • 1) Did you try what I stated above: add PATH `C:\Users\yourusername\Anaconda3`, `C:\Users\yourusername\Anaconda3\Scripts` and `C:\Users\yourusername\Anaconda3\Library\bin`. 2) Or: conda activate `your_env` before jupyter notebook, To see all you conda envs, type `conda info --envs`. Further reference: https://github.com/jupyter/notebook/issues/4332 – Vyvyen Yue Oct 13 '19 at 23:16
  • The problems were resolved. Now I have a new problem. I can not run pip. I am geting the error message: WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available. Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping – user8270077 Oct 13 '19 at 23:28
  • I added the paths to the Path variable and activated the conda. Also installed Anaconda. But now I have a serious problem with pip. See: https://stackoverflow.com/questions/58368600/pip-install-does-not-work-pip-is-configured-with-locations-that-require-tls – user8270077 Oct 14 '19 at 00:00
  • would u kindly give me an upvote since we have discussed for a while : D. I am also looking into your issues. – Vyvyen Yue Oct 14 '19 at 00:03
  • Certainly Vyvyen, I just did it. Thank you very much for your time! – user8270077 Oct 14 '19 at 00:03
  • 1) try re-install/upgarde your pip. 2) did you activate conda env? e.g. `conda activate base`. 3) further related problems: https://stackoverflow.com/a/44758621/10243559 Good luck! – Vyvyen Yue Oct 14 '19 at 00:24
  • Yes it was resolved by conda activate base once more. – user8270077 Oct 14 '19 at 01:38