Open caio-passos opened 4 months ago
For me, changing from PyYAML == 6.0 to PyYAML > 6.0 helped running the pip requirements build.
I had the same issue when upgrading from Ubuntu 22 to Ubuntu 24. Changing the requirement to PyYAML>6.0 as suggested below I tried to do the same fot TgCrypto and Rich, allowing the build to use the newer versions but to no avail. This is where the make fails:
python3 -m pip install --upgrade pip setuptools
Requirement already satisfied: pip in /home/luis/telegram/tmd/lib/python3.12/site-packages (24.2)
Requirement already satisfied: setuptools in /home/luis/telegram/tmd/lib/python3.12/site-packages (75.1.0)
python3 -m pip install -r requirements.txt
Collecting https://github.com/Dineshkarthik/pyrogram/archive/refs/heads/master.zip (from -r requirements.txt (line 1))
Using cached https://github.com/Dineshkarthik/pyrogram/archive/refs/heads/master.zip
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting PyYAML>6.0 (from -r requirements.txt (line 2))
Using cached PyYAML-6.0.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (2.1 kB)
Collecting rich>12.5.1 (from -r requirements.txt (line 3))
Downloading rich-13.9.1-py3-none-any.whl.metadata (18 kB)
Collecting TgCrypto>1.2.3 (from -r requirements.txt (line 4))
Using cached TgCrypto-1.2.5.tar.gz (37 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting pyaes==1.6.1 (from Pyrogram==2.0.106->-r requirements.txt (line 1))
Using cached pyaes-1.6.1-py3-none-any.whl
Collecting pysocks==1.7.1 (from Pyrogram==2.0.106->-r requirements.txt (line 1))
Using cached PySocks-1.7.1-py3-none-any.whl.metadata (13 kB)
Collecting markdown-it-py>=2.2.0 (from rich>12.5.1->-r requirements.txt (line 3))
Downloading markdown_it_py-3.0.0-py3-none-any.whl.metadata (6.9 kB)
Collecting pygments<3.0.0,>=2.13.0 (from rich>12.5.1->-r requirements.txt (line 3))
Using cached pygments-2.18.0-py3-none-any.whl.metadata (2.5 kB)
Collecting mdurl~=0.1 (from markdown-it-py>=2.2.0->rich>12.5.1->-r requirements.txt (line 3))
Downloading mdurl-0.1.2-py3-none-any.whl.metadata (1.6 kB)
Using cached PySocks-1.7.1-py3-none-any.whl (16 kB)
Using cached PyYAML-6.0.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (767 kB)
Downloading rich-13.9.1-py3-none-any.whl (242 kB)
Downloading markdown_it_py-3.0.0-py3-none-any.whl (87 kB)
Using cached pygments-2.18.0-py3-none-any.whl (1.2 MB)
Downloading mdurl-0.1.2-py3-none-any.whl (10.0 kB)
Building wheels for collected packages: Pyrogram, TgCrypto
Building wheel for Pyrogram (pyproject.toml) ... done
Created wheel for Pyrogram: filename=Pyrogram-2.0.106-py3-none-any.whl size=3573814 sha256=bf2fbccc77604a8b599d2efab1a947ddd1a414939990930cd1e295aa7cf93107
Stored in directory: /tmp/pip-ephem-wheel-cache-7dx07wp5/wheels/1f/c7/e8/8ff2c993a059b74ef7ef7ddfcd9226cf4e07be175362a91d33
Building wheel for TgCrypto (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for TgCrypto (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [29 lines of output]
/tmp/pip-build-env-hpyvfa86/overlay/lib/python3.12/site-packages/setuptools/_distutils/dist.py:261: UserWarning: Unknown distribution option: 'test_suite'
warnings.warn(msg)
running bdist_wheel
running build
running build_py
creating build/lib.linux-x86_64-cpython-312/tests
copying tests/__init__.py -> build/lib.linux-x86_64-cpython-312/tests
creating build/lib.linux-x86_64-cpython-312/tests/ctr
copying tests/ctr/test_ctr.py -> build/lib.linux-x86_64-cpython-312/tests/ctr
copying tests/ctr/__init__.py -> build/lib.linux-x86_64-cpython-312/tests/ctr
creating build/lib.linux-x86_64-cpython-312/tests/ige
copying tests/ige/test_ige.py -> build/lib.linux-x86_64-cpython-312/tests/ige
copying tests/ige/__init__.py -> build/lib.linux-x86_64-cpython-312/tests/ige
creating build/lib.linux-x86_64-cpython-312/tests/cbc
copying tests/cbc/test_cbc.py -> build/lib.linux-x86_64-cpython-312/tests/cbc
copying tests/cbc/__init__.py -> build/lib.linux-x86_64-cpython-312/tests/cbc
running build_ext
building 'tgcrypto' extension
creating build/temp.linux-x86_64-cpython-312/tgcrypto
x86_64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -I/home/luis/telegram/tmd/include -I/usr/include/python3.12 -c tgcrypto/aes256.c -o build/temp.linux-x86_64-cpython-312/tgcrypto/aes256.o
x86_64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -I/home/luis/telegram/tmd/include -I/usr/include/python3.12 -c tgcrypto/cbc256.c -o build/temp.linux-x86_64-cpython-312/tgcrypto/cbc256.o
x86_64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -I/home/luis/telegram/tmd/include -I/usr/include/python3.12 -c tgcrypto/ctr256.c -o build/temp.linux-x86_64-cpython-312/tgcrypto/ctr256.o
x86_64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -I/home/luis/telegram/tmd/include -I/usr/include/python3.12 -c tgcrypto/ige256.c -o build/temp.linux-x86_64-cpython-312/tgcrypto/ige256.o
x86_64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -I/home/luis/telegram/tmd/include -I/usr/include/python3.12 -c tgcrypto/tgcrypto.c -o build/temp.linux-x86_64-cpython-312/tgcrypto/tgcrypto.o
tgcrypto/tgcrypto.c:23:10: fatal error: Python.h: No existe el archivo o el directorio
23 | #include <Python.h>
| ^~~~~~~~~~
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 TgCrypto
Successfully built Pyrogram
Failed to build TgCrypto
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (TgCrypto)
make: *** [Makefile:7: install] Error 1
When installing with Python 3.12, if PyYAML == 6.0 it wont install:
if you do change to: PyYAML > 6.0 it is able to "make install", but however it is still not able to properly run.
With PopOS 22.04, Python 3.12 and PyYAML > 6.0, after installing, this happens when the script runs:
last_read_message_id: 0 ids_to_retry: [] media_types:
Python Version Python: 3.12
OS: PopOS 22.04