Requirements versions on klippy-requirements.txt causes pip install to fail on python 3.11.0

Basic Information:

Printer Model: Ender 3
MCU / Printerboard: Creality 4.2.2
klippy.log

Fill out above information and in all cases attach your klippy.log file. Pasting your printer.cfg is not needed

Describe your issue:

On 20/November/2022 I turned on my klipper setup and tried to access mainsail, the web browser would not redirect me anywhere and i decided to manually re install both klipper and moonraker, after moonraker was properly installed i removed the klipper and klippy-env directories, clonned klipper and proceeded to activate a python 3 venv , inside of it i upgraded pip, wheel and setup-tools, then ran pip install -r ./klipper/scripts/klippy-requirements.txt , after several tries without success ( Error: legacy-install-failure regarding greenlets) i read the contents of klippy-requirements.txt ::

This file describes the Python virtualenv package requirements for

the Klipper host software (Klippy). These package requirements are

typically installed via the command:

pip install -r klippy-requirements.txt

cffi==1.14.6
pyserial==3.4
greenlet==1.1.2
Jinja2==2.11.3
python-can==3.3.4
markupsafe==1.1.1

i decided to manually install each requirement without specifying version and the results were:

pip install cffi (installed cffi-1.15.1 pycparser-2.21)
pip install pyserial (installed pyserial-3.5)
pip install greenlet (installed greenlet-2.0.1)
pip install jinja2 (installed MarkupSafe-2.1.1 jinja2-3.1.2)
pip install python-can ( installed msgpack-1.0.4 packaging-21.3 pyparsing-3.0.9 python-can-4.0.0 typing-extensions-4.4.0 wrapt-1.14.1)
pip install markupsafe (Requirement already satisfied: markupsafe in ./klippy-env/lib/python3.11/site-packages (2.1.1))

And klipper was successfully installed on my system.

1 Like

Python3 is not officially supported and not all aspects are fully ported.
Stick to Python2 or fight it through :wink:

Could you help me, i get the greenlet package install error when using Kiauh, i tried installing the packages the same as you did, but still no success.

Try the following commands , not as sudo.

cd ~/

virtualenv -p python2 klippy-env
source klippy-env/bin/activate

pip install --upgrade pip
pip install --upgrade setuptools
pip install --upgrade wheel

pip install -r ./klipper/scripts/klippy-requirements.txt
deactivate

Thanks for the help, but i manged to avoid the problem by using a diferent linux distro, called xubuntu.

But still, thanks for the help.