Reputation: 377
I use PyEnv to manage Python virtual environments. I have numpy 1.26.4 installed in my project environment. If I run
pip list
from my activated virtualenv, I get
notebook 7.2.1
notebook_shim 0.2.4
numpy 1.26.4
opt-einsum 3.3.0
overrides 7.7.0
Now I run the following from my project folder, also from my activated virtualenv:
pipreqs .
This gives the output
numpy==2.0.0
opt_einsum==3.3.0
It seems that pipreqs fetches the latest version of numpy it finds on PyPI, without regards to the versions in my environment. Can I restrict pipreqs to only write versions I have in my environment to requirements.txt?
It would seem odd if it couldn't, since these versions are the ones I use for development.
I'm running this on macOS Sonoma 14.1.1 with Apple M2 Max processor.
Upvotes: 1
Views: 71