Good to see that you also dive in Python! With 3.11 I used to be able to install often used packages like rich, pandas, or reportlab globally for simple one-off scripts. I wrote some to quickly modify data, local files, and generate PDF outputs. Those one-off scripts are great to toss into a folder containing data, modify them. Sometimes I have multiple versions of those scripts to generate various outputs. With 3.12 this option seems to be gone. All attempts to install system-wide packages fail for me. Even with the suggested pipx. For those one-off scripts it seems like unnecessary overhead to maintain virtualenvs and have them re-download all the packages and dependencies in every folder. It was so easy to just run `python3 script.py` in the CWD where the data is stored. Now the virtualenv needs to be activated first. Any idea how to get the old behavior back?
@codewithsusan
7 ай бұрын
What if you create "global" env that has all your general-use packages and work within that env for any one-off scripts. You could even add a line to your bash profile that makes that global env the default env on start up so you don't have to remember to switch into it. Expect more Python content in the future - I'll be teaching a course that uses it this Fall so it's front-and-center on my radar currently.
Пікірлер: 4