Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #197423

Re: Pip installs to unexpected place

From rbowman <bowman@montana.com>
Newsgroups comp.lang.python
Subject Re: Pip installs to unexpected place
Date 2025-04-20 04:34 +0000
Message-ID <m6jbquFe1h3U1@mid.individual.net> (permalink)
References (8 earlier) <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>

Show all headers | View raw


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'






Back to comp.lang.python | Previous | NextPrevious in thread | Find similar


Thread

Re: Pip installs to unexpected place Mats Wichmann <mats@wichmann.us> - 2025-04-17 15:41 -0600
  Re: Pip installs to unexpected place Greg Ewing <greg.ewing@canterbury.ac.nz> - 2025-04-18 13:24 +1200
    Re: Pip installs to unexpected place (Posting On Python-List Prohibited) Lawrence D'Oliveiro <ldo@nz.invalid> - 2025-04-18 02:20 +0000
    Re: Pip installs to unexpected place "Peter J. Holzer" <hjp-python@hjp.at> - 2025-04-18 17:38 +0200
    Re: Pip installs to unexpected place Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2025-04-18 17:11 +0100
    Re: Pip installs to unexpected place Thomas Passin <list1@tompassin.net> - 2025-04-18 13:08 -0400
    Re: Pip installs to unexpected place "Peter J. Holzer" <hjp-python@hjp.at> - 2025-04-19 10:38 +0200
    Re: Pip installs to unexpected place "Peter J. Holzer" <hjp-python@hjp.at> - 2025-04-19 10:56 +0200
      Re: Pip installs to unexpected place songbird <songbird@anthive.com> - 2025-04-19 07:49 -0400
    Re: Pip installs to unexpected place Thomas Passin <list1@tompassin.net> - 2025-04-19 15:56 -0400
      Re: Pip installs to unexpected place rbowman <bowman@montana.com> - 2025-04-20 04:34 +0000

csiph-web