Using cached psycopg2-2.9.6.tar.gz (383 kB)īuilding wheels for collected packages: psycopg2īuilding wheel for psycopg2 (setup.py). Now that you know the folder locations, install psycopg2 using env vars: % env pip install psycopg2 ![]() % ls INSTALL_RECEIPT.json NEWS.md bin libĬHANGES.md LICENSE.txt README.md include share Find out folder locations used to set LDFLAGSĪfter this, I checked where the bin and include folders are for openssl. Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).Ģ. => Running `brew cleanup this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP. Reinstall Openssl % brew reinstall opensslĪlready downloaded: Reinstalling Pouring 6,495 files, 28.4MB This is what I did to solve the problem: 1. Note: This is an issue with the package mentioned above, not pip. × Encountered error while generating package metadata. Note: This error originates from a subprocess, and is likely not a problem with pip. If you prefer to avoid building psycopg2 from source, please install the PyPIįor further information please check the 'doc/src/install.rst' file (also at Or with the pg_config option in 'setup.cfg'. Python setup.py build_ext -pg-config /path/to/pg_config build. Please add the directoryĬontaining pg_config to the $PATH or specify the full executable path with the ![]() Pg_config is required to build psycopg2 from source. Writing manifest file '/private/var/folders/00/0cr867qs7_lcp7b5h323321r0000gn/T/pip-pip-egg-info-0kxer1_o/psycopg2_binary.egg-info/SOURCES.txt' Writing top-level names to /private/var/folders/00/0cr867qs7_lcp7b5h323321r0000gn/T/pip-pip-egg-info-0kxer1_o/psycopg2_binary.egg-info/top_level.txt Writing dependency_links to /private/var/folders/00/0cr867qs7_lcp7b5h323321r0000gn/T/pip-pip-egg-info-0kxer1_o/psycopg2_binary.egg-info/dependency_links.txt × python setup.py egg_info did not run successfully.Ĭreating /private/var/folders/00/0cr867qs7_lcp7b5h323321r0000gn/T/pip-pip-egg-info-0kxer1_o/psycopg2_binary.egg-info Using cached psycopg2-binary-2.9.3.tar.gz (380 kB) In /Users/user/opt/miniconda3/envs/dat/lib/python3.7/site-packages/psycopg2/_įollowing this thread, this finally worked: brew install libpq -build-from-sourceĮxport LDFLAGS="-L/opt/homebrew/opt/libpq/lib"īefore using that, uninstall psycopg2 and psycopg2-binary: pip uninstall psycopg2-binary Referenced from: /Users/user/opt/miniconda3/envs/dat/lib/python3.7/site-packages/psycopg2/_ ImportError: dlopen(/Users/user/opt/miniconda3/envs/dat/lib/python3.7/site-packages/psycopg2/_, 2): Symbol not found: _PQbackendPID I encountered the following error while running a django command: Traceback (most recent call last):įile "/Users/user/opt/miniconda3/envs/dat/lib/python3.7/site-packages/django/db/backends/postgresql/base.py", line 25, in įile "/Users/user/opt/miniconda3/envs/dat/lib/python3.7/site-packages/psycopg2/_init_.py", line 51, in In my case those were located in these folders: that to $PATH: export PATH=$PATH:/opt/homebrew/Cellar/postgresql/13.3/bin/pg_configĮxport run: pip install psycopg2. ![]() If you already have openssl installed, run: brew reinstall opensslįind the path of pg_config and openssl: which pg_config Pg_ctl -D /opt/homebrew/var/postgres start Install PostgreSQL, start the deamon and install openssl: brew install postgresql Or specify the full executable path with the option (.) Error while installing through pip install psycopg2 looks like this: Please add the directory containing pg_config to the PATH
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |