Update:
The preferences in Settings (Preferences) | Tools | Terminal are global.
If you use a venv for each project, remember to use current path variable and a default venv name:
"cmd.exe" /k ""%CD%\venv\Scripts\activate""
For Windows users: when using PyCharm with a virtual environment, you can use the /K
parameter to cmd.exe
to set the virtual environment automatically.
PyCharm 3 or 4: Settings
, Terminal
, Default shell
and add /K <path-to-your-activate.bat>
.
PyCharm 5: Settings
, Tools
, Terminal
, and add /K <path-to-your-activate.bat>
to Shell path
.
PyCharm 2016.1 or 2016.2: Settings
, Tools
, Terminal
, and add ""/K <path-to-your-activate.bat>""
to Shell path
and add (mind the quotes). Also add quotes around cmd.exe, resulting in:
"cmd.exe" /k ""C:\mypath\my-venv\Scripts\activate.bat""