![]() However, this will completely replace your Windows Python installation PATH (if you had one before Anaconda) with Anaconda’s default Python. There is an alternative to adding the Python directory: you could just add the conda.exe directory to the PATH variable, open a new Powershell session, and type conda init. Or you could do a conda activate SOME_OTHER_ENV to switch. However, you can always change the PATH values to change your default Python executable. Essentially, this only lets you work on one environment at a time by default. You probably noticed that we’re only adding the Python directory for a specific environment. Note On Adding Conda & Python To Environment Variables Simply the directory (without the python.exebit) and put it in your PATH. Unsurprisingly, the above will give you the directory and path to my_env‘s python.exe. For example, run the following from Anaconda Powershell. In other words, we don’t add the conda.exe bit!įurthermore, to add the Python directory, you need to activate the environment you want, then find out the Python directory. You should add Some-Path-To\miniconda3\Scripts to the PATH. This will result in something like Some-Path-To\miniconda3\Scripts\conda.exe. To get the conda directory, open the Anaconda Powershell, then type the following. To use the Anaconda-managed Python, you will need to add your environment’s Python directory as well.For the Anaconda tools, you need to add the conda executable.If you would like to use the conda tool in Window’s command-line (cmd) or Powershell, you need to add a couple of directories to your environment PATH variable: Adding To Conda And Python To The Environment PATH Variable Figure 2: Finding the Anaconda command-line tools in Windows.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |