I have problem with create virtual environment in PyCharm. Exactly, Python in version 3.10 was add to Path during installation and I use latest version PyCharm community.
Did anyone have a similar problem?
How I create environment :
file -> New project
Location : D:\mm\projekty\pythonProject2
marked New virtual environment using ( virtualenv)
Location : D:\mm\projekty\pythonProject2\venv
Base interpreter : C:\Users\mm\AppData\Local\Programs\Python\Python310\python.exe
C:\Users\mm>python Python 3.10.0 (tags/v3.10.0:b494f59, Oct 4 2021, 19:00:18) [MSC v.1929 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information.
If you have
python3-env already installed, the commands provided in most of the answers will not work as you need the python3-venv package specifically for Python 3.10
The exact package as pointed by @fabel in comments is
sudo apt install python3.10-venv
Run this command and it should be good to go.
if you don't have pip before install pip
sudo apt install python3-pip
press Ctrl + Alt + S
then click settings button and select show all
press Alt + Insert keys then
Select Virtualenv Environment and check Inherit global site-packages
I ran "pip install virtualenv" in the terminal, but after trying again it didn't work. I downloaded python 3.10 from python.org then because i had problems updating my python version from 3.9 to 3.10 on my computer, i decided to try to make a virtual environment in PyCharm, in my main project (my only one) I clicked "Add Interpreter..." then selected "Virtualenv environment" then set the location to "/home/myname/Documents/PyCharm/venvPy3.10" and then i set base interpreter to the one i downloaded by clicking on the three dots on the right of it then going to my downloads folder. I also selected both "Inherit global site-packages" and "Make available to all project" then clicked "OK". Then it gives me warning.
There is a bug in Windows
venv, which is known to be exposed if you install a VisualStudio 2022 runtime.
If PyCharm uses See if my issue/workaround in this Q&A aligns with yours.
venv and not another virtual environment (not sure as I don't use PyCharm) s
Edit: I realize that you are using
virtualenv instead. However,
venv.EnvBuilder so the issue could still be related.