![]() ![]() 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 (.) ![]() I am running all of this within a virtual environment with the following versions: python: 3.8.Error while installing through pip install psycopg2 looks like this: Please add the directory containing pg_config to the PATH I've also tried to explicitly give the driver file path to pyodbc in the connection string but then nnect() just hangs instead of aborting right away. USER DATA SOURCES.: /Users/kdot/.odbc.iniĪnd the odbcinst.ini file contains: ĭescription=Microsoft ODBC Driver 17 for SQL Serverĭriver=/opt/homebrew/lib/libmsodbcsql.17.dylib SYSTEM DATA SOURCES: /opt/homebrew/etc/odbc.iniįILE DATA SOURCES.: /opt/homebrew/etc/ODBCDataSources Here is the output when I run odbcinst -j: unixODBC 2.3.9ĭRIVERS.: /opt/homebrew/etc/odbcinst.ini So it seems like pyodbc cannot find the drivers I installed earlier. When I run pyodbc.drivers() I get an empty list. I then pip installed pyodbc but when I try to run nnect() within a test script, python just aborts with the following message, regardless which connection string I use:Īfter investigating a bit more I find that pyodbc doesn't have any drivers. So far I have installed unixodbc via homebrew and ODBC drivers according to the instructions found here: I have a new M1 pro macbook and I'm trying to install pyodbc and relevant drivers on my machine. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |