Installing psycopg2==2.8.6 throws an error - python

I have my website deployed in heroku which uses psycopg2 and when I upgrade version 2.8.6 --> 2.9.1 and greater then it throws an error that database connection isn't set to UTC.
And when I tried to install packages from my requirements.txt which consist psycopg2==2.8.6 (using python virtualenv in windows) then it throws following error
Using cached psycopg2-2.8.6.tar.gz (383 kB)
ERROR: Command errored out with exit status 1:
command: 'A:\Projects\django\tmp_env\Scripts\python.exe' -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Amar K\\AppData\\Local\\Temp\\pip-install-ss0ajkyw\\psycopg2_60877ad816f94182b98212026f2b8d09\\setup.py'"'"'; __file__='"'"'C:\\Users\\Amar K\\AppData\\Local\\Temp\\pip-install-ss0ajkyw\\psycopg2_60877ad816f94182b98212026f2b8d09\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\Amar K\AppData\Local\Temp\pip-pip-egg-info-pwtcfhhf'
cwd: C:\Users\Amar K\AppData\Local\Temp\pip-install-ss0ajkyw\psycopg2_60877ad816f94182b98212026f2b8d09\
Complete output (23 lines):
running egg_info
creating C:\Users\Amar K\AppData\Local\Temp\pip-pip-egg-info-pwtcfhhf\psycopg2.egg-info
writing C:\Users\Amar K\AppData\Local\Temp\pip-pip-egg-info-pwtcfhhf\psycopg2.egg-info\PKG-INFO
writing dependency_links to C:\Users\Amar K\AppData\Local\Temp\pip-pip-egg-info-pwtcfhhf\psycopg2.egg-info\dependency_links.txt
writing top-level names to C:\Users\Amar K\AppData\Local\Temp\pip-pip-egg-info-pwtcfhhf\psycopg2.egg-info\top_level.txt
writing manifest file 'C:\Users\Amar K\AppData\Local\Temp\pip-pip-egg-info-pwtcfhhf\psycopg2.egg-info\SOURCES.txt'
Error: pg_config executable not found.
pg_config is required to build psycopg2 from source. Please add the directory
containing pg_config to the $PATH or specify the full executable path with the
option:
python setup.py build_ext --pg-config /path/to/pg_config build ...
For further information please check the 'doc/src/install.rst' file (also at
<https://www.psycopg.org/docs/install.html>).
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/fd/ae/98cb7a0cbb1d748ee547b058b14604bd0e9bf285a8e0cc5d148f8a8a952e/psycopg2-2.8.6.tar.gz#sha256=fb23f6c71107c37fd667cb4ea363ddeb936b348bbd6449278eb92c189699f543 (from https://pypi.org/simple/psycopg2/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement psycopg2==2.8.6 (from versions: 2.0.10, 2.0.11, 2.0.12, 2.0.13, 2.0.14, 2.2.0, 2.2.1, 2.2.2, 2.3.0, 2.3.1, 2.3.2, 2.4, 2.4.1, 2.4.2, 2.4.3, 2.4.4, 2.4.5, 2.4.6, 2.5, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.5.5, 2.6, 2.6.1, 2.6.2, 2.7, 2.7.1, 2.7.2, 2.7.3, 2.7.3.1, 2.7.3.2, 2.7.4, 2.7.5, 2.7.6, 2.7.6.1, 2.7.7, 2.8, 2.8.1, 2.8.2, 2.8.3, 2.8.4, 2.8.5, 2.8.6, 2.9, 2.9.1, 2.9.2, 2.9.3, 2.9.4, 2.9.5)ERROR: No matching distribution found for psycopg2==2.8.6
my requirements.txt
asgiref==3.3.4
autopep8==2.0.1
certifi==2020.12.5
cffi==1.15.1
chardet==3.0.4
charset-normalizer==2.0.12
click==8.0.1
cloudscraper==1.2.58
colorama==0.4.4
cryptography==3.4.7
defusedxml==0.7.1
diff-match-patch==20200713
dj-database-url==0.5.0
Django==3.0.7
django-environ==0.9.0
django-heroku==0.3.1
django-import-export==2.7.1
et-xmlfile==1.1.0
flake8==6.0.0
gingerit==0.8.2
googletrans==3.1.0a0
gunicorn==20.1.0
h11==0.9.0
h2==3.2.0
hpack==3.0.0
hstspreload==2020.12.22
httpcore==0.9.1
httpx==0.13.3
hyperframe==5.2.0
idna==2.10
joblib==1.1.1
language-tool-python==2.5.2
MarkupPy==1.14
mccabe==0.7.0
Naked==0.1.31
nltk==3.6.3
numpy==1.24.1
oauthlib==3.1.1
odfpy==1.4.1
openpyxl==3.0.10
Pillow==8.4.0
psycopg2==2.8.6
pybase64==1.2.0
pycodestyle==2.10.0
pycparser==2.20
pycryptodome==3.11.0
pyflakes==3.0.1
PyJWT==2.1.0
pyparsing==3.0.7
pytesseract==0.3.8
python3-openid==3.2.0
pytz==2021.1
PyYAML==6.0
rake-nltk==1.0.6
regex==2021.9.24
requests==2.27.1
requests-oauthlib==1.3.0
requests-toolbelt==0.9.1
rfc3986==1.4.0
scikit-learn==1.2.0
scipy==1.9.3
shellescape==3.8.1
six==1.16.0
sniffio==1.2.0
social-auth-app-django==4.0.0
social-auth-core==4.1.0
SpeechRecognition==3.8.1
sqlparse==0.4.1
tablib==3.3.0
threadpoolctl==3.0.0
tomli==2.0.1
tqdm==4.60.0
urllib3==1.25.11
whitenoise==5.2.0
xlrd==2.0.1
xlwt==1.3.0
I am trying to find solution for this problem that I have mentioned & I did not find solution for this anywhere(there is solution but only for linux os) or if there is then can u share a link.

Related

When I try to run the code provided in a paper, it has following errors related to CVXPY

When I try to run the code provided in a paper, it has the following errors related to CVXPY:
(bayesrace) C:\Users\Lenovo\bayesrace>pip install -e .
Obtaining file:///C:/Users/Lenovo/bayesrace
Collecting pandas==1.0.3
Using cached pandas-1.0.3-cp36-cp36m-win_amd64.whl (8.7 MB)
Collecting cvxpy==1.0.15
Using cached cvxpy-1.0.15.tar.gz (915 kB)
ERROR: Command errored out with exit status 1:
command: 'D:\Anaconda\envs\bayesrace\python.exe' -c 'import io, os, sys, setuptools,
tokenize; sys.argv[0] = '"'"'C:\Users\Lenovo\AppData\Local\Temp\pip-install-hpu8en1_\cvxpy_9e73400b3c3d4e82b6ff31bd1122b730\setup.py'"'"';file='"'"'C:\Users\Lenovo\AppData\Local\Temp\pip-install-hpu8en1_\cvxpy_9e73400b3c3d4e82b6ff31bd1122b730\setup.py'"'"';f = getattr(tokenize,'"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\Lenovo\AppData\Local\Temp\pip-pip-egg-info-hpjhbaju'cwd: C:\Users\Lenovo\AppData\Local\Temp\pip-install-hpu8en1_\cvxpy_9e73400b3c3d4e82b6ff31bd1122b730
Complete output (1 lines):
error in cvxpy setup command: use_2to3 is invalid.
WARNING: Discarding https://files.pythonhosted.org/packages/ab/6f/bcab45a432befe375f056ea31a7cc9c7468d07922768cb63c3dec5733afa/cvxpy-1.0.15.tar.gz#sha256=dff246a3fa03fe5c815f290825345a6ad5ff49df5e1882f123e632a4217bbcd1 (from https://pypi.org/simple/cvxpy/).
Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement cvxpy==1.0.15 (from bayes-race) (from versions: 0.1, 0.2, 0.2.1, 0.2.2, 0.2.3, 0.2.4, 0.2.5, 0.2.6, 0.2.7, 0.2.9, 0.2.10, 0.2.11, 0.2.12, 0.2.13, 0.2.14, 0.2.15, 0.2.16, 0.2.17, 0.2.18, 0.2.19, 0.2.20, 0.2.21, 0.2.22, 0.2.23, 0.2.24, 0.2.25, 0.2.26, 0.2.27, 0.2.28, 0.3.0, 0.3.1, 0.3.3, 0.3.4, 0.3.5, 0.3.6, 0.3.7, 0.3.8, 0.3.9, 0.4.0, 0.4.1, 0.4.2, 0.4.3, 0.4.4, 0.4.5, 0.4.6, 0.4.8, 0.4.9, 0.4.10, 0.4.11, 1.0.2, 1.0.3, 1.0.4, 1.0.5, 1.0.6, 1.0.8, 1.0.9, 1.0.10, 1.0.11, 1.0.12, 1.0.13, 1.0.14, 1.0.15, 1.0.16, 1.0.17, 1.0.18, 1.0.19, 1.0.20, 1.0.21, 1.0.22, 1.0.23, 1.0.24, 1.0.25, 1.0.26, 1.0.27, 1.0.28, 1.0.29, 1.0.31, 1.1.0a0, 1.1.0a1, 1.1.0a2, 1.1.0a3, 1.1.0a4, 1.1.0, 1.1.1, 1.1.2, 1.1.3, 1.1.4, 1.1.5, 1.1.6, 1.1.7, 1.1.8, 1.1.9, 1.1.10, 1.1.11, 1.1.12, 1.1.13, 1.1.14, 1.1.15, 1.1.16, 1.1.17, 1.1.18)
ERROR: No matching distribution found for cvxpy==1.0.15
To Reproduce:
You can find the code for this paper here: https://github.com/jainachin/bayesrace
And I am running the code in the installation section on this page.
When I run the first 4 lines of code, it has no errors, the first 4 lines of code is:
conda create --name bayesrace python=3.6
conda activate bayesrace
git clone https://github.com/jainachin/bayesrace.git
cd bayesrace/
But when I try to run the 5th line of code, that is (pip install -e .), the above errors occurred.
You can also find the bugs/errors image here:
I am using Windows 11.
use_2to3 has been removed from setuptools 58.0 and newer.
However, newer versions (1.1+) of cvxpy don't use the flag.
Primarily, try using a newer version of cvxpy.
If that fails, downgrade your setuptools to a version less than 58.0.

Module Cython not found when installing Kivy 1.10.0

I used pip to install Kivy 1.10.0 (Yes! I need this version, no more, no less). But when I run pip install kivy==1.10.0, I got this:
C:\Users\FlopffyGrape> pip install kivy==1.10.0
Collecting kivy==1.10.0
Using cached Kivy-1.10.0.tar.gz (24.3 MB)
Preparing metadata (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\FlopffyGrape\AppData\Local\Programs\Python\Python39\python.exe' -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\FlopffyGrape\\AppData\\Local\\Temp\\pip-install-iiwz5ycz\\kivy_349a20b557a341848792819dc6f37ede\\setup.py'"'"'; __file__='"'"'C:\\Users\\FlopffyGrape\\AppData\\Local\\Temp\\pip-install-iiwz5ycz\\kivy_349a20b557a341848792819dc6f37ede\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\FlopffyGrape\AppData\Local\Temp\pip-pip-egg-info-fyg82ilx'
cwd: C:\Users\FlopffyGrape\AppData\Local\Temp\pip-install-iiwz5ycz\kivy_349a20b557a341848792819dc6f37ede\
Complete output (14 lines):
C:\Users\FlopffyGrape\AppData\Local\Temp\pip-install-iiwz5ycz\kivy_349a20b557a341848792819dc6f37ede\setup.py:69: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
MIN_CYTHON_VERSION = LooseVersion(MIN_CYTHON_STRING)
C:\Users\FlopffyGrape\AppData\Local\Temp\pip-install-iiwz5ycz\kivy_349a20b557a341848792819dc6f37ede\setup.py:71: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
MAX_CYTHON_VERSION = LooseVersion(MAX_CYTHON_STRING)
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\FlopffyGrape\AppData\Local\Temp\pip-install-iiwz5ycz\kivy_349a20b557a341848792819dc6f37ede\setup.py", line 219, in <module>
from Cython.Distutils import build_ext
ModuleNotFoundError: No module named 'Cython'
Using distutils
Cython is missing, it's required for compiling kivy !
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/8c/49/5c22589099f9b7fd106502ee6634a6675e634d7553fede141a7606e6a92d/Kivy-1.10.0.tar.gz#sha256=28c180fd5e4538858f0d2b3dde53c123d3a898d3ac7fba512bf3b83d0dfc248d (from https://pypi.org/simple/kivy/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement kivy==1.10.0 (from versions: 1.0.1a0, 1.0.2a0, 1.0.3a0, 1.0.4b0, 1.0.5, 1.0.6, 1.0.7, 1.0.8, 1.0.9, 1.1.0, 1.1.1, 1.2.0, 1.3.0, 1.4.0, 1.4.1, 1.5.0, 1.5.1, 1.6.0, 1.7.0, 1.7.1, 1.7.2, 1.8.0, 1.9.0, 1.9.1, 1.10.0, 1.10.1, 1.11.0rc1, 1.11.0rc2, 1.11.0, 1.11.1, 2.0.0rc1, 2.0.0rc2, 2.0.0rc3, 2.0.0rc4, 2.0.0)
ERROR: No matching distribution found for kivy==1.10.0
But Cython is already installed (The version is 0.29.26).
How can I solve this? (I'm using Window 10 and Python 3.9.1)
you should reinstall cython (pip install cython).

Unable to install mysqlclient with pip on ubuntu [duplicate]

This question already has answers here:
pip install mysql-python fails with EnvironmentError: mysql_config not found
(24 answers)
mysql_config not found when installing mysqldb python interface
(36 answers)
Closed 1 year ago.
I'm trying to install mysqlclient on Ubuntu 20.04LTS, the main error is: mysql_config not found.
Whole Error:
$ pip3 install mysqlclient==2.0.3
Defaulting to user installation because normal site-packages is not writeable
Collecting mysqlclient==2.0.3
Using cached mysqlclient-2.0.3.tar.gz (88 kB)
Preparing metadata (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-qr1hc7jz/mysqlclient_1ff152ec2d5d4f14a4e282285faeb229/setup.py'"'"'; _file__='"'"'/tmp/pip-install-qr1hc7jz/mysqlclient_1ff152ec2d5d4f14a4e282285faeb229/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file_) if os.path.exists(_file_) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, _file_, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-ehrlbbbl
cwd: /tmp/pip-install-qr1hc7jz/mysqlclient_1ff152ec2d5d4f14a4e282285faeb229/
Complete output (15 lines):
/bin/sh: 1: mysql_config: not found
/bin/sh: 1: mariadb_config: not found
/bin/sh: 1: mysql_config: not found
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-qr1hc7jz/mysqlclient_1ff152ec2d5d4f14a4e282285faeb229/setup.py", line 15, in <module>
metadata, options = get_config()
File "/tmp/pip-install-qr1hc7jz/mysqlclient_1ff152ec2d5d4f14a4e282285faeb229/setup_posix.py", line 70, in get_config
libs = mysql_config("libs")
File "/tmp/pip-install-qr1hc7jz/mysqlclient_1ff152ec2d5d4f14a4e282285faeb229/setup_posix.py", line 31, in mysql_config
raise OSError("{} not found".format(_mysql_config_path))
OSError: mysql_config not found
mysql_config --version
mariadb_config --version
mysql_config --libs
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/3c/df/59cd2fa5e48d0804d213bdcb1acb4d08c403b61c7ff7ed4dd4a6a2deb3f7/mysqlclient-2.0.3.tar.gz#sha256=f6ebea7c008f155baeefe16c56cd3ee6239f7a5a9ae42396c2f1860f08a7c432 (from https://pypi.org/simple/mysqlclient/) (requires-python:>=3.5). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement mysqlclient==2.0.3 (from versions: 1.3.0, 1.3.1, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.3.6, 1.3.7, 1.3.8, 1.3.9, 1.3.10, 1.3.11rc1, 1.3.11, 1.3.12, 1.3.13, 1.3.14, 1.4.0rc1, 1.4.0rc2, 1.4.0rc3, 1.4.0, 1.4.1, 1.4.2, 1.4.2.post1, 1.4.3, 1.4.4, 1.4.5, 1.4.6, 2.0.0, 2.0.1, 2.0.2, 2.0.3, 2.1.0rc1, 2.1.0)
ERROR: No matching distribution found for mysqlclient==2.0.3
(when trying to pip3 install mysqlclient, the same error apears, but every version tries to install)
You need to install the python3 and MySQL development headers and libraries like in your ubuntu OS,
sudo apt-get install python3-dev default-libmysqlclient-dev build-essential
then install using
pip3 install mysqlclient==2.0.3
I hope this will help you out

Zappa deployment error - troposphere==2.7.1 didn't help AttributeError: 'Template' object has no attribute 'add_description'

I have migrated my python project from 2.7 to 3.8. and I am trying to deploy using zappa.
But, as soon as it's starting updating Lambda function configs it hits this error.
Updating Lambda function configuration..
Oh no! An error occurred! :(
==============
Traceback (most recent call last):
File "/Users/leilakarimi/Projects/ATGWSams/venv/lib/python3.7/site-packages/zappa/cli.py", line 3422, in handle
sys.exit(cli.handle())
File "/Users/leilakarimi/Projects/ATGWSams/venv/lib/python3.7/site-packages/zappa/cli.py", line 588, in handle
self.dispatch_command(self.command, stage)
File "/Users/leilakarimi/Projects/ATGWSams/venv/lib/python3.7/site-packages/zappa/cli.py", line 644, in dispatch_command
self.vargs["docker_image_uri"],
File "/Users/leilakarimi/Projects/ATGWSams/venv/lib/python3.7/site-packages/zappa/cli.py", line 1194, in update
endpoint_configuration=self.endpoint_configuration,
File "/Users/leilakarimi/Projects/ATGWSams/venv/lib/python3.7/site-packages/zappa/core.py", line 2417, in create_stack_template
self.cf_template.add_description("Automatically generated with Zappa")
AttributeError: 'Template' object has no attribute 'add_description'
I found this question and tried to downgrade troposphere as suggested in this post but again I face a new error as below:
ERROR: Command errored out with exit status 1:
command: /Users/leilakarimi/Projects/ATGWSams/venv/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/2q/m5qvgtkj1872r4695zkbpln80000gn/T/pip-install-w9uojyvq/troposphere_527f0b9692da4c9ca1d6451190752408/setup.py'"'"'; __file__='"'"'/private/var/folders/2q/m5qvgtkj1872r4695zkbpln80000gn/T/pip-install-w9uojyvq/troposphere_527f0b9692da4c9ca1d6451190752408/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/2q/m5qvgtkj1872r4695zkbpln80000gn/T/pip-pip-egg-info-hguo5f3y
cwd: /private/var/folders/2q/m5qvgtkj1872r4695zkbpln80000gn/T/pip-install-w9uojyvq/troposphere_527f0b9692da4c9ca1d6451190752408/
Complete output (1 lines):
error in troposphere setup command: use_2to3 is invalid.
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/35/a1/cfb1f6b2f271213da05fd5c67cda0256d7d841ba0edbfa815ae517c6235d/troposphere-2.2.0.tar.gz#sha256=b2e322063e2278e7d69822943d230b683ce9a0438db8ad017f610d344998453d (from https://pypi.org/simple/troposphere/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement troposphere==2.7.1 (from versions: 0.1.2, 0.2.0, 0.3.0, 0.3.2, 0.3.3, 0.3.4, 0.4.0, 0.5.0, 0.6.0, 0.6.1, 0.6.2, 0.7.0, 0.7.1, 0.7.2, 1.0.0, 1.1.0, 1.1.1, 1.1.2, 1.2.0, 1.2.1, 1.2.2, 1.3.0, 1.4.0, 1.5.0, 1.6.0, 1.7.0, 1.8.0, 1.8.1, 1.8.2, 1.9.0, 1.9.1, 1.9.2, 1.9.3, 1.9.4, 1.9.5, 1.9.6, 2.0.0, 2.0.1, 2.0.2, 2.1.0, 2.1.1, 2.1.2, 2.2.0, 2.2.1, 2.2.2, 2.3.0, 2.3.1, 2.3.2, 2.3.3, 2.3.4, 2.4.0, 2.4.1, 2.4.2, 2.4.3, 2.4.4, 2.4.5, 2.4.6, 2.4.7, 2.4.8, 2.4.9, 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.6.0, 2.6.1, 2.6.2, 2.6.3, 2.6.4, 2.7.0, 2.7.1, 3.0.0, 3.0.1, 3.0.2, 3.0.3)
ERROR: No matching distribution found for troposphere==2.7.1
Any thoughts/help is much appreciated.
thanks
setuptools 58 broke support for use_2to3. Therefore, you should add setuptools<58 to your requirements file along with troposphere<3. If you still get the same issue, downgrade setuptools first and then install troposphere with the other requirements.
Related question: Error while downloading the requirements using pip install (setup command: use_2to3 is invalid.)
We have forked zappa and removed the pinned requirement for Werkzeug. Zappa project been restarted but they have been late to update. You can read how to do this at this blog

ERROR: No matching distribution found for psycopg2==2.7.3.2

Im running python container with this command
docker run -p 8888:8888 --name jupyter_notebook -v /home/Data/jupyter_project/:/home/jovyan/work/jupyter_project jupyter/scipy-notebook .
When i tried to install my file requirements.txt on the project i got the error below.
Please who can help me to solve the problem.
ERROR: Command errored out with exit status 1:
command: /opt/conda/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-gei1w7ax/psycopg2_395c58e14f844125b95c77ccccec309d/setup.py'"'"'; __file__='"'"'/tmp/pip-install-gei1w7ax/psycopg2_395c58e14f844125b95c77ccccec309d/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-bkenr2u2
cwd: /tmp/pip-install-gei1w7ax/psycopg2_395c58e14f844125b95c77ccccec309d/
Complete output (14 lines):
running egg_info
creating /tmp/pip-pip-egg-info-bkenr2u2/psycopg2.egg-info
writing /tmp/pip-pip-egg-info-bkenr2u2/psycopg2.egg-info/PKG-INFO
writing dependency_links to /tmp/pip-pip-egg-info-bkenr2u2/psycopg2.egg-info/dependency_links.txt
writing top-level names to /tmp/pip-pip-egg-info-bkenr2u2/psycopg2.egg-info/top_level.txt
writing manifest file '/tmp/pip-pip-egg-info-bkenr2u2/psycopg2.egg-info/SOURCES.txt'
Error: pg_config executable not found.
Please add the directory containing pg_config to the PATH
or specify the full executable path with the option:
python setup.py build_ext --pg-config /path/to/pg_config build ...
or with the pg_config option in 'setup.cfg'.
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/dd/47/000b405d73ca22980684fd7bd3318690cc03cfa3b2ae1c5b7fff8050b28a/psycopg2-2.7.3.2.tar.gz#sha256=5c3213be557d0468f9df8fe2487eaf2990d9799202c5ff5cb8d394d09fad9b2a (from https://pypi.org/simple/psycopg2/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement psycopg2==2.7.3.2 (from versions: 2.0.10, 2.0.11, 2.0.12, 2.0.13, 2.0.14, 2.2.0, 2.2.1, 2.2.2, 2.3.0, 2.3.1, 2.3.2, 2.4, 2.4.1, 2.4.2, 2.4.3, 2.4.4, 2.4.5, 2.4.6, 2.5, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.5.5, 2.6, 2.6.1, 2.6.2, 2.7, 2.7.1, 2.7.2, 2.7.3, 2.7.3.1, 2.7.3.2, 2.7.4, 2.7.5, 2.7.6, 2.7.6.1, 2.7.7, 2.8, 2.8.1, 2.8.2, 2.8.3, 2.8.4, 2.8.5, 2.8.6, 2.9, 2.9.1)
ERROR: No matching distribution found for psycopg2==2.7.3.2
Note: you may need to restart the kernel to use updated packages.
edit
WARNING: Discarding https://files.pythonhosted.org/packages/19/79/35c7596bab4456f3610c12ec542a94d51c6781ced587d1d85127210b879b/psycopg2-2.0.10.tar.gz#sha256=e40cc04b43849085725076ae134bfef9e3b087f6dd7c964aeeb930e2f0bc14ab (from https://pypi.org/simple/psycopg2/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement psycopg2 (from versions: 2.0.10, 2.0.11, 2.0.12, 2.0.13, 2.0.14, 2.2.0, 2.2.1, 2.2.2, 2.3.0, 2.3.1, 2.3.2, 2.4, 2.4.1, 2.4.2, 2.4.3, 2.4.4, 2.4.5, 2.4.6, 2.5, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.5.5, 2.6, 2.6.1, 2.6.2, 2.7, 2.7.1, 2.7.2, 2.7.3, 2.7.3.1, 2.7.3.2, 2.7.4, 2.7.5, 2.7.6, 2.7.6.1, 2.7.7, 2.8, 2.8.1, 2.8.2, 2.8.3, 2.8.4, 2.8.5, 2.8.6, 2.9, 2.9.1)
ERROR: No matching distribution found for psycopg2
Note: you may need to restart the kernel to use updated packages.```
Grateful
try installing this package instead of psycopg2 when using with docker.
pip install psycopg2-binary

Categories

Resources