Home > Software engineering >  Regarding Python version instalation
Regarding Python version instalation

Time:07-21

I am trying to use a package which converts currency. From here https://pypi.org/project/currency-symbols/

C:\Users\>pip install currency-symbols
Requirement already satisfied: currency-symbols in c:\users\user\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (2.0.3)

As you can see the requirement is already satisfied.

But I was still getting the error ModuleNotFound, so I check the version of python due to lack of better ideas.

C:\Users\user>python -V
Python 3.10.1

If you see the "requirement already satisfied" message from earlier, you will see it is also mentioning python 3.8 in the path. But when i checked the version it says python 3.10. What does that mean? Has it been incorrectly installed?

CodePudding user response:

You most likely have both 3.8 and 3.10 installed and at least pip from 3.8 is in the PATH before 3.10. You could:

  1. Remove 3.8 paths from the PATH, there's probably at least 2 entries referring to 3.8 paths, base python with python.exe and Scripts folder ..
  2. Invoke pip with absolute path to the correct python version.
  3. Run pip via python.exe itself as with absolute path so that PATH resolving doesnt kick in. Something like: C:\Python310\python -mpip install currency-symbols
  4. Or just uninstall the python you dont need anymore.
  • Related