4

I am trying to install python via pyenv on my new ArchLinux install

pyenv install 3.5.1Downloading Python-3.5.1.tar.xz...
-> https://www.python.org/ftp/python/3.5.1/Python-3.5.1.tar.xz
Installing Python-3.5.1...
ERROR: The Python ssl extension was not compiled. Missing the OpenSSL lib?

Please consult to the Wiki page to fix the problem.
https://github.com/pyenv/pyenv/wiki/Common-build-problems


BUILD FAILED (Arch Linux using python-build 20160602)

Inspect or clean up the working tree at /tmp/python-build.20170515113212.3725
Results logged to /tmp/python-build.20170515113212.3725.log

Last 10 log lines:
(cd /home/maximilian/.pyenv/versions/3.5.1/share/man/man1; ln -s python3.5.1 python3.1)
if test "xupgrade" != "xno"  ; then \
    case upgrade in \
        upgrade) ensurepip="--upgrade" ;; \
        install|*) ensurepip="" ;; \
    esac; \
     ./python -E -m ensurepip \
        $ensurepip --root=/ ; \
fi
Ignoring ensurepip failure: pip 7.1.2 requires SSL/TLS

And it failes due to missing OpenSSL support. I had it running on my previous Arch installation but I can't remember what I did back then.

The FAQ in the Wiki does not provide a working solution

2 Answers 2

12

Please try it.:

CFLAGS=-I/usr/include/openssl-1.0 \
LDFLAGS=-L/usr/lib64/openssl-1.0 \
pyenv install -v 3.5.1

ArchLinux packages:

$ pacman -Q | grep openssl
openssl 1.1.0.e-1
openssl-1.0 1.0.2.k-3
python-pyopenssl 17.0.0-1
python2-pyopenssl 17.0.0-1
Sign up to request clarification or add additional context in comments.

Comments

4

The pyvenv FAQ mention an issue similar to what you are reporting. Their solution is to use

CFLAGS=-I/usr/include/openssl \
LDFLAGS=-L/usr/lib64 \
pyenv install -v 3.5.1

Also it's not Python that needs SSL but only pip. Arch's own Python 3 package compiles with --without-ensurepip, so you could try

CONFIGURE_OPTS="--without-ensurepip" \
pyenv install -v 3.5.1

2 Comments

Yeah but what can I do to get the build process to work with pyenv.
I tried this, but to no avil. Most frustrating is the fact that I got It working on a different machine

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.