Thank you @maxx for your help.
IIUC I should use requirements-dev.txt because my goal is to create a new module. Please advise if this is not correct.
Running install with requirements-dev.txt was unsuccessful due to “Error: pg_config executable not found.”
(tryton-dev) ~/Source/tryton-dev$ cd tryton-env
(tryton-dev) ~/Source/tryton-dev/tryton-env$ pip3 install -r requirements-dev.txt
...
Collecting psycopg2
Downloading psycopg2-2.9.1.tar.gz (379 kB)
|████████████████████████████████| 379 kB 7.2 MB/s
ERROR: Command errored out with exit status 1:
command: /home/dale/Source/tryton-dev/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-rxg86nt2/psycopg2/setup.py'"'"'; __file__='"'"'/tmp/pip-install-rxg86nt2/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-install-rxg86nt2/psycopg2/pip-egg-info
cwd: /tmp/pip-install-rxg86nt2/psycopg2/
Complete output (23 lines):
running egg_info
creating /tmp/pip-install-rxg86nt2/psycopg2/pip-egg-info/psycopg2.egg-info
writing /tmp/pip-install-rxg86nt2/psycopg2/pip-egg-info/psycopg2.egg-info/PKG-INFO
writing dependency_links to /tmp/pip-install-rxg86nt2/psycopg2/pip-egg-info/psycopg2.egg-info/dependency_links.txt
writing top-level names to /tmp/pip-install-rxg86nt2/psycopg2/pip-egg-info/psycopg2.egg-info/top_level.txt
writing manifest file '/tmp/pip-install-rxg86nt2/psycopg2/pip-egg-info/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.
(tryton-dev) ~/Source/tryton-dev/tryton-env$
iiuc this is a well-understood issue because it seems installing psycopg2 is not simple, also iiuc, installing psycopg2-binary will avoid having to learn how to build psycopg2 from source, so I installed psycopg2-binary, and will then try setup again after.
(tryton-dev) ~/Source/tryton-dev/tryton-env$ pip install psycopg2-binary
Collecting psycopg2-binary
Using cached psycopg2_binary-2.9.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.4 MB)
Installing collected packages: psycopg2-binary
Successfully installed psycopg2-binary-2.9.1
(tryton-dev) ~/Source/tryton-dev/tryton-env$ ls
However, running pip install -r requirements-dev.txt a 2nd time is again not successful, and again related to psycopg2 (below).
Am I installing psycopg2 incorrectly? Are my assumptions wrong?
Thanks,
Dale
(tryton-dev) ~/Source/tryton-dev/tryton-env$ pip install -r requirements-dev.txt
Collecting GooCalendar
Using cached GooCalendar-0.7.2-py3-none-any.whl (22 kB)
Collecting bcrypt
Using cached bcrypt-3.2.0-cp36-abi3-manylinux2010_x86_64.whl (63 kB)
Collecting forex-python
Using cached forex_python-1.6-py3-none-any.whl (8.1 kB)
Collecting gevent
Using cached gevent-21.8.0-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (6.5 MB)
Collecting html2text
Using cached html2text-2020.1.16-py3-none-any.whl (32 kB)
Collecting passlib[argon2]
Using cached passlib-1.7.4-py2.py3-none-any.whl (525 kB)
Collecting phonenumbers
Using cached phonenumbers-8.12.35-py2.py3-none-any.whl (2.6 MB)
Collecting pillow
Using cached Pillow-8.4.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.1 MB)
Collecting psycopg2
Using cached psycopg2-2.9.1.tar.gz (379 kB)
ERROR: Command errored out with exit status 1:
command: /home/dale/Source/tryton-dev/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ghcku81u/psycopg2/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ghcku81u/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-install-ghcku81u/psycopg2/pip-egg-info
cwd: /tmp/pip-install-ghcku81u/psycopg2/
Complete output (23 lines):
running egg_info
creating /tmp/pip-install-ghcku81u/psycopg2/pip-egg-info/psycopg2.egg-info
writing /tmp/pip-install-ghcku81u/psycopg2/pip-egg-info/psycopg2.egg-info/PKG-INFO
writing dependency_links to /tmp/pip-install-ghcku81u/psycopg2/pip-egg-info/psycopg2.egg-info/dependency_links.txt
writing top-level names to /tmp/pip-install-ghcku81u/psycopg2/pip-egg-info/psycopg2.egg-info/top_level.txt
writing manifest file '/tmp/pip-install-ghcku81u/psycopg2/pip-egg-info/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.
(tryton-dev) ~/Source/tryton-dev/tryton-env$ pip install psycopg2-binary
Requirement already satisfied: psycopg2-binary in /home/dale/Source/tryton-dev/lib/python3.8/site-packages (2.9.1)
(tryton-dev) ~/Source/tryton-dev/tryton-env$