4

Trying to use a CLI scraper that needs python 3.10 I installed python 3.10 and created the virtual environment using these commands:

sudo apt update && sudo apt -y install python3.10 sudo apt -y install python3.10-dev python3.10-venv python3.10 -m venv venv source venv/bin/activate 

But then when I try to install the requirements

pip3 install --update -r requirements.txt 

I get

Traceback (most recent call last): File "/home/alex/scraper/venv/bin/pip3", line 5, in <module> from pip._internal.cli.main import main ModuleNotFoundError: No module named 'pip' 

While outside of the venv,

pip3 --version 

Returns:

pip 20.3.4 from /usr/lib/python3/dist-packages/pip (python 3.9) 

I'm running Pop Os 21.04

7
  • Modules need to be installed for each version of Python. Try installing pip for 3.10 Commented Dec 6, 2021 at 21:47
  • 1
    Try sudo apt -y install python3.10-dev python3.10-venv python3.10-pip Commented Dec 6, 2021 at 22:01
  • @mechanical_meat @Alasdair E: Unable to locate package python3.10-pip E: Couldn't find any package by glob 'python3.10-pip' Commented Dec 6, 2021 at 22:38
  • It's pretty new, 3.10... can you get by using 3.9 for now until someone makes the associated packages? There likely is another source for 3.10's pip, but I don't know for certain. Commented Dec 6, 2021 at 22:41
  • 3.10 is required as of recent update :/ @mechanical_meat Commented Dec 6, 2021 at 22:42

1 Answer 1

3

latest pip download

curl -sS https://bootstrap.pypa.io/get-pip.py | python3.10 

using the latest pip outside of the venv, python3.10 -m pip

told me the correct usage was

Usage: /usr/bin/python3.10 -m pip <command> [options] 

and that's what worked for me inside the venv

not sure if my python 3.10 is downloading to a weird directory or what

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.