New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python 3.11.0 ModuleNotFoundError: No module named 'psycopg2._psycopg' 🐛 #1767
Comments
Failed attempt with the non binary package of psycopg2
Command: oryx build /home/site/repository -o /home/site/wwwroot --platform python --platform-version 3.11 -p virtualenv_name=antenv --log-file /tmp/build-debug.log -i /tmp/8dae467aa043c1b --compress-destination-dir | tee /tmp/oryx-build.log
Operation performed by Microsoft Oryx, https://github.com/Microsoft/Oryx
You can report issues at https://github.com/Microsoft/Oryx/issues
Oryx Version: 0.2.20220825.1, Commit: 24032445dbf7bf6ef068688f1b123a7144453b7f, ReleaseTagName: 20220825.1
Build Operation ID: |2BRduEAxRw4=.a850ab2c_
Repository Commit : 692962500d79e9839bf6b17dabbc6c2f97d2c2f9
Detecting platforms...
Detected following platforms:
nodejs: 14.20.1
python: 3.11.0
Version '14.20.1' of platform 'nodejs' is not installed. Generating script to install it...
Version '3.11.0' of platform 'python' is not installed. Generating script to install it...
Using intermediate directory '/tmp/8dae467aa043c1b'.
Copying files to the intermediate directory...
Done in 5 sec(s).
Source directory : /tmp/8dae467aa043c1b
Destination directory: /home/site/wwwroot
Downloading and extracting 'nodejs' version '14.20.1' to '/tmp/oryx/platforms/nodejs/14.20.1'...
Detected image debian flavor: bullseye.
Downloaded in 3 sec(s).
Verifying checksum...
Extracting contents...
performing sha512 checksum for: nodejs...
Done in 17 sec(s).
Downloading and extracting 'python' version '3.11.0' to '/tmp/oryx/platforms/python/3.11.0'...
Detected image debian flavor: bullseye.
Downloaded in 7 sec(s).
Verifying checksum...
Extracting contents...
performing sha512 checksum for: python...
Done in 38 sec(s).
image detector file exists, platform is python..
OS detector file exists, OS is bullseye..
Executing pre-build command...
Finished executing pre-build command.
Python Version: /tmp/oryx/platforms/python/3.11.0/bin/python3.11
Creating directory for command manifest file if it does not exist
Removing existing manifest file
Python Virtual Environment: antenv
Creating virtual environment...
Activating virtual environment...
Running pip install...
[22:00:58+0000] Collecting azure-identity==1.12.0
[22:00:58+0000] Downloading azure_identity-1.12.0-py3-none-any.whl (135 kB)
[22:00:58+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 135.5/135.5 kB 3.3 MB/s eta 0:00:00
[22:00:58+0000] Collecting azure-keyvault-secrets==4.6.0
[22:00:58+0000] Downloading azure_keyvault_secrets-4.6.0-py3-none-any.whl (291 kB)
[22:00:58+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 291.6/291.6 kB 5.7 MB/s eta 0:00:00
[22:00:59+0000] Collecting bibtexparser==1.4.0
[22:00:59+0000] Downloading bibtexparser-1.4.0.tar.gz (51 kB)
[22:00:59+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 51.9/51.9 kB 1.4 MB/s eta 0:00:00
[22:00:59+0000] Preparing metadata (setup.py): started
[22:01:04+0000] Preparing metadata (setup.py): finished with status 'done'
[22:01:06+0000] Collecting django<5.0,==4.*
[22:01:06+0000] Downloading Django-4.1.4-py3-none-any.whl (8.1 MB)
[22:01:10+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 8.1/8.1 MB 2.0 MB/s eta 0:00:00
[22:01:12+0000] Collecting django-braces==1.15.0
[22:01:12+0000] Downloading django_braces-1.15.0-py2.py3-none-any.whl (14 kB)
[22:01:12+0000] Collecting django-crispy-forms==1.14.0
[22:01:12+0000] Downloading django_crispy_forms-1.14.0-py3-none-any.whl (133 kB)
[22:01:12+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 133.3/133.3 kB 6.6 MB/s eta 0:00:00
[22:01:13+0000] Collecting django-import-export==3.0.2
[22:01:14+0000] Downloading django_import_export-3.0.2-py3-none-any.whl (104 kB)
[22:01:14+0000] ━━━━━━━━━━━━━━━━━━━��━━━━━━━━━━━━━━━━━━━ 104.0/104.0 kB 2.5 MB/s eta 0:00:00
[22:01:14+0000] Collecting django-money==3.0.0
[22:01:14+0000] Downloading django_money-3.0.0-py3-none-any.whl (34 kB)
[22:01:15+0000] Collecting django-pandas==0.6.6
[22:01:15+0000] Downloading django_pandas-0.6.6-py3-none-any.whl (21 kB)
[22:01:15+0000] Collecting nltk==3.8
[22:01:15+0000] Downloading nltk-3.8-py3-none-any.whl (1.5 MB)
[22:01:15+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.5/1.5 MB 12.8 MB/s eta 0:00:00
[22:01:17+0000] Collecting psycopg2==2.9.5
[22:01:17+0000] Downloading psycopg2-2.9.5.tar.gz (384 kB)
[22:01:17+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 384.3/384.3 kB 6.5 MB/s eta 0:00:00
[22:01:18+0000] Preparing metadata (setup.py): started
[22:01:24+0000] Preparing metadata (setup.py): finished with status 'done'
[22:01:25+0000] Collecting scikit-learn==1.2.0
[22:01:25+0000] Downloading scikit_learn-1.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (9.5 MB)
[22:01:27+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 9.5/9.5 MB 7.0 MB/s eta 0:00:00
[22:01:27+0000] Collecting social-auth-core==4.3.0
[22:01:27+0000] Downloading social_auth_core-4.3.0-py3-none-any.whl (343 kB)
[22:01:27+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 343.0/343.0 kB 5.7 MB/s eta 0:00:00
[22:01:28+0000] Collecting social-auth-app-django==5.0.0
[22:01:28+0000] Downloading social_auth_app_django-5.0.0-py3-none-any.whl (24 kB)
[22:01:28+0000] Collecting whitenoise==6.2.0
[22:01:28+0000] Downloading whitenoise-6.2.0-py3-none-any.whl (19 kB)
[22:01:28+0000] Collecting azure-core<2.0.0,>=1.11.0
[22:01:28+0000] Downloading azure_core-1.26.1-py3-none-any.whl (172 kB)
[22:01:29+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 172.6/172.6 kB 1.9 MB/s eta 0:00:00
[22:01:32+0000] Collecting cryptography>=2.5
[22:01:32+0000] Downloading cryptography-38.0.4-cp36-abi3-manylinux_2_28_x86_64.whl (4.2 MB)
[22:01:33+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.2/4.2 MB 4.0 MB/s eta 0:00:00
[22:01:33+0000] Collecting msal<2.0.0,>=1.12.0
[22:01:33+0000] Downloading msal-1.20.0-py2.py3-none-any.whl (90 kB)
[22:01:34+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 90.0/90.0 kB 1.7 MB/s eta 0:00:00
[22:01:34+0000] Collecting msal-extensions<2.0.0,>=0.3.0
[22:01:34+0000] Downloading msal_extensions-1.0.0-py2.py3-none-any.whl (19 kB)
[22:01:34+0000] Collecting six>=1.12.0
[22:01:34+0000] Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
[22:01:35+0000] Collecting msrest>=0.6.21
[22:01:35+0000] Downloading msrest-0.7.1-py3-none-any.whl (85 kB)
[22:01:35+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 85.4/85.4 kB 2.7 MB/s eta 0:00:00
[22:01:36+0000] Collecting azure-common~=1.1
[22:01:36+0000] Downloading azure_common-1.1.28-py2.py3-none-any.whl (14 kB)
[22:01:36+0000] Collecting pyparsing>=2.0.3
[22:01:36+0000] Downloading pyparsing-3.0.9-py3-none-any.whl (98 kB)
[22:01:36+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 98.3/98.3 kB 830.4 kB/s eta 0:00:00
[22:01:37+0000] Collecting asgiref<4,>=3.5.2
[22:01:37+0000] Downloading asgiref-3.6.0-py3-none-any.whl (23 kB)
[22:01:37+0000] Collecting sqlparse>=0.2.2
[22:01:37+0000] Downloading sqlparse-0.4.3-py3-none-any.whl (42 kB)
[22:01:37+0000] ━━━━━━━━━━━━━━━━━━━━���━━━━━━━━━━━━━━━━━━ 42.8/42.8 kB 868.7 kB/s eta 0:00:00
[22:01:38+0000] Collecting diff-match-patch
[22:01:38+0000] Downloading diff_match_patch-20200713-py3-none-any.whl (61 kB)
[22:01:38+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 61.6/61.6 kB 262.7 kB/s eta 0:00:00
[22:01:39+0000] Collecting tablib[html,ods,xls,xlsx,yaml]>=3.2.1
[22:01:39+0000] Downloading tablib-3.3.0-py3-none-any.whl (48 kB)
[22:01:39+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 48.6/48.6 kB 3.4 MB/s eta 0:00:00
[22:01:39+0000] Requirement already satisfied: setuptools in ./antenv/lib/python3.11/site-packages (from django-money==3.0.0->-r requirements.txt (line 8)) (65.5.0)
[22:01:39+0000] Collecting py-moneyed<3.0,>=2.0
[22:01:39+0000] Downloading py_moneyed-2.0-py3-none-any.whl (11 kB)
[22:01:42+0000] Collecting pandas>=0.14.1
[22:01:42+0000] Downloading pandas-1.5.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.0 MB)
[22:01:44+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 12.0/12.0 MB 7.3 MB/s eta 0:00:00
[22:01:45+0000] Collecting click
[22:01:45+0000] Downloading click-8.1.3-py3-none-any.whl (96 kB)
[22:01:45+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 96.6/96.6 kB 8.5 MB/s eta 0:00:00
[22:01:46+0000] Collecting joblib
[22:01:46+0000] Downloading joblib-1.2.0-py3-none-any.whl (297 kB)
[22:01:46+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 298.0/298.0 kB 9.9 MB/s eta 0:00:00
[22:01:55+0000] Collecting regex>=2021.8.3
[22:01:55+0000] Downloading regex-2022.10.31-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (781 kB)
[22:01:56+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 781.1/781.1 kB 8.8 MB/s eta 0:00:00
[22:01:56+0000] Collecting tqdm
[22:01:56+0000] Downloading tqdm-4.64.1-py2.py3-none-any.whl (78 kB)
[22:01:57+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 78.5/78.5 kB 1.5 MB/s eta 0:00:00
[22:02:01+0000] Collecting numpy>=1.17.3
[22:02:01+0000] Downloading numpy-1.24.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.3 MB)
[22:02:05+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 17.3/17.3 MB 3.7 MB/s eta 0:00:00
[22:02:11+0000] Collecting scipy>=1.3.2
[22:02:11+0000] Downloading scipy-1.9.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (33.4 MB)
[22:02:20+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 33.4/33.4 MB 2.2 MB/s eta 0:00:00
[22:02:25+0000] Collecting threadpoolctl>=2.0.0
[22:02:26+0000] Downloading threadpoolctl-3.1.0-py3-none-any.whl (14 kB)
[22:02:33+0000] Collecting requests>=2.9.1
[22:02:34+0000] Downloading requests-2.28.1-py3-none-any.whl (62 kB)
[22:02:34+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 62.8/62.8 kB 1.1 MB/s eta 0:00:00
[22:02:36+0000] Collecting oauthlib>=1.0.3
[22:02:36+0000] Downloading oauthlib-3.2.2-py3-none-any.whl (151 kB)
[22:02:37+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 151.7/151.7 kB 283.2 kB/s eta 0:00:00
[22:02:38+0000] Collecting requests-oauthlib>=0.6.1
[22:02:39+0000] Downloading requests_oauthlib-1.3.1-py2.py3-none-any.whl (23 kB)
[22:02:40+0000] Collecting PyJWT>=2.0.0
[22:02:41+0000] Downloading PyJWT-2.6.0-py3-none-any.whl (20 kB)
[22:02:42+0000] Collecting defusedxml>=0.5.0rc1
[22:02:42+0000] Downloading defusedxml-0.7.1-py2.py3-none-any.whl (25 kB)
[22:02:43+0000] Collecting python3-openid>=3.0.10
[22:02:43+0000] Downloading python3_openid-3.2.0-py3-none-any.whl (133 kB)
[22:02:43+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 133.7/133.7 kB 4.3 MB/s eta 0:00:00
[22:02:45+0000] Collecting typing-extensions>=4.0.1
[22:02:45+0000] Downloading typing_extensions-4.4.0-py3-none-any.whl (26 kB)
[22:02:47+0000] Collecting cffi>=1.12
[22:02:47+0000] Downloading cffi-1.15.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (462 kB)
[22:02:47+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 462.6/462.6 kB 11.3 MB/s eta 0:00:00
[22:02:48+0000] Collecting portalocker<3,>=1.0
[22:02:48+0000] Downloading portalocker-2.6.0-py2.py3-none-any.whl (15 kB)
[22:02:49+0000] Collecting certifi>=2017.4.17
[22:02:49+0000] Downloading certifi-2022.12.7-py3-none-any.whl (155 kB)
[22:02:49+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 155.3/155.3 kB 7.6 MB/s eta 0:00:00
[22:02:49+0000] Collecting isodate>=0.6.0
[22:02:49+0000] Downloading isodate-0.6.1-py2.py3-none-any.whl (41 kB)
[22:02:49+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 41.7/41.7 kB 3.4 MB/s eta 0:00:00
[22:02:49+0000] Collecting python-dateutil>=2.8.1
[22:02:49+0000] Downloading python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
[22:02:49+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 247.7/247.7 kB 6.4 MB/s eta 0:00:00
[22:02:51+0000] Collecting pytz>=2020.1
[22:02:51+0000] Downloading pytz-2022.7-py2.py3-none-any.whl (499 kB)
[22:02:51+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 499.4/499.4 kB 8.3 MB/s eta 0:00:00
[22:02:51+0000] Collecting babel>=2.8.0
[22:02:51+0000] Downloading Babel-2.11.0-py3-none-any.whl (9.5 MB)
[22:02:53+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 9.5/9.5 MB 6.0 MB/s eta 0:00:00
[22:02:55+0000] Collecting charset-normalizer<3,>=2
[22:02:55+0000] Downloading charset_normalizer-2.1.1-py3-none-any.whl (39 kB)
[22:02:55+0000] Collecting idna<4,>=2.5
[22:02:55+0000] Downloading idna-3.4-py3-none-any.whl (61 kB)
[22:02:55+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 61.5/61.5 kB 5.5 MB/s eta 0:00:00
[22:02:55+0000] Collecting urllib3<1.27,>=1.21.1
[22:02:55+0000] Downloading urllib3-1.26.13-py2.py3-none-any.whl (140 kB)
[22:02:55+0000] ━━━━━━━━━━━━━━━━━━━━━━��━━━━━━━━━━━━━━━━ 140.6/140.6 kB 6.5 MB/s eta 0:00:00
[22:02:56+0000] Collecting markuppy
[22:02:56+0000] Downloading MarkupPy-1.14.tar.gz (6.8 kB)
[22:02:56+0000] Preparing metadata (setup.py): started
[22:03:00+0000] Preparing metadata (setup.py): finished with status 'done'
[22:03:00+0000] Collecting odfpy
[22:03:00+0000] Downloading odfpy-1.4.1.tar.gz (717 kB)
[22:03:00+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 717.0/717.0 kB 9.1 MB/s eta 0:00:00
[22:03:01+0000] Preparing metadata (setup.py): started
[22:03:04+0000] Preparing metadata (setup.py): finished with status 'done'
[22:03:05+0000] Collecting xlrd
[22:03:05+0000] Downloading xlrd-2.0.1-py2.py3-none-any.whl (96 kB)
[22:03:05+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 96.5/96.5 kB 2.3 MB/s eta 0:00:00
[22:03:05+0000] Collecting xlwt
[22:03:05+0000] Downloading xlwt-1.3.0-py2.py3-none-any.whl (99 kB)
[22:03:05+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100.0/100.0 kB 4.6 MB/s eta 0:00:00
[22:03:05+0000] Collecting openpyxl>=2.6.0
[22:03:05+0000] Downloading openpyxl-3.0.10-py2.py3-none-any.whl (242 kB)
[22:03:05+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 242.1/242.1 kB 3.5 MB/s eta 0:00:00
[22:03:06+0000] Collecting pyyaml
[22:03:06+0000] Downloading PyYAML-6.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (757 kB)
[22:03:06+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 757.9/757.9 kB 6.4 MB/s eta 0:00:00
[22:03:07+0000] Collecting pycparser
[22:03:07+0000] Downloading pycparser-2.21-py2.py3-none-any.whl (118 kB)
[22:03:07+0000] ━━━━━━━━━━��━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 118.7/118.7 kB 6.4 MB/s eta 0:00:00
[22:03:07+0000] Collecting et-xmlfile
[22:03:07+0000] Downloading et_xmlfile-1.1.0-py3-none-any.whl (4.7 kB)
[22:03:10+0000] Building wheels for collected packages: bibtexparser, psycopg2, markuppy, odfpy
[22:03:10+0000] Building wheel for bibtexparser (setup.py): started
[22:03:14+0000] Building wheel for bibtexparser (setup.py): finished with status 'done'
[22:03:14+0000] Created wheel for bibtexparser: filename=bibtexparser-1.4.0-py3-none-any.whl size=42430 sha256=6450322fe126d45b0c65cb8ad086e51d3efad3336104acf952ef3deca82de75f
[22:03:14+0000] Stored in directory: /usr/local/share/pip-cache/wheels/6f/0b/a5/e137b1e915340be991a88f0120b60465018f6964c752674f0b
[22:03:14+0000] Building wheel for psycopg2 (setup.py): started
[22:03:18+0000] Building wheel for psycopg2 (setup.py): finished with status 'error'
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [40 lines of output]
/tmp/8dae467aa043c1b/antenv/lib/python3.11/site-packages/setuptools/config/setupcfg.py:508: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead.
warnings.warn(msg, warning_class)
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-cpython-311
creating build/lib.linux-x86_64-cpython-311/psycopg2
copying lib/tz.py -> build/lib.linux-x86_64-cpython-311/psycopg2
copying lib/extras.py -> build/lib.linux-x86_64-cpython-311/psycopg2
copying lib/sql.py -> build/lib.linux-x86_64-cpython-311/psycopg2
copying lib/extensions.py -> build/lib.linux-x86_64-cpython-311/psycopg2
copying lib/pool.py -> build/lib.linux-x86_64-cpython-311/psycopg2
copying lib/errorcodes.py -> build/lib.linux-x86_64-cpython-311/psycopg2
copying lib/_json.py -> build/lib.linux-x86_64-cpython-311/psycopg2
copying lib/__init__.py -> build/lib.linux-x86_64-cpython-311/psycopg2
copying lib/_ipaddress.py -> build/lib.linux-x86_64-cpython-311/psycopg2
copying lib/errors.py -> build/lib.linux-x86_64-cpython-311/psycopg2
copying lib/_range.py -> build/lib.linux-x86_64-cpython-311/psycopg2
running build_ext
building 'psycopg2._psycopg' extension
creating build/temp.linux-x86_64-cpython-311
creating build/temp.linux-x86_64-cpython-311/psycopg
gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC "-DPSYCOPG_VERSION=2.9.5 (dt dec pq3 ext lo64)" -DPSYCOPG_DEBUG=1 -DPG_VERSION_NUM=130007 -DHAVE_LO64=1 -DPSYCOPG_DEBUG=1 -I/tmp/8dae467aa043c1b/antenv/include -I/opt/python/3.11.0/include/python3.11 -I. -I/usr/include/postgresql -I/usr/include/postgresql/13/server -I/usr/include/libxml2 -c psycopg/adapter_asis.c -o build/temp.linux-x86_64-cpython-311/psycopg/adapter_asis.o -Wdeclaration-after-statement
In file included from psycopg/adapter_asis.c:28:
./psycopg/psycopg.h:35:10: fatal error: Python.h: No such file or directory
35 | #include <Python.h>
| ^~~~~~~~~~
compilation terminated.
It appears you are missing some prerequisite to build the package from source.
You may install a binary package by installing 'psycopg2-binary' from PyPI.
If you want to install psycopg2 from source, please install the packages
required for the build and try again.
For further information please check the 'doc/src/install.rst' file (also at
<https://www.psycopg.org/docs/install.html>).
error: command '/usr/bin/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 psycopg2
[22:03:18+0000] Running setup.py clean for psycopg2
[22:03:20+0000] Building wheel for markuppy (setup.py): started
[22:03:24+0000] Building wheel for markuppy (setup.py): finished with status 'done'
[22:03:24+0000] Created wheel for markuppy: filename=MarkupPy-1.14-py3-none-any.whl size=7397 sha256=68a251e550ca5ad567e8caef07737c5e720e700ebf397c7d12797270fd6a5c16
[22:03:24+0000] Stored in directory: /usr/local/share/pip-cache/wheels/0a/df/54/e52cf059f887522a087527251d6976982bcf98c89afc58ce2d
[22:03:24+0000] Building wheel for odfpy (setup.py): started
[22:03:28+0000] Building wheel for odfpy (setup.py): finished with status 'done'
[22:03:28+0000] Created wheel for odfpy: filename=odfpy-1.4.1-py2.py3-none-any.whl size=160672 sha256=2904b2894ddfdb9d848e60edaa847c495da18f114eafd6a7eb704b9fc30011d7
[22:03:28+0000] Stored in directory: /usr/local/share/pip-cache/wheels/4b/4d/6e/b75855c625d2ce60227a99e571c0bf47ec93ac56a09b5a065c
[22:03:28+0000] Successfully built bibtexparser markuppy odfpy
[22:03:28+0000] Failed to build psycopg2
[22:03:33+0000] Installing collected packages: xlwt, pytz, markuppy, azure-common, xlrd, whitenoise, urllib3, typing-extensions, tqdm, threadpoolctl, tablib, sqlparse, six, regex, pyyaml, pyparsing, PyJWT, pycparser, psycopg2, portalocker, oauthlib, numpy, joblib, idna, et-xmlfile, django-crispy-forms, diff-match-patch, defusedxml, click, charset-normalizer, certifi, babel, asgiref, scipy, requests, python3-openid, python-dateutil, py-moneyed, openpyxl, odfpy, nltk, isodate, django, cffi, bibtexparser, scikit-learn, requests-oauthlib, pandas, django-money, django-braces, cryptography, azure-core, social-auth-core, msrest, django-pandas, django-import-export, social-auth-app-django, msal, azure-keyvault-secrets, msal-extensions, azure-identity
[22:03:43+0000] Running setup.py install for psycopg2: started
[22:03:47+0000] Running setup.py install for psycopg2: finished with status 'error'
error: subprocess-exited-with-error
× Running setup.py install for psycopg2 did not run successfully.
│ exit code: 1
╰─> [42 lines of output]
/tmp/8dae467aa043c1b/antenv/lib/python3.11/site-packages/setuptools/config/setupcfg.py:508: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead.
warnings.warn(msg, warning_class)
running install
/tmp/8dae467aa043c1b/antenv/lib/python3.11/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_py
creating build
creating build/lib.linux-x86_64-cpython-311
creating build/lib.linux-x86_64-cpython-311/psycopg2
copying lib/tz.py -> build/lib.linux-x86_64-cpython-311/psycopg2
copying lib/extras.py -> build/lib.linux-x86_64-cpython-311/psycopg2
copying lib/sql.py -> build/lib.linux-x86_64-cpython-311/psycopg2
copying lib/extensions.py -> build/lib.linux-x86_64-cpython-311/psycopg2
copying lib/pool.py -> build/lib.linux-x86_64-cpython-311/psycopg2
copying lib/errorcodes.py -> build/lib.linux-x86_64-cpython-311/psycopg2
copying lib/_json.py -> build/lib.linux-x86_64-cpython-311/psycopg2
copying lib/__init__.py -> build/lib.linux-x86_64-cpython-311/psycopg2
copying lib/_ipaddress.py -> build/lib.linux-x86_64-cpython-311/psycopg2
copying lib/errors.py -> build/lib.linux-x86_64-cpython-311/psycopg2
copying lib/_range.py -> build/lib.linux-x86_64-cpython-311/psycopg2
running build_ext
building 'psycopg2._psycopg' extension
creating build/temp.linux-x86_64-cpython-311
creating build/temp.linux-x86_64-cpython-311/psycopg
gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC "-DPSYCOPG_VERSION=2.9.5 (dt dec pq3 ext lo64)" -DPSYCOPG_DEBUG=1 -DPG_VERSION_NUM=130007 -DHAVE_LO64=1 -DPSYCOPG_DEBUG=1 -I/tmp/8dae467aa043c1b/antenv/include -I/opt/python/3.11.0/include/python3.11 -I. -I/usr/include/postgresql -I/usr/include/postgresql/13/server -I/usr/include/libxml2 -c psycopg/adapter_asis.c -o build/temp.linux-x86_64-cpython-311/psycopg/adapter_asis.o -Wdeclaration-after-statement
In file included from psycopg/adapter_asis.c:28:
./psycopg/psycopg.h:35:10: fatal error: Python.h: No such file or directory
35 | #include <Python.h>
| ^~~~~~~~~~
compilation terminated.
It appears you are missing some prerequisite to build the package from source.
You may install a binary package by installing 'psycopg2-binary' from PyPI.
If you want to install psycopg2 from source, please install the packages
required for the build and try again.
For further information please check the 'doc/src/install.rst' file (also at
<https://www.psycopg.org/docs/install.html>).
error: command '/usr/bin/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: legacy-install-failure
× Encountered error while trying to install package.
╰─> psycopg2
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
[notice] A new release of pip available: 22.3 -> 22.3.1
[notice] To update, run: pip install --upgrade pip
"2022-12-22 22:03:51"|ERROR|[22:00:58+0000] Collecting azure-identity==1.12.0
[22:00:58+0000] Downloading azure_identity-1.12.0-py3-none-any.whl (135 kB)
[22:00:58+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 135.5/135.5 kB 3.3 MB/s eta 0:00:00
[22:00:58+0000] Collecting azure-keyvault-secrets==4.6.0
[22:00:58+0000] Downloading azure_keyvault_secrets-4.6.0-py3-none-any.whl (291 kB)
[22:00:58+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 291.6/291.6 kB 5.7 MB/s eta 0:00:00
[22:00:59+0000] Collecting bibtexparser==1.4.0
[22:00:59+0000] Downloading bibtexparser-1.4.0.tar.gz (51 kB)
[22:00:59+0000] ━━━━━━━━━━━━━━━━━━━━━━━━���━━━━━━━━━━━━━━━ 51.9/51.9 kB 1.4 MB/s eta 0:00:00
[22:00:59+0000] Preparing metadata (setup.py): started
[22:01:04+0000] Preparing metadata (setup.py): finished with status 'done'
[22:01:06+0000] Collecting django<5.0,==4.*
[22:01:06+0000] Downloading Django-4.1.4-py3-none-any.whl (8.1 MB)
[22:01:10+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 8.1/8.1 MB 2.0 MB/s eta 0:00:00
[22:01:12+0000] Collecting django-braces==1.15.0
[22:01:12+0000] Downloading django_braces-1.15.0-py2.py3-none-any.whl (14 kB)
[22:01:12+0000] Collecting django-crispy-forms==1.14.0
[22:01:12+0000] Downloading django_crispy_forms-1.14.0-py3-none-any.whl (133 kB)
[22:01:12+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 133.3/133.3 kB 6.6 MB/s eta 0:00:00
[22:01:13+0000] Collecting django-import-export==3.0.2
[22:01:14+0000] Downloading django_import_export-3.0.2-py3-none-any.whl (104 kB)
[22:01:14+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 104.0/104.0 kB 2.5 MB/s eta 0:00:00
[22:01:14+0000] Collecting django-money==3.0.0
[22:01:14+0000] Downloading django_money-3.0.0-py3-none-any.whl (34 kB)
[22:01:15+0000] Collecting django-pandas==0.6.6
[22:01:15+0000] Downloading django_pandas-0.6.6-py3-none-any.whl (21 kB)
[22:01:15+0000] Collecting nltk==3.8
[22:01:15+0000] Downloading nltk-3.8-py3-none-any.whl (1.5 MB)
[22:01:15+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.5/1.5 MB 12.8 MB/s eta 0:00:00
[22:01:17+0000] Collecting psycopg2==2.9.5
[22:01:17+0000] Downloading psycopg2-2.9.5.tar.gz (384 kB)
[22:01:17+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 384.3/384.3 kB 6.5 MB/s eta 0:00:00
[22:01:18+0000] Preparing metadata (setup.py): started
[22:01:24+0000] Preparing metadata (setup.py): finished with status 'done'
[22:01:25+0000] Collecting scikit-learn==1.2.0
[22:01:25+0000] Downloading scikit_learn-1.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (9.5 MB)
[22:01:27+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 9.5/9.5 MB 7.0 MB/s eta 0:00:00
[22:01:27+0000] Collecting social-auth-core==4.3.0
[22:01:27+0000] Downloading social_auth_core-4.3.0-py3-none-any.whl (343 kB)
[22:01:27+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 343.0/343.0 kB 5.7 MB/s eta 0:00:00
[22:01:28+0000] Collecting social-auth-app-django==5.0.0
[22:01:28+0000] Downloading social_auth_app_django-5.0.0-py3-none-any.whl (24 kB)
[22:01:28+0000] Collecting whitenoise==6.2.0
[22:01:28+0000] Downloading whitenoise-6.2.0-py3-none-any.whl (19 kB)
[22:01:28+0000] Collecting azure-core<2.0.0,>=1.11.0
[22:01:28+0000] Downloading azure_core-1.26.1-py3-none-any.whl (172 kB)
[22:01:29+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 172.6/172.6 kB 1.9 MB/s eta 0:00:00
[22:01:32+0000] Collecting cryptography>=2.5
[22:01:32+0000] Downloading cryptography-38.0.4-cp36-abi3-manylinux_2_28_x86_64.whl (4.2 MB)
[22:01:33+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.2/4.2 MB 4.0 MB/s eta 0:00:00
[22:01:33+0000] Collecting msal<2.0.0,>=1.12.0
[22:01:33+0000] Downloading msal-1.20.0-py2.py3-none-any.whl (90 kB)
[22:01:34+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 90.0/90.0 kB 1.7 MB/s eta 0:00:00
[22:01:34+0000] Collecting msal-extensions<2.0.0,>=0.3.0
[22:01:34+0000] Downloading msal_extensions-1.0.0-py2.py3-none-any.whl (19 kB)
[22:01:34+0000] Collecting six>=1.12.0
[22:01:34+0000] Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
[22:01:35+0000] Collecting msrest>=0.6.21
[22:01:35+0000] Downloading msrest-0.7.1-py3-none-any.whl (85 kB)
[22:01:35+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 85.4/85.4 kB 2.7 MB/s eta 0:00:00
[22:01:36+0000] Collecting azure-common~=1.1
[22:01:36+0000] Downloading azure_common-1.1.28-py2.py3-none-any.whl (14 kB)
[22:01:36+0000] Collecting pyparsing>=2.0.3
[22:01:36+0000] Downloading pyparsing-3.0.9-py3-none-any.whl (98 kB)
[22:01:36+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 98.3/98.3 kB 830.4 kB/s eta 0:00:00
[22:01:37+0000] Collecting asgiref<4,>=3.5.2
[22:01:37+0000] Downloading asgiref-3.6.0-py3-none-any.whl (23 kB)
[22:01:37+0000] Collecting sqlparse>=0.2.2
[22:01:37+0000] Downloading sqlparse-0.4.3-py3-none-any.whl (42 kB)
[22:01:37+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 42.8/42.8 kB 868.7 kB/s eta 0:00:00
[22:01:38+0000] Collecting diff-match-patch
[22:01:38+0000] Downloading diff_match_patch-20200713-py3-none-any.whl (61 kB)
[22:01:38+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 61.6/61.6 kB 262.7 kB/s eta 0:00:00
[22:01:39+0000] Collecting tablib[html,ods,xls,xlsx,yaml]>=3.2.1
[22:01:39+0000] Downloading tablib-3.3.0-py3-none-any.whl (48 kB)
[22:01:39+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 48.6/48.6 kB 3.4 MB/s eta 0:00:00
[22:01:39+0000] Requirement already satisfied: setuptools in ./antenv/lib/python3.11/site-packages (from django-money==3.0.0->-r requirements.txt (line 8)) (65.5.0)
[22:01:39+0000] Collecting py-moneyed<3.0,>=2.0
[22:01:39+0000] Downloading py_moneyed-2.0-py3-none-any.whl (11 kB)
[22:01:42+0000] Collecting pandas>=0.14.1
[22:01:42+0000] Downloading pandas-1.5.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.0 MB)
[22:01:44+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 12.0/12.0 MB 7.3 MB/s eta 0:00:00
[22:01:45+0000] Collecting click
[22:01:45+0000] Downloading click-8.1.3-py3-none-any.whl (96 kB)
[22:01:45+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 96.6/96.6 kB 8.5 MB/s eta 0:00:00
[22:01:46+0000] Collecting joblib
[22:01:46+0000] Downloading joblib-1.2.0-py3-none-any.whl (297 kB)
[22:01:46+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 298.0/298.0 kB 9.9 MB/s eta 0:00:00
[22:01:55+0000] Collecting regex>=2021.8.3
[22:01:55+0000] Downloading regex-2022.10.31-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (781 kB)
[22:01:56+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 781.1/781.1 kB 8.8 MB/s eta 0:00:00
[22:01:56+0000] Collecting tqdm
[22:01:56+0000] Downloading tqdm-4.64.1-py2.py3-none-any.whl (78 kB)
[22:01:57+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 78.5/78.5 kB 1.5 MB/s eta 0:00:00
[22:02:01+0000] Collecting numpy>=1.17.3
[22:02:01+0000] Downloading numpy-1.24.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.3 MB)
[22:02:05+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 17.3/17.3 MB 3.7 MB/s eta 0:00:00
[22:02:11+0000] Collecting scipy>=1.3.2
[22:02:11+0000] Downloading scipy-1.9.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (33.4 MB)
[22:02:20+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 33.4/33.4 MB 2.2 MB/s eta 0:00:00
[22:02:25+0000] Collecting threadpoolctl>=2.0.0
[22:02:26+0000] Downloading threadpoolctl-3.1.0-py3-none-any.whl (14 kB)
[22:02:33+0000] Collecting requests>=2.9.1
[22:02:34+0000] Downloading requests-2.28.1-py3-none-any.whl (62 kB)
[22:02:34+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 62.8/62.8 kB 1.1 MB/s eta 0:00:00
[22:02:36+0000] Collecting oauthlib>=1.0.3
[22:02:36+0000] Downloading oauthlib-3.2.2-py3-none-any.whl (151 kB)
[22:02:37+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 151.7/151.7 kB 283.2 kB/s eta 0:00:00
[22:02:38+0000] Collecting requests-oauthlib>=0.6.1
[22:02:39+0000] Downloading requests_oauthlib-1.3.1-py2.py3-none-any.whl (23 kB)
[22:02:40+0000] Collecting PyJWT>=2.0.0
[22:02:41+0000] Downloading PyJWT-2.6.0-py3-none-any.whl (20 kB)
[22:02:42+0000] Collecting defusedxml>=0.5.0rc1
[22:02:42+0000] Downloading defusedxml-0.7.1-py2.py3-none-any.whl (25 kB)
[22:02:43+0000] Collecting python3-openid>=3.0.10
[22:02:43+0000] Downloading python3_openid-3.2.0-py3-none-any.whl (133 kB)
[22:02:43+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 133.7/133.7 kB 4.3 MB/s eta 0:00:00
[22:02:45+0000] Collecting typing-extensions>=4.0.1
[22:02:45+0000] Downloading typing_extensions-4.4.0-py3-none-any.whl (26 kB)
[22:02:47+0000] Collecting cffi>=1.12
[22:02:47+0000] Downloading cffi-1.15.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (462 kB)
[22:02:47+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 462.6/462.6 kB 11.3 MB/s eta 0:00:00
[22:02:48+0000] Collecting portalocker<3,>=1.0
[22:02:48+0000] Downloading portalocker-2.6.0-py2.py3-none-any.whl (15 kB)
[22:02:49+0000] Collecting certifi>=2017.4.17
[22:02:49+0000] Downloading certifi-2022.12.7-py3-none-any.whl (155 kB)
[22:02:49+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 155.3/155.3 kB 7.6 MB/s eta 0:00:00
[22:02:49+0000] Collecting isodate>=0.6.0
[22:02:49+0000] Downloading isodate-0.6.1-py2.py3-none-any.whl (41 kB)
[22:02:49+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 41.7/41.7 kB 3.4 MB/s eta 0:00:00
[22:02:49+0000] Collecting python-dateutil>=2.8.1
[22:02:49+0000] Downloading python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
[22:02:49+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 247.7/247.7 kB 6.4 MB/s eta 0:00:00
[22:02:51+0000] Collecting pytz>=2020.1
[22:02:51+0000] Downloading pytz-2022.7-py2.py3-none-any.whl (499 kB)
[22:02:51+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 499.4/499.4 kB 8.3 MB/s eta 0:00:00
[22:02:51+0000] Collecting babel>=2.8.0
[22:02:51+0000] Downloading Babel-2.11.0-py3-none-any.whl (9.5 MB)
[22:02:53+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 9.5/9.5 MB 6.0 MB/s eta 0:00:00
[22:02:55+0000] Collecting charset-normalizer<3,>=2
[22:02:55+0000] Downloading charset_normalizer-2.1.1-py3-none-any.whl (39 kB)
[22:02:55+0000] Collecting idna<4,>=2.5
[22:02:55+0000] Downloading idna-3.4-py3-none-any.whl (61 kB)
[22:02:55+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 61.5/61.5 kB 5.5 MB/s eta 0:00:00
[22:02:55+0000] Collecting urllib3<1.27,>=1.21.1
[22:02:55+0000] Downloading urllib3-1.26.13-py2.py3-none-any.whl (140 kB)
[22:02:55+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 140.6/140.6 kB 6.5 MB/s eta 0:00:00
[22:02:56+0000] Collecting markuppy
[22:02:56+0000] Downloading MarkupPy-1.14.tar.gz (6.8 kB)
[22:02:56+0000] Preparing metadata (setup.py): started
[22:03:00+0000] Preparing metadata (setup.py): finished with status 'done'
[22:03:00+0000] Collecting odfpy
[22:03:00+0000] Downloading odfpy-1.4.1.tar.gz (717 kB)
[22:03:00+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 717.0/717.0 kB 9.1 MB/s eta 0:00:00
[22:03:01+0000] Preparing metadata (setup.py): started
[22:03:04+0000] Preparing metadata (setup.py): finished with status 'done'
[22:03:05+0000] Collecting xlrd
[22:03:05+0000] Downloading xlrd-2.0.1-py2.py3-none-any.whl (96 kB)
[22:03:05+0000] ━━━━━━━━━━━━━━━���━━━━━━━━━━━━━━━━━━━━━━━━ 96.5/96.5 kB 2.3 MB/s eta 0:00:00
[22:03:05+0000] Collecting xlwt
[22:03:05+0000] Downloading xlwt-1.3.0-py2.py3-none-any.whl (99 kB)
[22:03:05+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100.0/100.0 kB 4.6 MB/s eta 0:00:00
[22:03:05+0000] Collecting openpyxl>=2.6.0
[22:03:05+0000] Downloading openpyxl-3.0.10-py2.py3-none-any.whl (242 kB)
[22:03:05+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 242.1/242.1 kB 3.5 MB/s eta 0:00:00
[22:03:06+0000] Collecting pyyaml
[22:03:06+0000] Downloading PyYAML-6.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (757 kB)
[22:03:06+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 757.9/757.9 kB 6.4 MB/s eta 0:00:00
[22:03:07+0000] Collecting pycparser
[22:03:07+0000] Downloading pycparser-2.21-py2.py3-none-any.whl (118 kB)
[22:03:07+0000] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 118.7/118.7 kB 6.4 MB/s eta 0:00:00
[22:03:07+0000] Collecting et-xmlfile
[22:03:07+0000] Downloading et_xmlfile-1.1.0-py3-none-any.whl (4.7 kB)
[22:03:10+0000] Building wheels for collected packages: bibtexparser, psycopg2, markuppy, odfpy
[22:03:10+0000] Building wheel for bibtexparser (setup.py): started
[22:03:14+0000] Building wheel for bibtexparser (setup.py): finished with status 'done'
[22:03:14+0000] Created wheel for bibtexparser: filename=bibtexparser-1.4.0-py3-none-any.whl size=42430 sha256=6450322fe126d45b0c65cb8ad086e51d3efad3336104acf952ef3deca82de75f
[22:03:14+0000] Stored in directory: /usr/local/share/pip-cache/wheels/6f/0b/a5/e137b1e915340be991a88f0120b60465018f6964c752674f0b
[22:03:14+0000] Building wheel for psycopg2 (setup.py): started
[22:03:18+0000] Building wheel for psycopg2 (setup.py): finished with status 'error'
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [40 lines of output]
/tmp/8dae467aa043c1b/antenv/lib/python3.11/site-packages/setuptools/config/setupcfg.py:508: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead.
warnings.warn(msg, warning_class)
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-cpython-311
creating build/lib.linux-x86_64-cpython-311/psycopg2
copying lib/tz.py -> build/lib.linux-x86_64-cpython-311/psycopg2
copying lib/extras.py -> build/lib.linux-x86_64-cpython-311/psycopg2
copying lib/sql.py -> build/lib.linux-x86_64-cpython-311/psycopg2
copying lib/extensions.py -> build/lib.linux-x86_64-cpython-311/psycopg2
copying lib/pool.py -> build/lib.linux-x86_64-cpython-311/psycopg2
copying lib/errorcodes.py -> build/lib.linux-x86_64-cpython-311/psycopg2
copying lib/_json.py -> build/lib.linux-x86_64-cpython-311/psycopg2
copying lib/__init__.py -> build/lib.linux-x86_64-cpython-311/psycopg2
copying lib/_ipaddress.py -> build/lib.linux-x86_64-cpython-311/psycopg2
copying lib/errors.py -> build/lib.linux-x86_64-cpython-311/psycopg2
copying lib/_range.py -> build/lib.linux-x86_64-cpython-311/psycopg2
running build_ext
building 'psycopg2._psycopg' extension
creating build/temp.linux-x86_64-cpython-311
creating build/temp.linux-x86_64-cpython-311/psycopg
gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC "-DPSYCOPG_VERSION=2.9.5 (dt dec pq3 ext lo64)" -DPSYCOPG_DEBUG=1 -DPG_VERSION_NUM=130007 -DHAVE_LO64=1 -DPSYCOPG_DEBUG=1 -I/tmp/8dae467aa043c1b/antenv/include -I/opt/python/3.11.0/include/python3.11 -I. -I/usr/include/postgresql -I/usr/include/postgresql/13/server -I/usr/include/libxml2 -c psycopg/adapter_asis.c -o build/temp.linux-x86_64-cpython-311/psycopg/adapter_asis.o -Wdeclaration-after-statement
In file included from psycopg/adapter_asis.c:28:
./psycopg/psycopg.h:35:10: fatal error: Python.h: No such file or directory
35 | #include <Python.h>
| ^~~~~~~~~~
compilation terminated.
It appears you are missing some prerequisite to build the package from source.
You may install a binary package by installing 'psycopg2-binary' from PyPI.
If you want to install psycopg2 from source, please install the packages
required for the build and try again.
For further information please check the 'doc/src/install.rst' file (also at
<https://www.psycopg.org/docs/install.html>).
error: command '/usr/bin/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 psycopg2
[22:03:18+0000] Running setup.py clean for psycopg2
[22:03:20+0000] Building wheel for markuppy (setup.py): started
[22:03:24+0000] Building wheel for markuppy (setup.py): finished with status 'done'
[22:03:24+0000] Created wheel for markuppy: filename=MarkupPy-1.14-py3-none-any.whl size=7397 sha256=68a251e550ca5ad567e8caef07737c5e720e700ebf397c7d12797270fd6a5c16
[22:03:24+0000] Stored in directory: /usr/local/share/pip-cache/wheels/0a/df/54/e52cf059f887522a087527251d6976982bcf98c89afc58ce2d
[22:03:24+0000] Building wheel for odfpy (setup.py): started
[22:03:28+0000] Building wheel for odfpy (setup.py): finished with status 'done'
[22:03:28+0000] Created wheel for odfpy: filename=odfpy-1.4.1-py2.py3-none-any.whl size=160672 sha256=2904b2894ddfdb9d848e60edaa847c495da18f114eafd6a7eb704b9fc30011d7
[22:03:28+0000] Stored in directory: /usr/local/share/pip-cache/wheels/4b/4d/6e/b75855c625d2ce60227a99e571c0bf47ec93ac56a09b5a065c
[22:03:28+0000] Successfully built bibtexparser markuppy odfpy
[22:03:28+0000] Failed to build psycopg2
[22:03:33+0000] Installing collected packages: xlwt, pytz, markuppy, azure-common, xlrd, whitenoise, urllib3, typing-extensions, tqdm, threadpoolctl, tablib, sqlparse, six, regex, pyyaml, pyparsing, PyJWT, pycparser, psycopg2, portalocker, oauthlib, numpy, joblib, idna, et-xmlfile, django-crispy-forms, diff-match-patch, defusedxml, click, charset-normalizer, certifi, babel, asgiref, scipy, requests, python3-openid, python-dateutil, py-moneyed, openpyxl, odfpy, nltk, isodate, django, cffi, bibtexparser, scikit-learn, requests-oauthlib, pandas, django-money, django-braces, cryptography, azure-core, social-auth-core, msrest, django-pandas, django-import-export, social-auth-app-django, msal, azure-keyvault-secrets, msal-extensions, azure-identity
[22:03:43+0000] Running setup.py install for psycopg2: started
[22:03:47+0000] Running setup.py install for psycopg2: finished with status 'error'
error: subprocess-exited-with-error
× Running setup.py install for psycopg2 did not run successfully.
│ exit code: 1
╰─> [42 lines of output]
/tmp/8dae467aa043c1b/antenv/lib/python3.11/site-packages/setuptools/config/setupcfg.py:508: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead.
warnings.warn(msg, warning_class)
running install
/tmp/8dae467aa043c1b/antenv/lib/python3.11/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_py
creating build
creating build/lib.linux-x86_64-cpython-311
creating build/lib.linux-x86_64-cpython-311/psycopg2
copying lib/tz.py -> build/lib.linux-x86_64-cpython-311/psycopg2
copying lib/extras.py -> build/lib.linux-x86_64-cpython-311/psycopg2
copying lib/sql.py -> build/lib.linux-x86_64-cpython-311/psycopg2
copying lib/extensions.py -> build/lib.linux-x86_64-cpython-311/psycopg2
copying lib/pool.py -> build/lib.linux-x86_64-cpython-311/psycopg2
copying lib/errorcodes.py -> build/lib.linux-x86_64-cpython-311/psycopg2
copying lib/_json.py -> build/lib.linux-x86_64-cpython-311/psycopg2
copying lib/__init__.py -> build/lib.linux-x86_64-cpython-311/psycopg2
copying lib/_ipaddress.py -> build/lib.linux-x86_64-cpython-311/psycopg2
copying lib/errors.py -> build/lib.linux-x86_64-cpython-311/psycopg2
copying lib/_range.py -> build/lib.linux-x86_64-cpython-311/psycopg2
running build_ext
building 'psycopg2._psycopg' extension
creating build/temp.linux-x86_64-cpython-311
creating build/temp.linux-x86_64-cpython-311/psycopg
gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC "-DPSYCOPG_VERSION=2.9.5 (dt dec pq3 ext lo64)" -DPSYCOPG_DEBUG=1 -DPG_VERSION_NUM=130007 -DHAVE_LO64=1 -DPSYCOPG_DEBUG=1 -I/tmp/8dae467aa043c1b/antenv/include -I/opt/python/3.11.0/include/python3.11 -I. -I/usr/include/postgresql -I/usr/include/postgresql/13/server -I/usr/include/libxml2 -c psycopg/adapter_asis.c -o build/temp.linux-x86_64-cpython-311/psycopg/adapter_asis.o -Wdeclaration-after-statement
In file included from psycopg/adapter_asis.c:28:
./psycopg/psycopg.h:35:10: fatal error: Python.h: No such file or directory
35 | #include <Python.h>
| ^~~~~~~~~~
compilation terminated.
It appears you are missing some prerequisite to build the package from source.
You may install a binary package by installing 'psycopg2-binary' from PyPI.
If you want to install psycopg2 from source, please install the packages
required for the build and try again.
For further information please check the 'doc/src/install.rst' file (also at
<https://www.psycopg.org/docs/install.html>).
error: command '/usr/bin/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: legacy-install-failure
× Encountered error while trying to install package.
╰─> psycopg2
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
[notice] A new release of pip available: 22.3 -> 22.3.1
[notice] To update, run: pip install --upgrade pip | Exit code: 1 | Please review your requirements.txt | More information: https://aka.ms/troubleshoot-python
\n/bin/bash -c "oryx build /home/site/repository -o /home/site/wwwroot --platform python --platform-version 3.11 -p virtualenv_name=antenv --log-file /tmp/build-debug.log -i /tmp/8dae467aa043c1b --compress-destination-dir | tee /tmp/oryx-build.log ; exit $PIPESTATUS " |
(Adding @cormacpayne) Also, is this a new issue, or did it appear after you upgraded to a new version of Python on Azure Web Apps? We have a couple of samples that rely on psycopg2 in our repo, but they are not targeting the same version as you do. @cormacpayne If the extra questions above don't help, maybe it would be easy to just upgrade the samples and run tests to understand where the issue might be? |
I also got this error today:
I got it when deploying https://github.com/pamelafox/cookiecutter-django-output/tree/44240a985bce6eeb92c46b0c6cf07eae66316752 It was strange as it started happening suddenly (when I hadn't made any psycopg related changes) and then stopped happening. Deployment Center logs is no longer showing me the failed deploys, so I can't paste the full logs, but it was basically the error above. I don't know what would cause intermittent failure to build psycopg, I'll report with more details if it happens again. |
Replicated! Deployment logs:
That's with the repo at this state: And running 'azd up' and check deployment center logs after. |
I am seeing this same 'Python.h' error as well. It looks like my last successful build used python 3.10.8, and builds with version 3.10.9 are failing. I had this problem with the "hiredis" package until I upgraded it from version 2.0.0 to 2.1.0 (which caused it to use a wheel), and I was seeing this with psycopg2. I downgraded my app to python 3.9 for the time being and it works. It looks like my last few successful builds in 3.10.8 were using a cached wheel for this package. Now, it is trying to use the source distribution. |
As a workaround for now, I am using |
I am seeing the same with 3.10.9 as of yesterday, and I have not changed the version python, psycopg2, or anything else. |
Well, I'm having this exactly error but using Python 3.11.1 Azure App Service and using psycopg2-binary 2.9.5.
I've been struggling to make my app run without any problems 'cause I have other apps running normally, but in Python3.9, so I found some issues that I may be interesting:
So with all this in hands, I have two options:
Taking both ways, I was still getting the same error above, so I had tried to downgrade my psycopg2-binary. And after downgrading my libpq5 and installing python-dev to my OS, I was still getting no errors using a local virtual environment. So, my only way was to Dockerize my application and try to mirror all App Service softwares version. And using the same configs in my container I found out that using Debian 11, Python 3.11.1 and psycopg2-binary 2.9.5 you still having this same error. I had done an image with the same Debian and psycopg2-binary versions, but with Python 3.9, and it worked just fine. So just to be clear: I have almost no knowledge on module files and configuration stuff so I'm not sure about nothing, but in my experience the problem was the Python version. I downgraded to 3.9 and had no issues. |
In my case, I'm deploying to debian bullseye with python 3.10.4. The invocation of # ls -l /opt/python/
total 4
lrwxrwxrwx 1 root root 4 Aug 25 18:08 3 -> 3.10
lrwxrwxrwx 1 root root 6 Aug 25 18:08 3.10 -> 3.10.4
drwxr-xr-x 13 root root 4096 Aug 1 20:44 3.10.4 So am I expected to adjust ccflags somehow? I'm not even entirely sure how the includes are being set. I gather from #1330 that Oryx uses fixed internal versions of python, but what I am I supposed to do to get it to jibe with my deployment target? I suppose I could manually symlink a fake 3.10.9 path, but that's awful. It seems like if I can just set the right path, everything will be fine. |
Hi Team, May we try setting the following environment variable: Oryx currently downloads SDKs into a |
I tried setting
|
There are 2 separate issues here.
For 1, there is a more permanent fix, but to unblock anyone here is a workaround:
python3.11 -m gunicorn --workers 2 --threads 4 --timeout 60 --access-logfile \
'-' --error-logfile '-' --bind=0.0.0.0:8000 \
--chdir=/home/site/wwwroot project.wsgi -c gunicorn.conf.py For 2, you need to use a wheel distribution where available for now |
Hi Team, the Issue 1 will be rolled out by @waliMSFT. Thank you for your patience. |
I usually don't read comments without any "good emojis". But I was so desperated that I have to read this. Your comment saved my life. I was also trying to deploy to Azure Web App, and same problem occured. Thanks a lot! |
➜ pip install ping × python setup.py egg_info did not run successfully. note: This error originates from a subprocess, and is likely not a problem with pip. × Encountered error while generating package metadata. note: This is an issue with the package mentioned above, not pip. |
You can use the binary version. Simpy install it using the following command: |
Thankyou so much for saving my life. My boss was torturing me everday for this issue. They also want me to give back my salary of all those 2 years and also want to hold my property and cars. Can i have your patreon i want to support you work. Thankyou i will also request my boss to make you the teamlead in our california branch. |
This issue seems resolved. Will be closing this issue. If this is still relevant and impacting you please open a new issue and link back to this issue for reference. |
Bug Report
At what date and time did you most recently experience the problem?
2022-12-22T15:52:45.994388013Z
Where did you experience the problem? E.g. Azure Web Apps, Azure Functions, Azure Container Registry, or offline use.
Azure Web Apps
If your repo is publicly available please share its URL:
Private 🚫
What happened?
ModuleNotFoundError: No module named 'psycopg2._psycopg'
What did you expect or want to happen?
Successful loading of the Web App
How can we reproduce it?
🤷♂️
Do you have log output? Please include between the backticks:
Please complete the following information
See also
The text was updated successfully, but these errors were encountered: