Python update in Django

I’m trying to update python version 3.12 to 3.13 in my django project. I have already updated my win 11 & path to 3.13. All good there.

Below is a sample django project file structure with in VSC.

You can see the .testVE virtual environment when I created the project.

From what I understand is that you make sure your VE is deactivated and your inside the project directory where manage.py is located and create a new VE.

i.e.:

\test.testVE\test_proj> py -3.13 -m venv .testVE2

when I do this it creates the new VE (.testVE2) inside the test_proj directory and not where the original one is located. See image

No errors occur and all works ok. Matter of fact after I activate and pip install -r requirements.txt and do a py manage.py check and a runserver after that it all works ok.

So I also tried this
py -3.13 -m venv C:\Users\jbhrf\Desktop\Python Projects\test.testVE2
and it went thru the process without error but nothing happened, not even a new .testVE2 was created. Nothing. See image.

Hmmm. I imagine if this was a larger more crazy django project I have it would not.

What am I doing wrong?

I always realize how newbie I am when I get thrown back to something like this.

The most direct answer to this is that you’ve got your project inside your virtual environment directory.

You should either have your project and virtual environments in completely separate directories, or, have the virtual environment inside your project. (I’m a fan of the former, but I acknowledge that many people are fans of the latter.) I am not aware of anyone recommending that your project be placed within the virtual environment itself.

I also recommend you read the threads at:

They’re not directly aimed at the question you’re asking here, but they may help give you some perspective on the relationship and interactions between Django and a Python virtual environment.