Deutsch   English   Français   Italiano  
<m6jbquFe1h3U1@mid.individual.net>

View for Bookmarking (what is this?)
Look up another Usenet article

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 <bowman@montana.com>
Newsgroups: comp.lang.python
Subject: Re: Pip installs to unexpected place
Date: 20 Apr 2025 04:34:39 GMT
Lines: 44
Message-ID: <m6jbquFe1h3U1@mid.individual.net>
References: <4ZcdYR5WnWznV1q@mail.python.org>
	<cc1c6cf5-f8b9-4528-b6b0-110499b88162@wichmann.us>
	<4Zd3YM00SYznVKQ@mail.python.org>
	<CAJQBtgmfgC5aQy_7RXwHDbsxaf1UWYY0=FNsgPPR2UzzuKfTTA@mail.gmail.com>
	<4ZdrJv0v0LznV1q@mail.python.org>
	<6d1ac10c-80c0-484b-a7e7-e1966cea1b5d@wichmann.us>
	<mailman.19.1744926071.3008.python-list@python.org>
	<m6dnueFg8f0U1@mid.individual.net> <20250418153848.w2hmxpegl3uwii3w@hjp.at>
	<e1cce2f7-e59b-42bb-95ee-602f241f545b@tompassin.net>
	<20250419085614.vbgzh7h7hggyhzsd@hjp.at>
	<0a88a780-0921-469b-a649-48f57cf972b4@tompassin.net>
	<mailman.25.1745092587.3008.python-list@python.org>
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 
<module>
    import matplotlib.pyplot as plt
ModuleNotFoundError: No module named 'matplotlib'