0

I'm using python3.8.6 and I need to upgrade to 3.9.x.
After upgrade the python, myproject.py cannot find a module that already installed using pip3 install opencv-python.
when run python3 myproject.py occurs error that ModuleNotFoundError tensorflow, and tensorflow should be 2.5.x so I'm trying to install python 3.9.x.
pip --version shows pip 20.0.2 from /usr/lib/python3/dist-packages/pip (python 3.8) How can I change that (python3.8) to (python3.9)?

sorry for my bad English..

BigJ
  • 21
  • 1
  • 5
  • Does this answer your question? [How to upgrade all Python packages with pip](https://stackoverflow.com/questions/2720014/how-to-upgrade-all-python-packages-with-pip) – lionking-123 Aug 19 '21 at 03:12
  • If `python3` already points to your python3.9, then simply do `python3 -m pip ` to run pip commands specifically for that version of python – FlyingTeller Aug 19 '21 at 07:26

1 Answers1

2
python -m pip install –upgrade pip.

If you type pip list it will show you every package installed and should say something like WARNING: You are using pip version 21.2.3; however, version 21.2.4 is available. You should consider upgrading via this command:

c:\users\x\python.exe -m pip install --upgrade pip
imxitiz
  • 3,920
  • 3
  • 9
  • 33