Path: ...!2.eu.feeder.erje.net!3.eu.feeder.erje.net!feeder.erje.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: rbowman Newsgroups: comp.lang.python Subject: Re: Pip installs to unexpected place Date: 20 Apr 2025 04:34:39 GMT Lines: 44 Message-ID: References: <4ZcdYR5WnWznV1q@mail.python.org> <4Zd3YM00SYznVKQ@mail.python.org> <4ZdrJv0v0LznV1q@mail.python.org> <6d1ac10c-80c0-484b-a7e7-e1966cea1b5d@wichmann.us> <20250418153848.w2hmxpegl3uwii3w@hjp.at> <20250419085614.vbgzh7h7hggyhzsd@hjp.at> <0a88a780-0921-469b-a649-48f57cf972b4@tompassin.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: individual.net crGOQr2f6t40LymA0JpL4gikxdnohPP0dABzqkwvDwNUyC1q2Z Cancel-Lock: sha1:2F6Sk6HRLSZVwIuAIU09qwGsAeI= sha256:r0f9nvAvJhm/yMIiyiMnBrHckBqUG5g8VYldZmN6tvo= User-Agent: Pan/0.160 (Toresk; ) Bytes: 2882 On Sat, 19 Apr 2025 15:56:16 -0400, Thomas Passin wrote: > My problem with venvs, especially if I have more than one, is that I > eventually forget what they were for and what is different about each > one. If there's only one and it's used for all non-system work, that's > OK but beyond that and they tend to suffer knowledge rot. My Python directory has apple/ create/ fastapi/ lunar/ numerical/ pyside6/ weather/ comics/ django/ folium/ ml/ sqlite/ coursera/ impractical/ nn/ pyqt/ torch/ Not all like sqlite are venvs since no additional modules are needed. Even if I'm a little hazy about 'apple' after a while a quick look at the Python file shows 'https://itunes.apple.com/search' and I remember it is to pull down artist/track info from the itunes database. I also try to remember to run 'pythom -m pip freeze > requirements.txt' after I get everything set up. That way if a OS update installs a new version of Python something like python3 -m venv folium cd folium .. bin/activate python -m pip install -r requirements.txt will refresh the venv and install the appropriate packages for the new Python version. That's faster than looking at lib/python3.10/site-packages or whatever the previous version was and adding the dependencies or trying to run the py file and getting Traceback (most recent call last): File "/home/rbowman/work/python/impractical/benford.py", line 5, in import matplotlib.pyplot as plt ModuleNotFoundError: No module named 'matplotlib'