How to properly install TrustTrees library in ubuntu 18.04? - python

TrustTrees is a subdomain enumeration tool based on python. When I am installing TrustTrees python library, error message is showing. I have no idea how to solve it. Following are the error trace.
command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-m199of9z/pygraphviz/setup.py'"'"'; __file__='"'"'/tmp/pip-install-m199of9z/pygraphviz/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-f5wljx0z --python-tag cp36
cwd: /tmp/pip-install-m199of9z/pygraphviz/
Complete output (50 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/pygraphviz
copying pygraphviz/release.py -> build/lib.linux-x86_64-3.6/pygraphviz
copying pygraphviz/version.py -> build/lib.linux-x86_64-3.6/pygraphviz
copying pygraphviz/agraph.py -> build/lib.linux-x86_64-3.6/pygraphviz
copying pygraphviz/graphviz.py -> build/lib.linux-x86_64-3.6/pygraphviz
copying pygraphviz/__init__.py -> build/lib.linux-x86_64-3.6/pygraphviz
creating build/lib.linux-x86_64-3.6/pygraphviz/tests
copying pygraphviz/tests/test_node_attributes.py -> build/lib.linux-x86_64-3.6/pygraphviz/tests
copying pygraphviz/tests/test_html.py -> build/lib.linux-x86_64-3.6/pygraphviz/tests
copying pygraphviz/tests/test.py -> build/lib.linux-x86_64-3.6/pygraphviz/tests
copying pygraphviz/tests/test_string.py -> build/lib.linux-x86_64-3.6/pygraphviz/tests
copying pygraphviz/tests/test_subgraph.py -> build/lib.linux-x86_64-3.6/pygraphviz/tests
copying pygraphviz/tests/test_layout.py -> build/lib.linux-x86_64-3.6/pygraphviz/tests
copying pygraphviz/tests/test_edge_attributes.py -> build/lib.linux-x86_64-3.6/pygraphviz/tests
copying pygraphviz/tests/test_unicode.py -> build/lib.linux-x86_64-3.6/pygraphviz/tests
copying pygraphviz/tests/test_attribute_defaults.py -> build/lib.linux-x86_64-3.6/pygraphviz/tests
copying pygraphviz/tests/test_graph.py -> build/lib.linux-x86_64-3.6/pygraphviz/tests
copying pygraphviz/tests/test_attributes.py -> build/lib.linux-x86_64-3.6/pygraphviz/tests
copying pygraphviz/tests/test_drawing.py -> build/lib.linux-x86_64-3.6/pygraphviz/tests
copying pygraphviz/tests/test_clear.py -> build/lib.linux-x86_64-3.6/pygraphviz/tests
copying pygraphviz/tests/__init__.py -> build/lib.linux-x86_64-3.6/pygraphviz/tests
copying pygraphviz/tests/test_readwrite.py -> build/lib.linux-x86_64-3.6/pygraphviz/tests
running egg_info
writing pygraphviz.egg-info/PKG-INFO
writing dependency_links to pygraphviz.egg-info/dependency_links.txt
writing top-level names to pygraphviz.egg-info/top_level.txt
reading manifest file 'pygraphviz.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*~' found anywhere in distribution
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '.svn' found anywhere in distribution
no previously-included directories found matching 'doc/build'
writing manifest file 'pygraphviz.egg-info/SOURCES.txt'
copying pygraphviz/graphviz.i -> build/lib.linux-x86_64-3.6/pygraphviz
copying pygraphviz/graphviz_wrap.c -> build/lib.linux-x86_64-3.6/pygraphviz
running build_ext
building 'pygraphviz._graphviz' extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/pygraphviz
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.6m -c pygraphviz/graphviz_wrap.c -o build/temp.linux-x86_64-3.6/pygraphviz/graphviz_wrap.o
pygraphviz/graphviz_wrap.c:130:11: fatal error: Python.h: No such file or directory
# include <Python.h>
^~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for pygraphviz
Running setup.py clean for pygraphviz
Failed to build pygraphviz
Installing collected packages: pygraphviz, TrustTrees
Running setup.py install for pygraphviz ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-m199of9z/pygraphviz/setup.py'"'"'; __file__='"'"'/tmp/pip-install-m199of9z/pygraphviz/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-oysqalc0/install-record.txt --single-version-externally-managed --compile
cwd: /tmp/pip-install-m199of9z/pygraphviz/
Complete output (29 lines):
running install
Trying pkg-config
Package libcgraph was not found in the pkg-config search path.
Perhaps you should add the directory containing `libcgraph.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libcgraph' found
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-m199of9z/pygraphviz/setup.py", line 87, in <module>
tests_require=['nose>=0.10.1', 'doctest-ignore-unicode>=0.1.0',],
File "/usr/local/lib/python3.6/dist-packages/setuptools/__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "/usr/lib/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/tmp/pip-install-m199of9z/pygraphviz/setup_commands.py", line 44, in modified_run
self.include_path, self.library_path = get_graphviz_dirs()
File "/tmp/pip-install-m199of9z/pygraphviz/setup_extra.py", line 121, in get_graphviz_dirs
include_dirs, library_dirs = _pkg_config()
File "/tmp/pip-install-m199of9z/pygraphviz/setup_extra.py", line 44, in _pkg_config
output = S.check_output(['pkg-config', '--libs-only-L', 'libcgraph'])
File "/usr/lib/python3.6/subprocess.py", line 356, in check_output
**kwargs).stdout
File "/usr/lib/python3.6/subprocess.py", line 438, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['pkg-config', '--libs-only-L', 'libcgraph']' returned non-zero exit status 1.
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-m199of9z/pygraphviz/setup.py'"'"'; __file__='"'"'/tmp/pip-install-m199of9z/pygraphviz/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-oysqalc0/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.
I have no idea how to solve this problem. Seems like I am getting compilation error for graphviz python library. I have installed it, but still the error message is same.

Related

Failed building wheel for ssh-python

When I try to install parallel ssh I get this error in red for some reason.I think the problem is with open ssl and with building wheel for ssh2-python
Building wheels for collected packages: ssh2-python, ssh-python
Building wheel for ssh2-python (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\mr ihab badr\appdata\local\programs\python\python38-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\MR Ihab Badr\\AppData\\Local\\Temp\\pip-install-88x5vkqr\\ssh2-python\\setup.py'"'"'; __file__='"'"'C:\\Users\\MR Ihab Badr\\AppData\\Local\\Temp\\pip-install-88x5vkqr\\ssh2-python\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\MR Ihab Badr\AppData\Local\Temp\pip-wheel-v1bw54kg'
cwd: C:\Users\MR Ihab Badr\AppData\Local\Temp\pip-install-88x5vkqr\ssh2-python\
Complete output (29 lines):
-- Building for: Visual Studio 15 2017
-- Selecting Windows SDK version 10.0.16299.0 to target Windows 10.0.17134.
-- The C compiler identification is MSVC 19.16.27034.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
CMake Error at C:/Users/MR Ihab Badr/AppData/Local/Programs/Python/Python38-32/Lib/site-packages/cmake/data/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:165 (message):
Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the
system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY
OPENSSL_INCLUDE_DIR)
Call Stack (most recent call first):
C:/Users/MR Ihab Badr/AppData/Local/Programs/Python/Python38-32/Lib/site-packages/cmake/data/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:458 (_FPHSA_FAILURE_MESSAGE)
C:/Users/MR Ihab Badr/AppData/Local/Programs/Python/Python38-32/Lib/site-packages/cmake/data/share/cmake-3.18/Modules/FindOpenSSL.cmake:486 (find_package_handle_standard_args)
src/CMakeLists.txt:63 (find_package)
-- Configuring incomplete, errors occurred!
See also "C:/Users/MR Ihab Badr/AppData/Local/Temp/pip-install-88x5vkqr/ssh2-python/src/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\MR Ihab Badr\AppData\Local\Temp\pip-install-88x5vkqr\ssh2-python\setup.py", line 36, in <module>
build_ssh2()
File "C:\Users\MR Ihab Badr\AppData\Local\Temp\pip-install-88x5vkqr\ssh2-python\_setup_libssh2.py", line 21, in build_ssh2
check_call('cmake ../libssh2 -DBUILD_SHARED_LIBS=ON \
File "c:\users\mr ihab badr\appdata\local\programs\python\python38-32\lib\subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'cmake ../libssh2 -DBUILD_SHARED_LIBS=ON -DENABLE_ZLIB_COMPRESSION=ON -DENABLE_CRYPT_NONE=ON -DENABLE_MAC_NONE=ON -DCRYPTO_BACKEND=OpenSSL' returned non-zero exit status 1.
----------------------------------------
ERROR: Failed building wheel for ssh2-python
Then Here it tries using other file I dont really know
Running setup.py clean for ssh2-python
Building wheel for ssh-python (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\mr ihab badr\appdata\local\programs\python\python38-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\MR Ihab Badr\\AppData\\Local\\Temp\\pip-install-88x5vkqr\\ssh-python\\setup.py'"'"'; __file__='"'"'C:\\Users\\MR Ihab Badr\\AppData\\Local\\Temp\\pip-install-88x5vkqr\\ssh-python\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\MR Ihab Badr\AppData\Local\Temp\pip-wheel-1w9bt85h'
cwd: C:\Users\MR Ihab Badr\AppData\Local\Temp\pip-install-88x5vkqr\ssh-python\
Complete output (79 lines):
Windows platform: True, Python major version: 3.\running bdist_wheel
running build
running build_py
creating build
creating build\lib.win32-3.8
creating build\lib.win32-3.8\ssh
copying ssh\_version.py -> build\lib.win32-3.8\ssh
copying ssh\__init__.py -> build\lib.win32-3.8\ssh
running egg_info
writing ssh_python.egg-info\PKG-INFO
writing dependency_links to ssh_python.egg-info\dependency_links.txt
writing top-level names to ssh_python.egg-info\top_level.txt
reading manifest file 'ssh_python.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*' found under directory 'docker'
warning: no previously-included files found matching '.travis.yml'
writing manifest file 'ssh_python.egg-info\SOURCES.txt'
copying ssh\__init__.pxd -> build\lib.win32-3.8\ssh
copying ssh\c_callbacks.pxd -> build\lib.win32-3.8\ssh
copying ssh\c_legacy.pxd -> build\lib.win32-3.8\ssh
copying ssh\c_sftp.pxd -> build\lib.win32-3.8\ssh
copying ssh\c_ssh.pxd -> build\lib.win32-3.8\ssh
copying ssh\c_ssh2.pxd -> build\lib.win32-3.8\ssh
copying ssh\callbacks.c -> build\lib.win32-3.8\ssh
copying ssh\callbacks.pxd -> build\lib.win32-3.8\ssh
copying ssh\callbacks.pyx -> build\lib.win32-3.8\ssh
copying ssh\channel.c -> build\lib.win32-3.8\ssh
copying ssh\channel.pxd -> build\lib.win32-3.8\ssh
copying ssh\channel.pyx -> build\lib.win32-3.8\ssh
copying ssh\connector.c -> build\lib.win32-3.8\ssh
copying ssh\connector.pxd -> build\lib.win32-3.8\ssh
copying ssh\connector.pyx -> build\lib.win32-3.8\ssh
copying ssh\error_codes.c -> build\lib.win32-3.8\ssh
copying ssh\error_codes.pyx -> build\lib.win32-3.8\ssh
copying ssh\event.c -> build\lib.win32-3.8\ssh
copying ssh\event.pxd -> build\lib.win32-3.8\ssh
copying ssh\event.pyx -> build\lib.win32-3.8\ssh
copying ssh\exceptions.c -> build\lib.win32-3.8\ssh
copying ssh\exceptions.pyx -> build\lib.win32-3.8\ssh
copying ssh\key.c -> build\lib.win32-3.8\ssh
copying ssh\key.pxd -> build\lib.win32-3.8\ssh
copying ssh\key.pyx -> build\lib.win32-3.8\ssh
copying ssh\keytypes.c -> build\lib.win32-3.8\ssh
copying ssh\keytypes.pxd -> build\lib.win32-3.8\ssh
copying ssh\keytypes.pyx -> build\lib.win32-3.8\ssh
copying ssh\options.c -> build\lib.win32-3.8\ssh
copying ssh\options.pxd -> build\lib.win32-3.8\ssh
copying ssh\options.pyx -> build\lib.win32-3.8\ssh
copying ssh\scp.c -> build\lib.win32-3.8\ssh
copying ssh\scp.pxd -> build\lib.win32-3.8\ssh
copying ssh\scp.pyx -> build\lib.win32-3.8\ssh
copying ssh\session.c -> build\lib.win32-3.8\ssh
copying ssh\session.pxd -> build\lib.win32-3.8\ssh
copying ssh\session.pyx -> build\lib.win32-3.8\ssh
copying ssh\sftp.c -> build\lib.win32-3.8\ssh
copying ssh\sftp.pxd -> build\lib.win32-3.8\ssh
copying ssh\sftp.pyx -> build\lib.win32-3.8\ssh
copying ssh\sftp_attributes.c -> build\lib.win32-3.8\ssh
copying ssh\sftp_attributes.pxd -> build\lib.win32-3.8\ssh
copying ssh\sftp_attributes.pyx -> build\lib.win32-3.8\ssh
copying ssh\sftp_handles.c -> build\lib.win32-3.8\ssh
copying ssh\sftp_handles.pxd -> build\lib.win32-3.8\ssh
copying ssh\sftp_handles.pyx -> build\lib.win32-3.8\ssh
copying ssh\sftp_statvfs.c -> build\lib.win32-3.8\ssh
copying ssh\sftp_statvfs.pxd -> build\lib.win32-3.8\ssh
copying ssh\sftp_statvfs.pyx -> build\lib.win32-3.8\ssh
copying ssh\utils.c -> build\lib.win32-3.8\ssh
copying ssh\utils.pxd -> build\lib.win32-3.8\ssh
copying ssh\utils.pyx -> build\lib.win32-3.8\ssh
running build_ext
building 'ssh.callbacks' extension
creating build\temp.win32-3.8
creating build\temp.win32-3.8\Release
creating build\temp.win32-3.8\Release\ssh
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x86\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ilibssh/include "-Ic:\users\mr ihab badr\appdata\local\programs\python\python38-32\include" "-Ic:\users\mr ihab badr\appdata\local\programs\python\python38-32\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\cppwinrt" /Tcssh\callbacks.c /Fobuild\temp.win32-3.8\Release\ssh\callbacks.obj
callbacks.c
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x86\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:/usr/local/lib "/LIBPATH:c:\users\mr ihab badr\appdata\local\programs\python\python38-32\libs" "/LIBPATH:c:\users\mr ihab badr\appdata\local\programs\python\python38-32\PCbuild\win32" "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\lib\x86" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.16299.0\ucrt\x86" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.16299.0\um\x86" ssh.lib Ws2_32.lib user32.lib libcrypto32MD.lib libssl32MD.lib zlibstatic.lib /EXPORT:PyInit_callbacks build\temp.win32-3.8\Release\ssh\callbacks.obj /OUT:build\lib.win32-3.8\ssh\callbacks.cp38-win32.pyd /IMPLIB:build\temp.win32-3.8\Release\ssh\callbacks.cp38-win32.lib
LINK : fatal error LNK1181: cannot open input file 'ssh.lib'
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.16.27023\\bin\\HostX86\\x86\\link.exe' failed with exit status 1181
----------------------------------------
ERROR: Failed building wheel for ssh-python
Running setup.py clean for ssh-python
Failed to build ssh2-python ssh-python
Installing collected packages: ssh2-python, ssh-python, parallel-ssh
Running setup.py install for ssh2-python ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\mr ihab badr\appdata\local\programs\python\python38-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\MR Ihab Badr\\AppData\\Local\\Temp\\pip-install-88x5vkqr\\ssh2-python\\setup.py'"'"'; __file__='"'"'C:\\Users\\MR Ihab Badr\\AppData\\Local\\Temp\\pip-install-88x5vkqr\\ssh2-python\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\MR Ihab Badr\AppData\Local\Temp\pip-record-2htv8zya\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\mr ihab badr\appdata\local\programs\python\python38-32\Include\ssh2-python'
cwd: C:\Users\MR Ihab Badr\AppData\Local\Temp\pip-install-88x5vkqr\ssh2-python\
Complete output (22 lines):
-- Selecting Windows SDK version 10.0.16299.0 to target Windows 10.0.17134.
CMake Error at C:/Users/MR Ihab Badr/AppData/Local/Programs/Python/Python38-32/Lib/site-packages/cmake/data/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:165 (message):
Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the
system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY
OPENSSL_INCLUDE_DIR)
Call Stack (most recent call first):
C:/Users/MR Ihab Badr/AppData/Local/Programs/Python/Python38-32/Lib/site-packages/cmake/data/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:458 (_FPHSA_FAILURE_MESSAGE)
C:/Users/MR Ihab Badr/AppData/Local/Programs/Python/Python38-32/Lib/site-packages/cmake/data/share/cmake-3.18/Modules/FindOpenSSL.cmake:486 (find_package_handle_standard_args)
src/CMakeLists.txt:63 (find_package)
-- Configuring incomplete, errors occurred!
See also "C:/Users/MR Ihab Badr/AppData/Local/Temp/pip-install-88x5vkqr/ssh2-python/src/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\MR Ihab Badr\AppData\Local\Temp\pip-install-88x5vkqr\ssh2-python\setup.py", line 36, in <module>
build_ssh2()
File "C:\Users\MR Ihab Badr\AppData\Local\Temp\pip-install-88x5vkqr\ssh2-python\_setup_libssh2.py", line 21, in build_ssh2
check_call('cmake ../libssh2 -DBUILD_SHARED_LIBS=ON \
File "c:\users\mr ihab badr\appdata\local\programs\python\python38-32\lib\subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'cmake ../libssh2 -DBUILD_SHARED_LIBS=ON -DENABLE_ZLIB_COMPRESSION=ON -DENABLE_CRYPT_NONE=ON -DENABLE_MAC_NONE=ON -DCRYPTO_BACKEND=OpenSSL' returned non-zero exit status 1.
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\mr ihab badr\appdata\local\programs\python\python38-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\MR Ihab Badr\\AppData\\Local\\Temp\\pip-install-88x5vkqr\\ssh2-python\\setup.py'"'"'; __file__='"'"'C:\\Users\\MR Ihab Badr\\AppData\\Local\\Temp\\pip-install-88x5vkqr\\ssh2-python\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\MR Ihab Badr\AppData\Local\Temp\pip-record-2htv8zya\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\mr ihab badr\appdata\local\programs\python\python38-32\Include\ssh2-python' Check the logs for full command output.
can anyone help ? I'm not that experienced with python also I tried installing ssh2-python and I got a similar error
Wheels - Python binary packages - are provided for most platforms for those packages, including Windows for Python 3.5-3.9 (64 bit).
The above is trying to install on 32-bit Python on Windows, for which binary packages are not provided.
It therefore tries to build from source, which is failing for lack of dependencies:
missing: OPENSSL_CRYPTO_LIBRARY
Can either:
Try and get them to build on 32-bit Windows (not recommended)
Use Python 64-bit
The latter will enable use of binary packages and does not require compiling. The former is a PITA.

ERROR: MySQL_python-1.2.5-cp27-none-win_amd64.whl is not a supported wheel on this platform

So I am setting up an old project it's Python 2 and Django 1 where I'm stuck with the installation of requirement.txt. This is the main error I'm getting while installing
Building wheel for MySQL-python (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /home/rehman/projects/cjs/bin/python2 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-KyvPG6/MySQL-python/setup.py'"'"'; __file__='"'"'/tmp/pip-install-KyvPG6/MySQL-python/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-jCT7NK
cwd: /tmp/pip-install-KyvPG6/MySQL-python/
Complete output (38 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
copying _mysql_exceptions.py -> build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/__init__.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/converters.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/connections.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/cursors.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/release.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/times.py -> build/lib.linux-x86_64-2.7/MySQLdb
creating build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/__init__.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/CR.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/ER.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/FLAG.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/REFRESH.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/CLIENT.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
running build_ext
building '_mysql' extension
creating build/temp.linux-x86_64-2.7
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-2.7.16=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -Dversion_info=(1,2,5,'final',1) -D__version__=1.2.5 -I/usr/include/mariadb -I/usr/include/mariadb/mysql -I/usr/include/python2.7 -c _mysql.c -o build/temp.linux-x86_64-2.7/_mysql.o
In file included from _mysql.c:44:
/usr/include/mariadb/my_config.h:3:2: warning: #warning This file should not be included by clients, include only <mysql.h> [-Wcpp]
#warning This file should not be included by clients, include only <mysql.h>
^~~~~~~
In file included from _mysql.c:46:
/usr/include/mariadb/mysql.h:444:3: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
MYSQL_CLIENT_PLUGIN_HEADER
^~~~~~~~~~~~~~~~~~~~~~~~~~
_mysql.c: In function ‘_mysql_ConnectionObject_ping’:
_mysql.c:2005:41: error: ‘MYSQL’ {aka ‘struct st_mysql’} has no member named ‘reconnect’
if ( reconnect != -1 ) self->connection.reconnect = reconnect;
^
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for MySQL-python
Running setup.py clean for MySQL-python
Building wheel for torctl (setup.py) ... done
Created wheel for torctl: filename=torctl-0.2-py2-none-any.whl size=67317 sha256=3cfc42c3313ca9a9b220dc844f65156a0134bb5c7f63dba0327fefe57fb64705
Stored in directory: /tmp/pip-ephem-wheel-cache-M4548v/wheels/c4/3a/87/1d604378e37b4c4d4c07b26c7866955102de8d824553cec0ec
Successfully built torctl
Failed to build MySQL-python
Installing collected packages: Django, pycrypto, six, ecdsa, paramiko, Fabric, GeoIP, Markdown, MySQL-python, Pillow, Unidecode, amqp, anyjson, beautifulsoup4, billiard, pytz, kombu, celery, colorama, configobj, django-celery, django-filter, django-mailchimp-v1.3, djangorestframework, httplib2, uritemplate, pyasn1, rsa, pyasn1-modules, oauth2client, google-api-python-client, html5lib, meld3, mysql-connector, oauth2, python-Levenshtein, python-dateutil, redis, requests, stripe, supervisor, urllib3, vine, pyyaml, ua-parser, user-agents, django-user-agents, contextlib2, raven, enum34, ipaddress, pycparser, cffi, cryptography, PyOpenSSL, ndg-httpsclient, pycryptodomex, future, pyjwkest, python-openid, oauthlib, requests-oauthlib, PyJWT, social-auth-core, social-auth-app-django, django-js-asset, django-ckeditor, django-compat, django-hijack, django-hijack-admin, torctl
Running setup.py install for MySQL-python ... error
ERROR: Command errored out with exit status 1:
command: /home/rehman/projects/cjs/bin/python2 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-KyvPG6/MySQL-python/setup.py'"'"'; __file__='"'"'/tmp/pip-install-KyvPG6/MySQL-python/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-nSvXLQ/install-record.txt --single-version-externally-managed --compile --install-headers /home/rehman/projects/cjs/include/site/python2.7/MySQL-python
cwd: /tmp/pip-install-KyvPG6/MySQL-python/
Complete output (38 lines):
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
copying _mysql_exceptions.py -> build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/__init__.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/converters.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/connections.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/cursors.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/release.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/times.py -> build/lib.linux-x86_64-2.7/MySQLdb
creating build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/__init__.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/CR.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/ER.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/FLAG.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/REFRESH.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/CLIENT.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
running build_ext
building '_mysql' extension
creating build/temp.linux-x86_64-2.7
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-2.7.16=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -Dversion_info=(1,2,5,'final',1) -D__version__=1.2.5 -I/usr/include/mariadb -I/usr/include/mariadb/mysql -I/usr/include/python2.7 -c _mysql.c -o build/temp.linux-x86_64-2.7/_mysql.o
In file included from _mysql.c:44:
/usr/include/mariadb/my_config.h:3:2: warning: #warning This file should not be included by clients, include only <mysql.h> [-Wcpp]
#warning This file should not be included by clients, include only <mysql.h>
^~~~~~~
In file included from _mysql.c:46:
/usr/include/mariadb/mysql.h:444:3: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
MYSQL_CLIENT_PLUGIN_HEADER
^~~~~~~~~~~~~~~~~~~~~~~~~~
_mysql.c: In function ‘_mysql_ConnectionObject_ping’:
_mysql.c:2005:41: error: ‘MYSQL’ {aka ‘struct st_mysql’} has no member named ‘reconnect’
if ( reconnect != -1 ) self->connection.reconnect = reconnect;
^
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /home/rehman/projects/comparedjs/bin/python2 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-KyvPG6/MySQL-python/setup.py'"'"'; __file__='"'"'/tmp/pip-install-KyvPG6/MySQL-python/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-nSvXLQ/install-record.txt --single-version-externally-managed --compile --install-headers /home/rehman/projects/cjs/include/site/python2.7/MySQL-python Check the logs for full command output.
This is requirement.txt
Django==1.9.7
Fabric==1.11.1
GeoIP==1.3.2
Markdown==2.6.6
MySQL-python==1.2.5
Pillow==3.3.0
Unidecode==0.04.19
amqp==1.4.9
anyjson==0.3.3
argparse==1.2.1
beautifulsoup4==4.2.1
billiard==3.3.0.22
celery==3.1.18
colorama==0.2.5
configobj
django-celery==3.1.17
django-filter==0.13.0
django-mailchimp-v1.3==1.4.0
djangorestframework==3.4.1
google-api-python-client==1.6.2
html5lib==0.999
httplib2==0.10.3
kombu==3.0.37
#newspaper == 0.1.0.7
meld3==1.0.2
mysql-connector
oauth2
oauth2client
#pyinotify
#pyserial
python-Levenshtein
python-dateutil
redis
requests==2.9.1
six==1.10.0
#ssh-import-id
stripe==1.46.0
supervisor==3.2.1
git+https://github.com/aaronsw/pytorctl.git
uritemplate==3.0.0
urllib3==1.7.1
vine==1.1.3
wsgiref==0.1.2
#zope.interface==4.0.5
pyyaml
ua-parser
user-agents
django-user-agents
raven
pyasn1
ndg-httpsclient
pyjwkest
social-auth-app-django
social-auth-core
django-ckeditor==5.4.0
django-hijack
django-hijack-admin
What I searched and got a clue that its somewhat related to the wheel, it's causing the issue and by this link I get to know that I need to download a .whl file and extract it manually for MySQL-python so I found 2 files through this link and when I try to execute .whl file by pip install MySQL_python-1.2.5-cp27-none-win32.whl it's giving me error ERROR: MySQL_python-1.2.5-cp27-none-win_amd64.whl is not a supported wheel on this platform.
I eventually figured out its for Windows platform. So if mysql-python is for Windows platform what do I install for Linux? I am using Debian 10.
Simply install mysqlclient instead of MySQL-python, it's a drop-in replacement that's more maintained.

mysql not connecting into django

I am working on django. it is working good. but now i have to connect mysql database into django. in local system i install all things realted packages. but in virtual enviornment I am getting so much error.
I used this command and getting same errors.
pip install mysqlclient
pip3 install mysqlclient
How can i fixed these errors?
(venv) palwesh#wg-palwesh:~/Workplace/learn/task2$ pip3 install mysqlclient
Collecting mysqlclient
Using cached mysqlclient-1.4.6.tar.gz (85 kB)
Building wheels for collected packages: mysqlclient
Building wheel for mysqlclient (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /home/webgen-palwesh/Workplace/learn/venv/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-xd1syfgb/mysqlclient/setup.py'"'"'; __file__='"'"'/tmp/pip-install-xd1syfgb/mysqlclient/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-la3lzm0o
cwd: /tmp/pip-install-xd1syfgb/mysqlclient/
Complete output (31 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/MySQLdb
copying MySQLdb/__init__.py -> build/lib.linux-x86_64-3.6/MySQLdb
copying MySQLdb/_exceptions.py -> build/lib.linux-x86_64-3.6/MySQLdb
copying MySQLdb/compat.py -> build/lib.linux-x86_64-3.6/MySQLdb
copying MySQLdb/connections.py -> build/lib.linux-x86_64-3.6/MySQLdb
copying MySQLdb/converters.py -> build/lib.linux-x86_64-3.6/MySQLdb
copying MySQLdb/cursors.py -> build/lib.linux-x86_64-3.6/MySQLdb
copying MySQLdb/release.py -> build/lib.linux-x86_64-3.6/MySQLdb
copying MySQLdb/times.py -> build/lib.linux-x86_64-3.6/MySQLdb
creating build/lib.linux-x86_64-3.6/MySQLdb/constants
copying MySQLdb/constants/__init__.py -> build/lib.linux-x86_64-3.6/MySQLdb/constants
copying MySQLdb/constants/CLIENT.py -> build/lib.linux-x86_64-3.6/MySQLdb/constants
copying MySQLdb/constants/CR.py -> build/lib.linux-x86_64-3.6/MySQLdb/constants
copying MySQLdb/constants/ER.py -> build/lib.linux-x86_64-3.6/MySQLdb/constants
copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.linux-x86_64-3.6/MySQLdb/constants
copying MySQLdb/constants/FLAG.py -> build/lib.linux-x86_64-3.6/MySQLdb/constants
running build_ext
building 'MySQLdb._mysql' extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/MySQLdb
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Dversion_info=(1,4,6,'final',0) -D__version__=1.4.6 -I/usr/include/mysql -I/home/webgen-palwesh/Workplace/tasks/Task2_Django_admin_panel/venv/include -I/usr/include/python3.6m -c MySQLdb/_mysql.c -o build/temp.linux-x86_64-3.6/MySQLdb/_mysql.o
MySQLdb/_mysql.c:38:10: fatal error: Python.h: No such file or directory
#include "Python.h"
^~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for mysqlclient
Running setup.py clean for mysqlclient
Failed to build mysqlclient
Installing collected packages: mysqlclient
Running setup.py install for mysqlclient ... error
ERROR: Command errored out with exit status 1:
command: /home/webgen-palwesh/Workplace/tasks/Task2_Django_admin_panel/venv/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-xd1syfgb/mysqlclient/setup.py'"'"'; __file__='"'"'/tmp/pip-install-xd1syfgb/mysqlclient/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-cqh3ksf2/install-record.txt --single-version-externally-managed --compile --install-headers /home/webgen-palwesh/Workplace/tasks/Task2_Django_admin_panel/venv/include/site/python3.6/mysqlclient
cwd: /tmp/pip-install-xd1syfgb/mysqlclient/
Complete output (31 lines):
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/MySQLdb
copying MySQLdb/__init__.py -> build/lib.linux-x86_64-3.6/MySQLdb
copying MySQLdb/_exceptions.py -> build/lib.linux-x86_64-3.6/MySQLdb
copying MySQLdb/compat.py -> build/lib.linux-x86_64-3.6/MySQLdb
copying MySQLdb/connections.py -> build/lib.linux-x86_64-3.6/MySQLdb
copying MySQLdb/converters.py -> build/lib.linux-x86_64-3.6/MySQLdb
copying MySQLdb/cursors.py -> build/lib.linux-x86_64-3.6/MySQLdb
copying MySQLdb/release.py -> build/lib.linux-x86_64-3.6/MySQLdb
copying MySQLdb/times.py -> build/lib.linux-x86_64-3.6/MySQLdb
creating build/lib.linux-x86_64-3.6/MySQLdb/constants
copying MySQLdb/constants/__init__.py -> build/lib.linux-x86_64-3.6/MySQLdb/constants
copying MySQLdb/constants/CLIENT.py -> build/lib.linux-x86_64-3.6/MySQLdb/constants
copying MySQLdb/constants/CR.py -> build/lib.linux-x86_64-3.6/MySQLdb/constants
copying MySQLdb/constants/ER.py -> build/lib.linux-x86_64-3.6/MySQLdb/constants
copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.linux-x86_64-3.6/MySQLdb/constants
copying MySQLdb/constants/FLAG.py -> build/lib.linux-x86_64-3.6/MySQLdb/constants
running build_ext
building 'MySQLdb._mysql' extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/MySQLdb
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Dversion_info=(1,4,6,'final',0) -D__version__=1.4.6 -I/usr/include/mysql -I/home/webgen-palwesh/Workplace/tasks/Task2_Django_admin_panel/venv/include -I/usr/include/python3.6m -c MySQLdb/_mysql.c -o build/temp.linux-x86_64-3.6/MySQLdb/_mysql.o
MySQLdb/_mysql.c:38:10: fatal error: Python.h: No such file or directory
#include "Python.h"
^~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /home/webgen-palwesh/Workplace/tasks/Task2_Django_admin_panel/venv/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-xd1syfgb/mysqlclient/setup.py'"'"'; __file__='"'"'/tmp/pip-install-xd1syfgb/mysqlclient/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-cqh3ksf2/install-record.txt --single-version-externally-managed --compile --install-headers /home/webgen-palwesh/Workplace/tasks/Task2_Django_admin_panel/venv/include/site/python3.6/mysqlclient Check the logs for full command output.
(venv) palwesh#wg-palwesh:~/Workplace/learn/task2$
This is a pretty common issue -- I recommend ensuring that your virtual development environment has the necessary prerequisites installed.
If you're using Ubuntu or a similar distro, you may need to run sudo apt-get install libssl-dev. After, try running pip install --upgrade setuptools, then pip install mysqlclient.
I had this problem before.
I can suggest two options:
Before installing mysqlclient, install python-dev-tools. this option didn't work for me.
Create virtual environment using anaconda and install mysqlclient. this option worked for me.

How to fix "ld: library not found for -lxxx " on my Mac when "pip3 install mysqlclient"?

I was going to use Django to develop my personal blog. I encountered this problem when configuring the environment:
~ » pip3 install mysqlclient hwangziqi#huangziqideMBP
Collecting mysqlclient
Using cached https://files.pythonhosted.org/packages/f4/f1/3bb6f64ca7a429729413e6556b7ba5976df06019a5245a43d36032f1061e/mysqlclient-1.4.2.post1.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/09/s28t32055hl9z2mcffwjhq040000gn/T/pip-install-bbsgdat8/mysqlclient/setup.py", line 16, in <module>
metadata, options = get_config()
File "/private/var/folders/09/s28t32055hl9z2mcffwjhq040000gn/T/pip-install-bbsgdat8/mysqlclient/setup_posix.py", line 53, in get_config
libraries = [dequote(i[2:]) for i in libs if i.startswith('-l')]
File "/private/var/folders/09/s28t32055hl9z2mcffwjhq040000gn/T/pip-install-bbsgdat8/mysqlclient/setup_posix.py", line 53, in <listcomp>
libraries = [dequote(i[2:]) for i in libs if i.startswith('-l')]
File "/private/var/folders/09/s28t32055hl9z2mcffwjhq040000gn/T/pip-install-bbsgdat8/mysqlclient/setup_posix.py", line 12, in dequote
raise Exception("Wrong MySQL configuration: maybe https://bugs.mysql.com/bug.php?id=86971 ?")
Exception: Wrong MySQL configuration: maybe https://bugs.mysql.com/bug.php?id=86971 ?
So, i tried https://bugs.mysql.com/bug.php?id=86971 .
$ mysql_config
Usage: /usr/local/bin/mysql_config [OPTIONS]
Options:
--cflags [-I/usr/local/Cellar/mysql-connector-c/6.1.10/include ]
--cxxflags [-I/usr/local/Cellar/mysql-connector-c/6.1.10/include ]
--include [-I/usr/local/Cellar/mysql-connector-c/6.1.10/include]
--libs [-L/usr/local/Cellar/mysql-connector-c/6.1.10/lib -l ]
--libs_r [-L/usr/local/Cellar/mysql-connector-c/6.1.10/lib -l ]
--plugindir [/usr/local/Cellar/mysql-connector-c/6.1.10/lib/plugin]
--socket [/tmp/mysql.sock]
--port [0]
--version [6.1.10]
--variable=VAR VAR is one of:
pkgincludedir [/usr/local/Cellar/mysql-connector-c/6.1.10/include]
pkglibdir [/usr/local/Cellar/mysql-connector-c/6.1.10/lib]
plugindir [/usr/local/Cellar/mysql-connector-c/6.1.10/lib/plugin]
`--libs` and `--libs_r` should have ` -lmysqlclient -lssl -lcrypto`, but it only have `-l`.
and now:
» pip3 install mysqlclient hwangziqi#huangziqideMBP
Collecting mysqlclient
Using cached https://files.pythonhosted.org/packages/f4/f1/3bb6f64ca7a429729413e6556b7ba5976df06019a5245a43d36032f1061e/mysqlclient-1.4.2.post1.tar.gz
Installing collected packages: mysqlclient
Running setup.py install for mysqlclient ... error
Complete output from command /Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/09/s28t32055hl9z2mcffwjhq040000gn/T/pip-install-85s5jozc/mysqlclient/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/09/s28t32055hl9z2mcffwjhq040000gn/T/pip-record-x9p5inkf/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.macosx-10.9-x86_64-3.7
creating build/lib.macosx-10.9-x86_64-3.7/MySQLdb
copying MySQLdb/__init__.py -> build/lib.macosx-10.9-x86_64-3.7/MySQLdb
copying MySQLdb/_exceptions.py -> build/lib.macosx-10.9-x86_64-3.7/MySQLdb
copying MySQLdb/compat.py -> build/lib.macosx-10.9-x86_64-3.7/MySQLdb
copying MySQLdb/connections.py -> build/lib.macosx-10.9-x86_64-3.7/MySQLdb
copying MySQLdb/converters.py -> build/lib.macosx-10.9-x86_64-3.7/MySQLdb
copying MySQLdb/cursors.py -> build/lib.macosx-10.9-x86_64-3.7/MySQLdb
copying MySQLdb/release.py -> build/lib.macosx-10.9-x86_64-3.7/MySQLdb
copying MySQLdb/times.py -> build/lib.macosx-10.9-x86_64-3.7/MySQLdb
creating build/lib.macosx-10.9-x86_64-3.7/MySQLdb/constants
copying MySQLdb/constants/__init__.py -> build/lib.macosx-10.9-x86_64-3.7/MySQLdb/constants
copying MySQLdb/constants/CLIENT.py -> build/lib.macosx-10.9-x86_64-3.7/MySQLdb/constants
copying MySQLdb/constants/CR.py -> build/lib.macosx-10.9-x86_64-3.7/MySQLdb/constants
copying MySQLdb/constants/ER.py -> build/lib.macosx-10.9-x86_64-3.7/MySQLdb/constants
copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.macosx-10.9-x86_64-3.7/MySQLdb/constants
copying MySQLdb/constants/FLAG.py -> build/lib.macosx-10.9-x86_64-3.7/MySQLdb/constants
running build_ext
building 'MySQLdb._mysql' extension
creating build/temp.macosx-10.9-x86_64-3.7
creating build/temp.macosx-10.9-x86_64-3.7/MySQLdb
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -Dversion_info=(1,4,2,'post',1) -D__version__=1.4.2.post1 -I/usr/local/Cellar/mysql-connector-c/6.1.11/include -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c MySQLdb/_mysql.c -o build/temp.macosx-10.9-x86_64-3.7/MySQLdb/_mysql.o
gcc -bundle -undefined dynamic_lookup -arch x86_64 -g build/temp.macosx-10.9-x86_64-3.7/MySQLdb/_mysql.o -L/usr/local/Cellar/mysql-connector-c/6.1.11/lib -lssl -lcrypto -o build/lib.macosx-10.9-x86_64-3.7/MySQLdb/_mysql.cpython-37m-darwin.so
ld: library not found for -lssl
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'gcc' failed with exit status 1
----------------------------------------
Command "/Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/09/s28t32055hl9z2mcffwjhq040000gn/T/pip-install-85s5jozc/mysqlclient/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/09/s28t32055hl9z2mcffwjhq040000gn/T/pip-record-x9p5inkf/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/09/s28t32055hl9z2mcffwjhq040000gn/T/pip-install-85s5jozc/mysqlclient/
i tried to reinstall openssl and mysql-connector-c by brew, but it was useless. My English is poor, I hope you can understand it. Thx so mush.

Error while installing thefuck module

Getting the following error after running
sudo pip install -U thefuck
Installing collected packages: psutil, decorator, six, pathlib, colorama, thefuck
Running setup.py install for psutil
Complete output from command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-G0ZOOD/psutil/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-3F2Y2_-record/install-record.txt --single-version-externally-managed --compile:
cc: error trying to exec 'as': execvp: No such file or directory
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/psutil
copying psutil/_psosx.py -> build/lib.linux-x86_64-2.7/psutil
copying psutil/__init__.py -> build/lib.linux-x86_64-2.7/psutil
copying psutil/_pslinux.py -> build/lib.linux-x86_64-2.7/psutil
copying psutil/_psbsd.py -> build/lib.linux-x86_64-2.7/psutil
copying psutil/_pswindows.py -> build/lib.linux-x86_64-2.7/psutil
copying psutil/_compat.py -> build/lib.linux-x86_64-2.7/psutil
copying psutil/_pssunos.py -> build/lib.linux-x86_64-2.7/psutil
copying psutil/_common.py -> build/lib.linux-x86_64-2.7/psutil
copying psutil/_psposix.py -> build/lib.linux-x86_64-2.7/psutil
running build_ext
building 'psutil._psutil_linux' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/psutil
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DPSUTIL_VERSION=330 -DPSUTIL_ETHTOOL_MISSING_TYPES=1 -I/usr/include/python2.7 -c psutil/_psutil_linux.c -o build/temp.linux-x86_64-2.7/psutil/_psutil_linux.o
gcc: error trying to exec 'as': execvp: No such file or directory
error: command 'gcc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-G0ZOOD/psutil/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-3F2Y2_-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-G0ZOOD/psutil
Also checked that I don't have /usr/bin/as file.
Tried installing binutils, doesn't work.

Categories