Hi there, I’m at video 6 of section 2 of Django part 1 (Using the Integrated Terminal in VSCode).
After I entered the interpreter path, no .vscode directory didn’t show, nor did settings.json. Can anyone tell me what went wrong?
We share the same issue. Did you ever find a solution? I noticed it’s about a month old so maybe you did.
I found a solution that worked for me. I’m assuming you’re using windows. I manually created the .vscode folder. Then the settings.json file. Manually typed in the python.pythonPath.: Pathway to my virtual server.
Then went to the vs code terminal and started the pipenv shell , then finally the python manage.py runserver … which started the development server and I could access it via the browser. Hope that helps.
I found a solution. Look here:
Using Vscode …in an active virtual environment(using the command —py -m venv venv or py -m venv activated)aside “py” : python or python3 can be used… ensure the latest version of pip is install and also install django …run the command (django-admin startproject projectname)…this creates a folder containing the settings.py file amongst others.
Also search for vscode doc with django.
Did anyone find a solution. I tried the two mentioned but nothing came of it. I tried opting out of the python experiment, and I tried the second one. Nothing happiness. I created my own vscode folder and then a json file in it but I get an error message. Any solutions would be great.
solved the issue. I took the the idea from another post. I went to “Preferences open settins .(JSON)” I then typed in ““python.experiments.enabled”: false,” on the first line and I was avle to get the vs.Code file.
I’m running into this issue as well and can’t seem to do anything about it. In vscode, I’ve gone to file → preferences → settings → [JSON]. this opens a “settings.json” file (shown as “C: > … > python.defaultinterpreterPath” at the top) with:
{
"security.workspace.trust.untrustedFiles": "open",
"python.defaultInterpreterPath": "C:\\path\\python.exe"
}
I’ve seen that I need to add ““python.experiments.enabled”: false” inside the curly brackets, which I did (with a comma after the preceding line of code so it’s a correctly-formatted list). I then saved this and it didn’t do anything.
I’m not sure what else to do besides creating a “.vscode” folder under the top “storefront” directory and a “settings.json” file within that, so it matches Mosh’s code. Any advice would be appreciated. Thanks!
I should also add that the {
“python.pythonPath”: “C:\path.virtualenvs\storefront-qyXmRXBf\Scripts\python.exe”
}
shows an error as “code language not supported or defined” despite the “python.pythonPath” being auto-filled.
Did you ever figure this out I am running into th same issue
It seems they’ve deprecated specifying the Python path in settings.json: Setting descriptions · microsoft/vscode-python Wiki · GitHub
If you run your project, you should see the right Python Interpreter path at the bottom of the terminal screen.
If you want to add the .vscode directory, so your project looks like in the videos:
- Click the Settings symbol in the lower left corner of VS
- Click “workspace settings”
- Change some value, e.g. the font size.
This will create the .vscode directory in your project, and add the workspace specific setting (font size) to the newly created settings.json file.
Hope this helps.