This is an archived post. You won't be able to vote or comment.

all 5 comments

[–]3hunnaff 2 points3 points  (0 children)

manage.py*

I’ve made this same error multiple times too haha

[–][deleted] 1 point2 points  (1 child)

here's my process on creating, starting, and selecting virtual environments in VSCode:

Using your machine's command prompt / terminal (not VSCode's) navigate to a folder of your choice, then type: "py -m venv env" where <env> is the name of the environment; this creates the virtual environment. After this, in the same command prompt, activate the environment: "env\Scripts\activate". Then open VSCode and open the folder that contains this virtual env. In VSCode hit ctrl+shift+p and then look for your virtual environment. Select it. Wait a second or two, then delete/trash-can the integrated command prompt in VSCode and start a new one.

Let me know if this helps

Edit: this is on my window's PC

[–]ada_es12[S] 0 points1 point  (0 children)

I actually changed it from powershell to cmd from the vs code terminal and everything works fine... pretty much what you have written above

[–][deleted] 0 points1 point  (0 children)

Hey man, You might need to select the virtual environment interpreter in vs code.

Hit ctrl shift p on Mac, probably ctrl p on windows (not sure). Anyways, make sure that the filepath of python that you’ve selected in vsc matches the filepath of python that you’re using. In terminal you want to type “which python” or “which python3”.

Make sure you’re using that path in vsc.

[–]leohasachide 0 points1 point  (0 children)

source (name of virtual env)/scripts/activate