luke@ubuntuserver:~/syncserver$ pip install psycopg2-binary
Defaulting to user installation because normal site-packages is not writeable
Collecting psycopg2-binary
Downloading psycopg2_binary-2.9.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.0 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.0/3.0 MB 20.3 MB/s eta 0:00:00
Installing collected packages: psycopg2-binary
Successfully installed psycopg2-binary-2.9.6
luke@ubuntuserver:~/syncserver$ sudo make build
Install the latest Python 2 compatible setuptools manually:
which python2 python2.7 python | head -n 1 -m virtualenv --python=which python2 python2.7 python | head -n 1 ./local --no-setuptools
created virtual environment CPython2.7.18.final.0-64 in 174ms
creator CPython2Posix(dest=/home/luke/syncserver/local, clear=False, no_vcs_ignore=False, global=False)
seeder FromAppData(download=False, pip=bundle, wheel=bundle, via=copy, app_data_dir=/root/.local/share/virtualenv)
added seed packages: pip==20.3.4, setuptools==44.1.1, wheel==0.37.1
activators NushellActivator,PythonActivator,FishActivator,CShellActivator,PowerShellActivator,BashActivator
CFLAGS="-Wno-error -Wno-error=format-security" ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future ./local/bin/pip install -U "setuptools<45"
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Requirement already up-to-date: setuptools<45 in ./local/lib/python2.7/site-packages (44.1.1)
CFLAGS="-Wno-error -Wno-error=format-security" ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future ./local/bin/pip install -r requirements.txt
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Collecting https://github.com/mozilla-services/tokenserver/archive/bf5f232ed78fb4eb89909ec5be40f135945aa514.zip (from -r requirements.txt (line 18))
Using cached https://github.com/mozilla-services/tokenserver/archive/bf5f232ed78fb4eb89909ec5be40f135945aa514.zip
Collecting https://github.com/mozilla-services/server-syncstorage/archive/d370a488155adeb80ee6f1bc016a4aa9d009f181.zip (from -r requirements.txt (line 19))
Using cached https://github.com/mozilla-services/server-syncstorage/archive/d370a488155adeb80ee6f1bc016a4aa9d009f181.zip
Collecting gevent==1.4.0
Using cached gevent-1.4.0-cp27-cp27mu-manylinux1_x86_64.whl (5.0 MB)
Collecting greenlet==0.4.14
Using cached greenlet-0.4.14-cp27-cp27mu-manylinux1_x86_64.whl (39 kB)
Collecting cornice==0.16.2
Using cached cornice-0.16.2.tar.gz (45 kB)
Collecting gunicorn==19.10.0
Using cached gunicorn-19.10.0-py2.py3-none-any.whl (113 kB)
Collecting pyramid==1.10.4
Using cached pyramid-1.10.4-py2.py3-none-any.whl (325 kB)
Collecting WebOb==1.8.5
Using cached WebOb-1.8.5-py2.py3-none-any.whl (113 kB)
Collecting requests==2.22.0
Using cached requests-2.22.0-py2.py3-none-any.whl (57 kB)
Collecting SQLAlchemy==1.3.3
Using cached SQLAlchemy-1.3.3.tar.gz (5.9 MB)
Collecting unittest2==1.1
Using cached unittest2-1.1.0-py2.py3-none-any.whl (96 kB)
Collecting zope.component==4.2.1
Using cached zope.component-4.2.1.tar.gz (462 kB)
Collecting configparser==3.7.4
Using cached configparser-3.7.4-py2.py3-none-any.whl (22 kB)
Collecting mozsvc==0.10
Using cached mozsvc-0.10.tar.gz (38 kB)
Collecting futures==3.2
Using cached futures-3.2.0-py2-none-any.whl (15 kB)
Collecting soupsieve==1.9.5
Using cached soupsieve-1.9.5-py2.py3-none-any.whl (33 kB)
Collecting umemcache==1.6.3
Using cached umemcache-1.6.3.zip (26 kB)
Collecting google-cloud-spanner==1.18.0
Using cached google_cloud_spanner-1.18.0-py2.py3-none-any.whl (255 kB)
Collecting psycopg2==2.8.6
Using cached psycopg2-2.8.6.tar.gz (383 kB)
ERROR: Command errored out with exit status 1:
command: /home/luke/syncserver/local/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-rrbX_c/psycopg2/setup.py'"'"'; file='"'"'/tmp/pip-install-rrbX_c/psycopg2/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-8cdsEr
cwd: /tmp/pip-install-rrbX_c/psycopg2/
Complete output (23 lines):
running egg_info
creating /tmp/pip-pip-egg-info-8cdsEr/psycopg2.egg-info
writing /tmp/pip-pip-egg-info-8cdsEr/psycopg2.egg-info/PKG-INFO
writing top-level names to /tmp/pip-pip-egg-info-8cdsEr/psycopg2.egg-info/top_level.txt
writing dependency_links to /tmp/pip-pip-egg-info-8cdsEr/psycopg2.egg-info/dependency_links.txt
writing manifest file '/tmp/pip-pip-egg-info-8cdsEr/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 ...
or with the pg_config option in 'setup.cfg'.
If you prefer to avoid building psycopg2 from source, please install the PyPI
'psycopg2-binary' package instead.
For further information please check the 'doc/src/install.rst' file (also at
<https://www.psycopg.org/docs/install.html>).
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
make: *** [Makefile:31: local/COMPLETE] Error 1
I'm new to linux. What did I do wrong?
luke@ubuntuserver:~/syncserver$ pip install psycopg2-binary Defaulting to user installation because normal site-packages is not writeable Collecting psycopg2-binary Downloading psycopg2_binary-2.9.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.0 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.0/3.0 MB 20.3 MB/s eta 0:00:00 Installing collected packages: psycopg2-binary Successfully installed psycopg2-binary-2.9.6 luke@ubuntuserver:~/syncserver$ sudo make build
Install the latest Python 2 compatible setuptools manually:
https://github.com/mozilla-services/syncserver/issues/239
which python2 python2.7 python | head -n 1
-m virtualenv --python=which python2 python2.7 python | head -n 1
./local --no-setuptools created virtual environment CPython2.7.18.final.0-64 in 174ms creator CPython2Posix(dest=/home/luke/syncserver/local, clear=False, no_vcs_ignore=False, global=False) seeder FromAppData(download=False, pip=bundle, wheel=bundle, via=copy, app_data_dir=/root/.local/share/virtualenv) added seed packages: pip==20.3.4, setuptools==44.1.1, wheel==0.37.1 activators NushellActivator,PythonActivator,FishActivator,CShellActivator,PowerShellActivator,BashActivator CFLAGS="-Wno-error -Wno-error=format-security" ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future ./local/bin/pip install -U "setuptools<45" DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality. Requirement already up-to-date: setuptools<45 in ./local/lib/python2.7/site-packages (44.1.1) CFLAGS="-Wno-error -Wno-error=format-security" ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future ./local/bin/pip install -r requirements.txt DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality. Collecting https://github.com/mozilla-services/tokenserver/archive/bf5f232ed78fb4eb89909ec5be40f135945aa514.zip (from -r requirements.txt (line 18)) Using cached https://github.com/mozilla-services/tokenserver/archive/bf5f232ed78fb4eb89909ec5be40f135945aa514.zip Collecting https://github.com/mozilla-services/server-syncstorage/archive/d370a488155adeb80ee6f1bc016a4aa9d009f181.zip (from -r requirements.txt (line 19)) Using cached https://github.com/mozilla-services/server-syncstorage/archive/d370a488155adeb80ee6f1bc016a4aa9d009f181.zip Collecting gevent==1.4.0 Using cached gevent-1.4.0-cp27-cp27mu-manylinux1_x86_64.whl (5.0 MB) Collecting greenlet==0.4.14 Using cached greenlet-0.4.14-cp27-cp27mu-manylinux1_x86_64.whl (39 kB) Collecting cornice==0.16.2 Using cached cornice-0.16.2.tar.gz (45 kB) Collecting gunicorn==19.10.0 Using cached gunicorn-19.10.0-py2.py3-none-any.whl (113 kB) Collecting pyramid==1.10.4 Using cached pyramid-1.10.4-py2.py3-none-any.whl (325 kB) Collecting WebOb==1.8.5 Using cached WebOb-1.8.5-py2.py3-none-any.whl (113 kB) Collecting requests==2.22.0 Using cached requests-2.22.0-py2.py3-none-any.whl (57 kB) Collecting SQLAlchemy==1.3.3 Using cached SQLAlchemy-1.3.3.tar.gz (5.9 MB) Collecting unittest2==1.1 Using cached unittest2-1.1.0-py2.py3-none-any.whl (96 kB) Collecting zope.component==4.2.1 Using cached zope.component-4.2.1.tar.gz (462 kB) Collecting configparser==3.7.4 Using cached configparser-3.7.4-py2.py3-none-any.whl (22 kB) Collecting mozsvc==0.10 Using cached mozsvc-0.10.tar.gz (38 kB) Collecting futures==3.2 Using cached futures-3.2.0-py2-none-any.whl (15 kB) Collecting soupsieve==1.9.5 Using cached soupsieve-1.9.5-py2.py3-none-any.whl (33 kB) Collecting umemcache==1.6.3 Using cached umemcache-1.6.3.zip (26 kB) Collecting google-cloud-spanner==1.18.0 Using cached google_cloud_spanner-1.18.0-py2.py3-none-any.whl (255 kB) Collecting psycopg2==2.8.6 Using cached psycopg2-2.8.6.tar.gz (383 kB) ERROR: Command errored out with exit status 1: command: /home/luke/syncserver/local/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-rrbX_c/psycopg2/setup.py'"'"'; file='"'"'/tmp/pip-install-rrbX_c/psycopg2/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-8cdsEr cwd: /tmp/pip-install-rrbX_c/psycopg2/ Complete output (23 lines): running egg_info creating /tmp/pip-pip-egg-info-8cdsEr/psycopg2.egg-info writing /tmp/pip-pip-egg-info-8cdsEr/psycopg2.egg-info/PKG-INFO writing top-level names to /tmp/pip-pip-egg-info-8cdsEr/psycopg2.egg-info/top_level.txt writing dependency_links to /tmp/pip-pip-egg-info-8cdsEr/psycopg2.egg-info/dependency_links.txt writing manifest file '/tmp/pip-pip-egg-info-8cdsEr/psycopg2.egg-info/SOURCES.txt'ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. make: *** [Makefile:31: local/COMPLETE] Error 1