Home > Software engineering >  How to install Pip con VisualStudio Code Linux Terminal
How to install Pip con VisualStudio Code Linux Terminal

Time:05-03

I've trying to use pip, I use visual studio code with a Linux Terminal. I have Python 3.10.4 installed. The way I installed pip was with

sudo apt install python3-pip

but when I try to check the version i get the following error:

pip Traceback (most recent call last): File "/usr/bin/pip", line 11, in load_entry_point('pip==20.0.2', 'console_scripts', 'pip')() File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 490, in load_entry_point return get_distribution(dist).load_entry_point(group, name) File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2854, in load_entry_point return ep.load() File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2445, in load return self.resolve() File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2451, in resolve module = import(self.module_name, fromlist=['name'], level=0) File "/usr/lib/python3/dist-packages/pip/_internal/cli/main.py", line 10, in from pip._internal.cli.autocompletion import autocomplete File "/usr/lib/python3/dist-packages/pip/_internal/cli/autocompletion.py", line 9, in from pip._internal.cli.main_parser import create_main_parser File "/usr/lib/python3/dist-packages/pip/_internal/cli/main_parser.py", line 7, in from pip._internal.cli import cmdoptions File "/usr/lib/python3/dist-packages/pip/_internal/cli/cmdoptions.py", line 19, in from distutils.util import strtobool ModuleNotFoundError: No module named 'distutils.util'

any clues on what I'm doing wrong?

CodePudding user response:

Try the update first :

> sudo apt update

And also, please provide which OS distribution you are using, the commands may change for Ubuntu - Debian - Fedora ...

CodePudding user response:

  1. After opening the official enter image description here

    1. Enter "wget the address of the replication" in Linux.

    2. After downloading, execute the command Python get pip py.

    You can refer to this enter image description here

  • Related