2023 m. vasario 22 d., trečiadienis

Installing new python3.10 version to server

Installing new version ex: python3.10and running:


virtualenv --python=/usr/bin/python3.10 ven

will encounter 

he following packages were automatically installed and are no longer required:
  libdvdnav4 libdvdread7 libegl-mesa0 libegl1 libfwupdplugin1 libjansson4 libldb2 liblua5.2-0 libpython3.11-minimal libpython3.11-stdlib libsmbclient libtalloc2 libtevent0 libva-wayland2 libwbclient0 libxmlb1
  mpv python3-ldb python3-pyxattr python3-talloc python3.11-minimal rtmpdump samba-libs


What you need is this:


$ sudo apt-get install python3.10-distutils


Also pip will complain:

    from pip._vendor import html5lib, requests
ImportError: cannot import name 'html5lib' from 'pip._vendor' (/home/sup/scripts/Ton/lave_telegram_bot/venv/lib/python3.10/site-packages/pip/_vendor/__init__.py)

 

$ curl -sS https://bootstrap.pypa.io/get-pip.py | python3.10

 

Another pip error


      compilation terminated.
      error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
      [end of output]
 
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for crc16

Fix:

$ sudo apt install python3.10-dev