Guys are there anyone who got stuck with the establishment of a virtual environment on Windows. Here it is:
c:\>python -m venv c:\path\to\myenv
What I ended up with was this:
File “”, line 1 in Visual Studio
or
2.‘c:’ is not recognized as an internal or external command,
operable program or batch file. in command line
& D:/python.exe c:/Users/Admin/Desktop/kurro.py
^
SyntaxError: invalid syntax
Hi. I am IT Support L2 and newbie FCC student. Give me a screenshot so I can help you with precise instructions.
I found this official documentation in case of you missed it. https://docs.python.org/3/library/venv.html
the latest 3.8.2, although my notebook is 64 bit, I use 32 bit python, cause there is no new version for 64 bit notebook and python is installed into D: not C: disk in the notebook(( Maybe that is the reason dunno
–The same mistake, it did not help((
I am using VS Code and python 3.8 as well, probably you noticed when installing python you were asked to install it in AppData folder which is located in C drive. I suppose you have a small issue with the path to your file.
maybe,it is not the fist problem with the code I have, I couldn`t also open the file which I created on Notebook app in Visual studio, although I saved the file in py and in the same desk where my Python 3.8 is( Need to check it , thanks! I will reinstall Python, I suppose didn"t have such problems before((
I insist that you set wrong path. Anyway, this is the official vs code venv tutorial and docu. https://code.visualstudio.com/docs/python/environments
Be patient and redo everything following the official tuto.
In case you encounter an issue again, repost new request…
Best Regards
Otherwise, Jupiter notebook is a super and easy Python environment. Its very easy to use and to install. I am using it besides vs code.https://jupyter.org/install
And to be honest I never set venv but I am gonna do it for you, meanwhile, reinstall python in C drive, probably you will be asked to install it in App Data folder, follow those instructions. See you later. Happy to help
Almost sure this is the main issue, you are executing powershell or shell command with python extension, that’s why you got that error. I successfully reproduced the same error you got. Change execution environments from python to powershell. You tell me if its ok.
I change it into shell and as I tap run it simultaneously changes into Python automatically(
If I enter the command in the terminal itself it does this mistake^
c:\>python : The term 'c:\>python' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify
that the path is correct and try again.
At line:1 char:1
+ c:\>python -m venv c:\path\to\myenv
+ ~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (c:\>python:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException```
Look to my previous answer, simply open CMD command and type “pip install virtualenv” , on vs code is a bit complicated. Also do you have a folder named “to” ? coz i see it in your path. As i said, simply run the command i told you. Namaste.