Issue
Good morning guys
I ended up creating several Python builds (2.7.18, 3.6.10, 3.7.7, 3.8.2, 3.9.0) downloading the tar.gz for each of these versions and creating the build.
I know that it is recommended to use only the pip of one of them and then create a virtual environment, however, I want to have the flexibility to use the pip of any of these versions to install the dependencies because that way I can create an alias for both pip and python and change the versions whenever I want.
When I went to install virtualenv with python 3.7.7 pip3.7, I am getting the following error:
I was able to install requests and NumPy, so I would like to know if virtualenv can in fact be installed in versions above 3.6, below you can see the correct installations.
Anyone who can help would be grateful.
Solution
1 - Install Essential Dependencies
Installing the dependencies below, mainly libffi-dev
for systems like Ubuntu/Mint/ Debian and libffi-devel
for systems like Fedora/ CentOS:
Ubuntu/Mint/Debian
sudo apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev \
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \
xz-utils tk-dev libffi-dev liblzma-dev python-openssl git
Fedora/CentOS
sudo yum install @development zlib-devel bzip2 bzip2-devel readline-devel sqlite \
sqlite-devel openssl-devel xz xz-devel libffi-devel findutils
2 - Installing Python
After installing the above dependencies, if you are creating manually, you must perform the procedures below:
- Remove the version you generated earlier
- Run ./configure
- Run make
- Run sudo make altinstall
This way you will be able to install all dependencies without any errors.
Answered By - Yuri Jose Answer Checked By - Dawn Plyler (WPSolving Volunteer)