Comment on Can someone help me get Pygame working?
ComicalMayhem@lemmy.world 4 days agoFollowing someone else’s suggestions, I made a venv file called venv and installed pygame in it using venv/bin/pip install pygame from the directory where I have the main project in. Interestingly, it installed just fine, but when I try to do pip install pygame while in the virtual environment’s bin folder, I get the externally managed environment error. My venv folder doesn’t have an environment folder, it’s just ~/path-to/venv, where venv is the name of the virtual environment. probably should have picked a different name tbh. Anyways I followed your suggestion making replacements where necessary to run the program. Dunno if I’m doing something wrong but it isn’t working for me.
Contramuffin@lemmy.world 4 days ago
It’s not just about being in the right folder. You need to specify the path. If you just do
python file.pyorpip install whateverIt will try to use system components, regardless of what folder you’re in. You’ll need to explicitly say, “use this specific venv version of python.” If you’re in the bin folder of the venv, you’ll need to use
./python file.py