Pycharm Terminal fails to activate virtual env Follow
When I click Terminal, it does not activate the virtualenv environment.
How to recreate:
- I create a new project, selecting the option to create a new environment using Virtualenv.
- Once the project is created, I check the settings and the Project Interpreter is set to use it, the Python Console uses it, if I add packages, they are installed in the venv directory as expected, and the Tools/Terminal settings page has the 'Activate virtualenv' option selected
- I click the Terminal button at the bottom of the screen, and the terminal is started but the virtualenv environment is not activated.
I would be grateful for some help.
Please sign in to leave a comment.
That's might be the issue with the PowerShell Execution Policy
Follow the steps here https://www.stanleyulili.com/powershell/solution-to-running-scripts-is-disabled-on-this-system-error-on-powershell/
this solved my problem
To display a label about the virtual environment, use standard PowerShell.
Restarted PyCharm - fixed
Sorry, but it's not serious! I am using a licensed version of Pycharm Professional, but I cannot activate the virtual environment. Why, instead of using Pycharm Professional, should I look for a solution to the problem in the work of Pycharm Professional? Is it really impossible to solve this issue once and for all! Even when I create a virtual environment by Pycharm, it is not activated! What do you say to that?
Please open a support request with Help | Contact Support or fill out a bug report on YouTrack.
Why the heck is the so complicated? I am having the exact same problem. Under Visual Studio Code it JUST WORKS! Under PyCharm and other JetBrains products, there is always some weird quirk or hoop we have to jump through. "activate.ps1 cannot be loaded because running scripts is disabled on this system." No it is not. I even temporarily set it to Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope CurrentUser; but it still gives the same error.
Same problem. Restarted PyCharm - fixed. The IDE should tell us that, we must restart. It's always so complicated with JetBrains products. This is why Visual Studio Code is eating JetBrains lunch.