Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
pip in Python 3.8.5
#1
Hi, I'm using SSL and I recently installed python 3.8.5 on my Raspberry Pi 0. After the installation was complete, I tried running:

pip install asyncio

(from the command line)

and I get the error:

-----
Traceback (most recent call last):
File "/usr/local/bin/pip", line 7, in <module>
from pip._internal.cli.main import main
File "/usr/lib/python3/dist-packages/pip/__init__.py", line 72, in <module>
from pip.log import logger
File "/usr/lib/python3/dist-packages/pip/log.py", line 9, in <module>
import colorama, pkg_resources
File "/usr/local/lib/python3.4/dist-packages/pkg_resources/__init__.py", line 81, in <module>
raise RuntimeError("Python 3.5 or later is required")
RuntimeError: Python 3.5 or later is required
-----

When I run python3.8 -V I get Python 3.8.5. No matter what module I try, even if I just run "pip" it gives me the same error. Is there something I did wrong in the installation process or something else I can do to fix this? Thanks in advance.
Smile
Reply
#2
How did you install 3.8? Was it from source? If so, did you give it any options for where it should be installed?

If not being installed via apt, you may need to make sure the path you installed it is first in your path, otherwise some of the 3.5 components may get selected first. You might want to try sudo python3.8 -m pip install <whatever>

Apt should have 3.7 available for the pi. Is that version insufficient?
Reply
#3
When I run python3.8 -V I get Python 3.8.5.
Try run pip3 -V or pip3.8 -V what do you get?
If need install:
sudo apt install python3-pip
After getting correct info can make alias in ~/.bashrc to version Python 3.8.5.

As mention bye @bowlofred can try python3.8 -m pip -V if you did bulild Python with pip this will work.

You see alias example here Install Python 3.6 (or 3.7) and pip on a Raspberry Pi
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020