I'm trying to compile python with pyenv. I am compiling for maximum performance but it fails due to dependency errors.
These are what I have in my nix-shell:
gnumake
libgcc
gcc13
zlib
gdb
openssl
bzip2
ncurses
libffi
readline
pyenv
The error:
Successfully installed pip-23.2.1 setuptools-65.5.0
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/amirreza/.pyenv/versions/3.11.7/lib/python3.11/curses/__init__.py", line 13, in <module>
from _curses import *
ModuleNotFoundError: No module named '_curses'
WARNING: The Python curses extension was not compiled. Missing the ncurses lib?
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/amirreza/.pyenv/versions/3.11.7/lib/python3.11/ctypes/__init__.py", line 8, in <module>
from _ctypes import Union, Structure, Array
ImportError: /home/amirreza/.pyenv/versions/3.11.7/lib/python3.11/lib-dynload/_ctypes.cpython-311-x86_64-linux-gnu.so: undefined symbol: ffi_type_void
WARNING: The Python ctypes extension was not compiled. Missing the libffi lib?
Traceback (most recent call last):
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'readline'
WARNING: The Python readline extension was not compiled. Missing the GNU readline lib?
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/amirreza/.pyenv/versions/3.11.7/lib/python3.11/ssl.py", line 100, in <module>
import _ssl # if we can't import it, let the error propagate
^^^^^^^^^^^
ModuleNotFoundError: No module named '_ssl'
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 (NixOS 23.11 using python-build 20180424)
I have tried it with both a system installed pyenv and pyenv in nix-shell.