Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems Installing pyvmrun==0.2.1 From requirements.txt #1

Open
Lavargian opened this issue Jul 23, 2022 · 0 comments
Open

Problems Installing pyvmrun==0.2.1 From requirements.txt #1

Lavargian opened this issue Jul 23, 2022 · 0 comments

Comments

@Lavargian
Copy link

[*]The following has been tested and verified using Ubuntu 20.04

When attempting to install pyvmrun==0.2.1 with the following command:
python3 -m pip install -r requirements.txt
I receive the following error:
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.

I found this might happen if you built Python from source, and libssl-dev wasn't installed on your machine.
You can check whether you have libssl-dev installed by looking at the output of:
dpkg -s libssl-dev
If not installed, you can install with the following command:
apt-get install libssl-dev

From here you must rebuild Python from source.
Building Python from source requires various third-party and system libraries.

Open the /etc/apt/sources.list file.
$ sudo nano /etc/apt/sources.list
To enable the source packages, add their location, including URL, distribution name, and component name.
deb-src http://archive.ubuntu.com/ubuntu/ focal main
Save the file and exit.

Update the packages index.
$ sudo apt update

Install the required system libraries for Python.
$ sudo apt -y build-dep python3

Install the third-party libraries for all optional modules.

$ sudo apt -y install gdb lcov libbz2-dev libffi-dev libgdbm-dev libgdbm-compat-dev liblzma-dev libncurses5-dev libreadline6-dev libsqlite3-dev libssl-dev lzma lzma-dev tk-dev uuid-dev zlib1g-dev

Now download the source archive to the home directory.

$ cd ~
$ wget https://github.com/python/cpython/archive/refs/tags/v3.10.5.tar.gz
The latest stable version of Python at the moment is 3.10.5. But, of course, you can always visit python.org and fill in the command with the latest version.

Extract the archive.

$ tar xzf v3.10.5.tar.gz

Change the working directory to the source directory.

$ cd cpython-3.10.5

Configure the source.

$ ./configure --enable-optimizations

Build the source (this may take a few minutes).

$ make -s

Using make altinstall instead of make install avoids overwriting a previous Python install with Python 3.10.5.
$ sudo make altinstall
If overwriting isn't a problem or Python is not currently on you machine, go ahead and run:
$ sudo make install

Python 3.10.5 also comes with pip, the package installer for Python.
$ python3.10.5 -m pip -V

The output should be like this.
pip 21.2.3 from /usr/local/lib/python3.9/site-packages/pip (python 3.9)

If you ran $ sudo make altinstall and ensure that all existing programs are compatible with Python 3.10.5 from your previous Python install, you can make it the default version so $ python3 will kick off the program instead of having to type $ python3.10.5 by using the following command:
$ sudo ln -fs /usr/local/bin/python3.9 /usr/bin/python3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant