windows_paths.rst 1.78 KB

Add Anaconda paths to environment variables

Under Windows, before using pip, complete the PATH of environment variables. A quick way to open the dedicated window is Win+R (execute commands) and put:

rundll32.exe sysdm.cpl,EditEnvironmentVariables

Select PATH and click Modify. A list of paths appears. You must add 3 new paths (button New). Becareful, you must indicate the full path which depends on your Anaconda installation. During installation of Anaconda you choose:

  • Installation for all user: Paths start with C:\ProgramData
  • Installation for user xxx only: Paths start with C:\Users\xxx

Before the line %USERPROFILE%\AppData\Local\Microsoft\WindowsApps you have to add:

In case of installation for all users, add the three following paths:

  • C:\ProgramData\Anaconda3
  • C:\ProgramData\Anaconda3\Library\bin
  • C:\ProgramData\Anaconda3\Scripts.

In case of installation for only xxx user, add the three following paths:

  • C:\Users\xxx\Anaconda3
  • C:\Users\xxx\Anaconda3\Library\bin
  • C:\Users\xxx\Anaconda3\Scripts.

Then we are going to check that it the path is OK. Open a Powershell as administrator. A quick way to open Powershell as administrator is Win+R (execute commands) and put:

powershell Start-Process powershell -Verb runAs

Then, in the Powershell terminal:

python

You must see the symbol >>> indicating Python is launched. Type exit() to exit.

Now, you can use the short word python to launch python.exe located in one of the folders defined in the PATH of environment variables. This is important also to generate the documentation that uses pyreverse.exe and shpinx-build.exe.