I'm confused about how modules are being located. I've installed pyenv as a git clone and am able to install python versions, but they seem there seems to be a discrepancy regarding
I've installed a version and selected it:
pyenv global 3.9.5
When installing a package with:
pip install msgpack
I get the output:
Defaulting to user installation because normal site-packages is not writeable Requirement already satisfied: msgpack in /usr/lib/python3.9/site-packages (1.0.2)
But when I try to use that package at a python repl:
Python 3.9.5 (default, May 8 2021, 22:00:35) [GCC 10.2.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import msgpack Traceback (most recent call last): File "<stdin>", line 1, in <module> ModuleNotFoundError: No module named 'msgpack'
sys.path does not show /usr/lib/python3.9/site-packages:
>>> import sys; print(sys.path) ['', '/home/jeremy/.pyenv/versions/3.9.5/lib/python39.zip', '/home/jeremy/.p5/lib/python3.9', '/home/jeremy/.pyenv/versions/3.9.5/lib/python3.9/lib-dynly/.local/lib/python3.9/site-packages', '/home/jeremy/.pyenv/versions/3.9.5/lpackages']
pip install --force-reinstallas a workaround, but why does the install command above see /usr/lib but not python?
pyenv which pip?
python -m pip install msgpackgive the same results? It looks like
pipis finding the system installed packge, which it shouldn't when inside a venv.
--userinstalls with pyenv's pip?
--userwith the pip from pyenv.
Hello everyone. I'm install pyenv and pyenv-virtualenv following instructions in github.
My problem: I can't access other python versions that I installed through pyenv. I installed version 3.6.9, but when I use pyenv-virtualenv or a "pyenv shell 3.6.9" I'm still on the same version as my system.