Get the Anaconda prompt running in the PyCharm terminal
Solution 1
You can change pycharm settings to achieve this.
In Settings > Tools > Terminal, change the Shell path
as following:
cmd.exe "/K" "C:\Users\me\Miniconda3\Scripts\activate.bat" "C:\Users\me\Miniconda3"
And the C:\Users\me\Miniconda3
can be replaced by either one of your conda environment name such as base
Close the Terminal and reopen it, you will get the Anaconda prompt.
It works in my PyCharm Community Edition 2018.1.2
Solution 2
For window user, first of all check the location of your anaconda environment
you could type conda env list
to show
For my case, the env I want to have my anaconda prompt is located at C:\Users\YOURUSERNAME\Anaconda3\
(which is the root env, the very first you get)
And then go to pycharm, go settings, go Tools, Inside Shell path enter
cmd.exe "/K" C:\Users\YOURUSERNAME\Anaconda3\Scripts\activate.bat C:\Users\YOURUSERNAME\Anaconda3
Solution 3
The shell path may differ, you can check from the properties of shortcut of 'Anaconda Prompt': rightClick on the icon of 'Anaconda Prompt' >> properties >> shortcut >> Target
![Nicholas](https://lh3.googleusercontent.com/-LIVFoLqn-1s/AAAAAAAAAAI/AAAAAAAAAOk/qy8sEkrvsPw/photo.jpg?sz=256)
Comments
-
Nicholas about 2 years
I have Miniconda3 installed at C:\Users\me\Miniconda3, and my 'Project Interpreter' within PyCharm set to my conda environment, and that is all working correctly. However it appears that conda is not set for my path variable as if I type
conda
into the PyCharm Terminal I get'conda' is not recognized as an internal or external command, operable program or batch file.
Is there a way to set the PyCharm Terminal to behave like the Anaconda Prompt?
I have Windows 10, PyCharm 2018.1 EAP, and conda 4.4.10 installed.
-
GeorgeOfTheRF almost 6 yearsHow to do the same thing linux/ubuntu?
-
stats-hb over 5 yearsis there a way to set the environment of the current interpreter as the starting environment (say instead of
base
)? -
dd. over 5 yearsthere isn't as far as I konw. @stats-hb
-
dd. over 5 years@ML_Pro you may have to modify the rc file or specify a new one on linux, get more infomation here
-
Bibonaut over 4 yearsAnyone knows how to use Anaconda Powershell Prompt within PyCharm? I've simply copy&pasted the command from the Anconda Powershell shortcut found under 'target'. It is working with Windows/Run but in PyCharm I get
Cannot open Local Terminal Failed to start [C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe --ExecutionPolicy ByPass --NoExit --Command (...COMMAND...)]
-
taper almost 3 yearsIf the Windows Terminal integration has been installed with conda, the appropriate command using PowerShell instead of cmd looks like this:
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy ByPass -NoExit -Command "& 'C:\Users\USERNAME\miniconda3\shell\condabin\conda-hook.ps1' ; conda activate 'C:\Users\USERNAME\miniconda3' "