#π How To Install pip
27 messages Β· Page 1 of 1 (latest)
@vernal granite
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.
python -m venv .venv
.venv/Scripts/activate
pip install pygame
So I put that into the CMD window?
yes
first one create a virtual env. Second one activates the virtualenv (run this when you open a new cmd window). Third one installs pygame
!venv
Virtual environments are isolated Python environments, which make it easier to keep your system clean and manage dependencies. By default, when activated, only libraries and scripts installed in the virtual environment are accessible, preventing cross-project dependency conflicts, and allowing easy isolation of requirements.
To create a new virtual environment, you can use the standard library venv module: python3 -m venv .venv (replace python3 with python or py on Windows)
Then, to activate the new virtual environment:
Windows (PowerShell): .venv\Scripts\Activate.ps1
or (Command Prompt): .venv\Scripts\activate.bat
MacOS / Linux (Bash): source .venv/bin/activate
Packages can then be installed to the virtual environment using pip, as normal.
For more information, take a read of the documentation. If you run code through your editor, check its documentation on how to make it use your virtual environment. For example, see the VSCode or PyCharm docs.
Tools such as poetry and pipenv can manage the creation of virtual environments as well as project dependencies, making packaging and installing your project easier.
Note: When using PowerShell in Windows, you may need to change the execution policy first. This is only required once per user:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
By CMD window I ment the console command window for the whole computer
Gimma a second
C:\Users\patty>py -m venv .venv
'py' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\patty>python -m venv .venv
'python' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\patty>python3 -m venv .venv
'python3' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\patty>
python isn't installed.
then how the hell is IDLE working?
python isn't on the PATH
reinstall python, making sure to also install the py launcher
Man, I thought that part wouldn't be necessary π₯²
are you not an admin?
See what I don't understand is why your own computer wouldn't give you admin privileges
If your dad set it up, he may have made himself admin and made your account a normal user.
Piss
No Bueno
Kinda why I wanna learn by myself so no one has power over my stuff
This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, 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.