The workaround is to instead download from instead. However, for anyone trying to install pip on python 3.6 or older, at the time of writing the file at only supports python 3.7 or newer. This portion of my answer is a bit out of the scope of the question, since the question is specifically for python 3.9. These instructions are based in part on the official installation instructions provided by the pip maintainers. If you are not on a Debian-based distribution, use the equivalent command for your distribution's package manager. If you get an error like No module named 'distutils.util' when you run python3.9 get-pip.py, and you are on a Debian-based Linux distribution, run sudo apt install python3.9-distutilsĪnd then rerun your get-pip.py command. If you see any permissions errors, you may need to use python3.9 get-pip.py -user It is important you use python3.9 instead of just python3, to ensure pip is installed for python 3.9. You can install pip for python 3.9 the following way: curl -o get-pip.py ModuleNotFoundError: No module named 'distutils.util' Installing pip using python3.9 get-pip.py gives an error: ~/python_tools$ python3.9 get-pip.pyįile "/home/ubuntu/python_tools/get-pip.py", line 23704, in įile "/home/ubuntu/python_tools/get-pip.py", line 198, in mainįile "/home/ubuntu/python_tools/get-pip.py", line 82, in bootstrapįrom pip._ import main as pip_entry_pointįile "/tmp/tmpkwyc8h7j/pip.zip/pip/_internal/cli/main.py", line 10, in įile "/tmp/tmpkwyc8h7j/pip.zip/pip/_internal/cli/autocompletion.py", line 9, in įile "/tmp/tmpkwyc8h7j/pip.zip/pip/_internal/cli/main_parser.py", line 7, in įile "/tmp/tmpkwyc8h7j/pip.zip/pip/_internal/cli/cmdoptions.py", line 18, in Sudo apt-get install python3-pip does not work for me as it installs pip for python 3.8 Sudo add-apt-repository ppa:deadsnakes/ppa I went ahead and installed Python 3.9 from: I cannot uninstall Python 3.8 but I need Python 3.9
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |