#๐ Error when creating an environment
18 messages ยท Page 1 of 1 (latest)
@chilly girder
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
you accidentally entered the REPL
You need to exit the REPL with exit() and hit enter
the REPL is the one that looks like >>> at the beginning
It allows you to interactively write Python scripts in it without saving to a file
A REPL is an interactive shell where you can execute individual lines of code one at a time, like so:
>>> x = 5
>>> x + 2
7
>>> for i in range(3):
... print(i)
...
0
1
2
>>>
To enter the REPL, run python (py on Windows) in the command line without any arguments. The >>> or ... at the start of some lines are prompts to enter code, and indicate that you are in the Python REPL. Any other lines show the output of the code.
Trying to execute commands for the command-line (such as pip install xyz) in the REPL will throw an error. To run these commands, exit the REPL first by running exit() and then run the original command.
I did that after that how do I type without the file path in the beginning? I cannot delete it in any way. I bet that all of this seem silly to you so thank you for taking the time to answer me ๐ ๐
the file path means you're in your terminal. that's exactly where you need to write your command
idk what you mean by file path but if you type that command in one go, you should be able to create you venv properly
i.e. py -m venv myvenv
C:\User\linea>python -m venv lina
Ok now I kind of understand it
Oh my, it worked
Thank you very very much
This help channel has been closed. Feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.