|
|
|
|
|
by AlienRobot
588 days ago
|
|
I love Python but it always amazes me how hard it is for it to just... work. So there is virtualenv, built in, but... if there is a venv directory, Python doesn't just use it. Like you have app.py, and you python app.py, that doesn't run it with the venv python. This leads to all sorts of problems with scripts that assume they're running under venv. Which means you probably want to write a script that sources venv just so you don't forget, but if you place it in the same directory you may forget you need to call the script, so you probably want to add an extra directory to hide all the python code so you only see the shell script that you need to run to properly setup the environment to run the python code. Or just use an IDE. Just "pip install." But pip isn't installed and ensure pip doesn't work? What do I even do then? I recall downloading a project that required a library that wasn't available for the newest version of python, so when you tried to install the requirements pip wouldn't find it. I discovered this, naturally, because I updated my operating system so the python version changed which means the project that used to work stopped working! What is the solution for installing multiple python versions side by side? Hint: it's not an official project by the Python organization but something you can find on github. |
|