My mistake:
Command "/ Users/qinlan/myproject/lenv1/bin/python3.6 - u - c" import setuptools, tokenize; __file__='/private/var/folders/l1/y1ch9__s6xx00p046b096_6m0000gn/T/pip-install-_p50tkoi/psycopg2/setup.py'; f=getattr(tokenize, 'open', open)(__file__); code=f.read().replace('\r\n', '\n'); f.close(); exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/l1/y1ch9__s6xx00p046b096_6m0000gn/T/pip-record-jml81n0v/install-record.txt --single-version-externally-managed --compile --install-headers /Users/qinlan/myproject/lenv1/bin/../include/site/python3.6 psycopg2 "failed with the error code 1 in/private/var/folders/l1/y1ch9__s6xx00p046b096_6m0000gn/T/PIP - install - _p50tkoi/psycopg2/ code>
Fix:
I fixed this problem by installing the command line tool
xcode-select --install
then install openssl through Homebrew and manually link the openssl installed by my homemade software to PIP:
env LDFLAGS = "-i/usr/local/opt/openssl/include - L/usr/local/opt/openssl/lib" PIP install psycopg2 code>
in the macOS Sierra 10.12.1
It is recommended that PIP Install PsycopG2-Binary instead
Read More:
- Ubuntu has solved the error of h5py installation: building wheel for h5py( setup.py )… or error: failed building wheel for h5py
- [Python] failed building wheel for MySQL Python solution
- Failed building wheel for psutil solution
- Failed building wheel for SCS appears in cvxpy
- Failed building wheel for twisted solution appears after installing scratch
- pygobject pip3 upgrade problem: ERROR: Failed building wheel for pycairo
- Error in installing cryptograph failed building wheel for cryptography
- Building wheel for wrapt (setup.py) … error
- ubuntu install mysqlclient error ERROR: Failed building wheel for mysqlclient solution
- Building wheel for vrep-api-python (setup.py) … error ERROR: Command errored out with exit statu
- psycopg2.OperationalError: SSL SYSCALL error: EOF detected
- Configuration (9) to solve the problem of “setup tools PIP wheel failed with error code 1”, create virtual environments with Python of anaconda
- OpenJDK11 failed: PKIX path building failed XXXXX
- Building Eureka_ Server error: application failed to start with classpath:file :/C:/ProgramFiles/Java/jdk
- ERROR: pygame-1.9.2-cp35-cp35m-win32.whl is not a supported wheel on this platform.
- Using pip to install tensorflow: tensorflow — is not a supported wheel on this platform
- After IOS upgrade, the time control selected by the wheel will be invalid, uidatepicker
- Building OpenGL environment
- Python about error: invalid command ‘bdist_ The solution of wheel error report
- Building virtual machine environment based on kvm-qemu under ubuntu12.10 (12)