Last active
October 2, 2021 06:19
-
-
Save dnavarrom/67c0cb45d8fc6abf98c5c8ce6653e0dd to your computer and use it in GitHub Desktop.
Install python 3.7 + pip in linux mint 19 cinnamon
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Step 1 : preconditions | |
sudo apt-get install build-essential checkinstall | |
sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev \ | |
libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev | |
#Step 2: download an unpack python | |
cd /usr/src | |
sudo wget https://www.python.org/ftp/python/3.7.2/Python-3.7.2.tgz | |
sudo tar xzf Python-3.7.2.tgz | |
#Step 3 : compile | |
cd Python-3.7.2 | |
sudo ./configure --enable-optimizations | |
#use altinstall used to keep original python, if no python environment use sudo make install | |
sudo make altinstall |
Thank you
It ends with:
File "/usr/src/Python-3.7.2/Lib/ctypes/__init__.py", line 7, in <module>
from _ctypes import Union, Structure, Array
ModuleNotFoundError: No module named '_ctypes'
make: *** [Makefile:1140: altinstall] Error 1
this doesn't installs pip
this doesn't installs pip
Try sudo apt install python3-pip
manually.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Nice gitst but libffi-dev must be added to the sudo apt-get install to avoid some errors when running python/pip