(Jul-07-2022, 12:31 PM)deanhystad Wrote: I do not believe there are two Python's installed. My guess is that the original install was performed as administrator and is shared. If you install a package as a user, you do not have permission to modify the site packages folder, so windows creates a site packages folder under your user\AppData folder.Yes,of course when think of it so is that the reason,i mostly use pyenv then issues like this is none existing.
Addition info to what deanhystad has posted.
If use
--user
flag it will always use ./.local/lib/python3.10
then avoid permission issues.python3.10 -m pip install --user hugAs mention make a virtual environment and use that as main version.
Example.
# Make an activate tom@tom-VirtualBox:~$ python -m venv new_python tom@tom-VirtualBox:~$ cd new_python/ tom@tom-VirtualBox:~/new_python$ source bin/activate # Now python and pip point to this folder (new_python) tom@tom-VirtualBox:~/new_python$ which python /home/tom/new_python/bin/python (new_python) tom@tom-VirtualBox:~/new_python$ which pip /home/tom/new_python/bin/pip # Install now will only use this folder (new_python) tom@tom-VirtualBox:~/new_python$ pip install hug Collecting hug Downloading hug-2.6.1-py2.py3-none-any.whl (75 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 75.1/75.1 KB 1.4 MB/s eta 0:00:00 Collecting falcon==2.0.0 Downloading falcon-2.0.0-py2.py3-none-any.whl (163 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 164.0/164.0 KB 2.7 MB/s eta 0:00:00 Collecting requests Downloading requests-2.28.1-py3-none-any.whl (62 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 62.8/62.8 KB 2.2 MB/s eta 0:00:00 Collecting urllib3<1.27,>=1.21.1 Downloading urllib3-1.26.10-py2.py3-none-any.whl (139 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 139.2/139.2 KB 2.5 MB/s eta 0:00:00 Collecting certifi>=2017.4.17 Downloading certifi-2022.6.15-py3-none-any.whl (160 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 160.2/160.2 KB 13.8 MB/s eta 0:00:00 Collecting idna<4,>=2.5 Using cached idna-3.3-py3-none-any.whl (61 kB) Collecting charset-normalizer<3,>=2 Downloading charset_normalizer-2.1.0-py3-none-any.whl (39 kB) Installing collected packages: urllib3, idna, falcon, charset-normalizer, certifi, requests, hug Successfully installed certifi-2022.6.15 charset-normalizer-2.1.0 falcon-2.0.0 hug-2.6.1 idna-3.3 requests-2.28.1 urllib3-1.26.10 # Test (new_python) tom@tom-VirtualBox:~/new_python$ python Python 3.10.5 (main, Jun 23 2022, 10:51:05) [GCC 7.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import hug >>> >>> hug.__version__ '2.6.1' >>> exit() (new_python) tom@tom-VirtualBox:~/new_python$
My tutorial about pyenv Simple Python Version Management