failed with error code 1 when installing django-auth-ldap - python

I am trying to use django-auth-ldap so first of course I need to install it. I tried to just do pip install django-auth-ldap and that gives me the following problem:
C:\Users\hansong.li\AppData\Local\Programs\Python\Python35-32\Scripts>pip install django-auth-ldap
Collecting django-auth-ldap
Using cached django_auth_ldap-1.2.8-py3-none-any.whl
Collecting pyldap (from django-auth-ldap)
Using cached pyldap-2.4.25.1.tar.gz
Requirement already satisfied (use --upgrade to upgrade): django in c:\users\hansong.li\appdata\local\programs\python\python35-32\lib\site-packages (from django-auth-ldap)
Requirement already satisfied (use --upgrade to upgrade): setuptools in c:\users\hansong.li\appdata\local\programs\python\python35-32\lib\site-packages (from pyldap->django-auth-ldap)
Installing collected packages: pyldap, django-auth-ldap
Running setup.py install for pyldap ... error
Complete output from command c:\users\hansong.li\appdata\local\programs\python\python35-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\hansong.li\\AppData\\Local\\Temp\\pip-build-bak9l5f6\\pyldap\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\hansong.li\AppData\Local\Temp\pip-z6tq2vvb-record\install-record.txt --single-version-externally-managed --compile:
defines: HAVE_SASL HAVE_TLS HAVE_LIBLDAP_R
extra_compile_args:
extra_objects:
include_dirs: /usr/include /usr/include/sasl /usr/local/include /usr/local/include/sasl
library_dirs: /usr/lib /usr/lib64 /usr/local/lib /usr/local/lib64
libs: ldap_r
running install
running build
running build_py
file Lib\ldap.py (for module ldap) not found
file Lib\ldap\controls.py (for module ldap.controls) not found
file Lib\ldap\extop.py (for module ldap.extop) not found
file Lib\ldap\schema.py (for module ldap.schema) not found
creating build\lib.win32-3.5
copying Lib\ldapurl.py -> build\lib.win32-3.5
copying Lib\ldif.py -> build\lib.win32-3.5
copying Lib\dsml.py -> build\lib.win32-3.5
creating build\lib.win32-3.5\ldap
copying Lib\ldap\__init__.py -> build\lib.win32-3.5\ldap
copying Lib\ldap\async.py -> build\lib.win32-3.5\ldap
copying Lib\ldap\compat.py -> build\lib.win32-3.5\ldap
creating build\lib.win32-3.5\ldap\controls
copying Lib\ldap\controls\__init__.py -> build\lib.win32-3.5\ldap\controls
copying Lib\ldap\controls\deref.py -> build\lib.win32-3.5\ldap\controls
copying Lib\ldap\controls\libldap.py -> build\lib.win32-3.5\ldap\controls
copying Lib\ldap\controls\openldap.py -> build\lib.win32-3.5\ldap\controls
copying Lib\ldap\controls\ppolicy.py -> build\lib.win32-3.5\ldap\controls
copying Lib\ldap\controls\psearch.py -> build\lib.win32-3.5\ldap\controls
copying Lib\ldap\controls\pwdpolicy.py -> build\lib.win32-3.5\ldap\controls
copying Lib\ldap\controls\readentry.py -> build\lib.win32-3.5\ldap\controls
copying Lib\ldap\controls\sessiontrack.py -> build\lib.win32-3.5\ldap\controls
copying Lib\ldap\controls\simple.py -> build\lib.win32-3.5\ldap\controls
copying Lib\ldap\cidict.py -> build\lib.win32-3.5\ldap
copying Lib\ldap\dn.py -> build\lib.win32-3.5\ldap
creating build\lib.win32-3.5\ldap\extop
copying Lib\ldap\extop\__init__.py -> build\lib.win32-3.5\ldap\extop
copying Lib\ldap\extop\dds.py -> build\lib.win32-3.5\ldap\extop
copying Lib\ldap\filter.py -> build\lib.win32-3.5\ldap
copying Lib\ldap\functions.py -> build\lib.win32-3.5\ldap
copying Lib\ldap\ldapobject.py -> build\lib.win32-3.5\ldap
copying Lib\ldap\logger.py -> build\lib.win32-3.5\ldap
copying Lib\ldap\modlist.py -> build\lib.win32-3.5\ldap
copying Lib\ldap\resiter.py -> build\lib.win32-3.5\ldap
copying Lib\ldap\sasl.py -> build\lib.win32-3.5\ldap
creating build\lib.win32-3.5\ldap\schema
copying Lib\ldap\schema\__init__.py -> build\lib.win32-3.5\ldap\schema
copying Lib\ldap\schema\models.py -> build\lib.win32-3.5\ldap\schema
copying Lib\ldap\schema\subentry.py -> build\lib.win32-3.5\ldap\schema
copying Lib\ldap\schema\tokenizer.py -> build\lib.win32-3.5\ldap\schema
copying Lib\ldap\syncrepl.py -> build\lib.win32-3.5\ldap
file Lib\ldap.py (for module ldap) not found
file Lib\ldap\controls.py (for module ldap.controls) not found
file Lib\ldap\extop.py (for module ldap.extop) not found
file Lib\ldap\schema.py (for module ldap.schema) not found
running egg_info
writing dependency_links to Lib\pyldap.egg-info\dependency_links.txt
writing requirements to Lib\pyldap.egg-info\requires.txt
writing Lib\pyldap.egg-info\PKG-INFO
writing top-level names to Lib\pyldap.egg-info\top_level.txt
warning: manifest_maker: standard file '-c' not found
file Lib\ldap.py (for module ldap) not found
file Lib\ldap\controls.py (for module ldap.controls) not found
file Lib\ldap\extop.py (for module ldap.extop) not found
file Lib\ldap\schema.py (for module ldap.schema) not found
reading manifest file 'Lib\pyldap.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'Makefile'
warning: no files found matching 'LICENCE'
warning: no files found matching 'Modules\LICENSE'
writing manifest file 'Lib\pyldap.egg-info\SOURCES.txt'
running build_ext
building '_ldap' extension
creating build\temp.win32-3.5
creating build\temp.win32-3.5\Release
creating build\temp.win32-3.5\Release\Modules
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DHAVE_SASL -DHAVE_TLS -DHAVE_LIBLDAP_R -DHAVE_LIBLDAP_R -DLDAPMODULE_VERSION=2.4.25.1 -IModules -I/usr/include -I/usr/include/sasl -I/usr/local/include -I/usr/local/include/sasl -Ic:\users\hansong.li\appdata\local\programs\python\python35-32\include -Ic:\users\hansong.li\appdata\local\programs\python\python35-32\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\winrt" /TcModules/LDAPObject.c /Fobuild\temp.win32-3.5\Release\Modules/LDAPObject.obj
LDAPObject.c
c:\users\hansong.li\appdata\local\temp\pip-build-bak9l5f6\pyldap\modules\errors.h(8): fatal error C1083: Cannot open include file: 'lber.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\cl.exe' failed with exit status 2
----------------------------------------
Command "c:\users\hansong.li\appdata\local\programs\python\python35-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\hansong.li\\AppData\\Local\\Temp\\pip-build-bak9l5f6\\pyldap\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\hansong.li\AppData\Local\Temp\pip-z6tq2vvb-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\hansong.li\AppData\Local\Temp\pip-build-bak9l5f6\pyldap\
So then I tried to download a windows binary of it, and tried:
C:\Users\hansong.li\AppData\Local\Programs\Python\Python35-32\Scripts>pip install C:\Users\hansong.li\Downloads\python-ldap-2.4.27
Processing c:\users\hansong.li\downloads\python-ldap-2.4.27
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\hansong.li\AppData\Local\Temp\pip-4d49q60t-build\setup.py", line 53
print name + ': ' + cfg.get('_ldap', name)
^
SyntaxError: invalid syntax
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\hansong.li\AppData\Local\Temp\pip-4d49q60t-build\
I also tried to download the wheel and install from there, it also failed and looks just like the first error. Now I am really confused at how to do about this.

Related

Python - Mysqldb install Error [ ERROR: Command errored out with exit status 1:]

I was able to install Mysqldb with the pip install mysql-python command before(in Pycharm), but after installing Visual Code yesterday, it now gives an error. I did everything. I installed Visual Studio Build Tools, deleted and installed Python and Anaconda, but it still won't install. What should I do?
pip install mysql-python
Collecting mysql-python
Using cached MySQL-python-1.2.5.zip (108 kB)
Building wheels for collected packages: mysql-python
Building wheel for mysql-python (setup.py) ... \ WARNING: Subprocess output does not appear to be encoded as cp1254
error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\90539\Anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\90539\\AppData\\Local\\Temp\\pip-install-tn8inoxo\\mysql-python
\\setup.py'"'"'; __file__='"'"'C:\\Users\\90539\\AppData\\Local\\Temp\\pip-install-tn8inoxo\\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 'C:\Users\90539\AppData\Local\Temp\pip-wheel-dk9sq9jv'
cwd: C:\Users\90539\AppData\Local\Temp\pip-install-tn8inoxo\mysql-python\
Complete output (33 lines):
C:\Users\90539\Anaconda3\lib\site-packages\setuptools\dist.py:669: UserWarning: Usage of dash-separated 'distribution-name' will not be supported in future versions. Please use the u
nderscore name 'distribution_name' instead
warnings.warn(
C:\Users\90539\Anaconda3\lib\site-packages\setuptools\dist.py:669: UserWarning: Usage of dash-separated 'build-requires' will not be supported in future versions. Please use the unde
rscore name 'build_requires' instead
warnings.warn(
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.8
copying _mysql_exceptions.py -> build\lib.win-amd64-3.8
creating build\lib.win-amd64-3.8\MySQLdb
copying MySQLdb\__init__.py -> build\lib.win-amd64-3.8\MySQLdb
copying MySQLdb\converters.py -> build\lib.win-amd64-3.8\MySQLdb
copying MySQLdb\connections.py -> build\lib.win-amd64-3.8\MySQLdb
copying MySQLdb\cursors.py -> build\lib.win-amd64-3.8\MySQLdb
copying MySQLdb\release.py -> build\lib.win-amd64-3.8\MySQLdb
copying MySQLdb\times.py -> build\lib.win-amd64-3.8\MySQLdb
creating build\lib.win-amd64-3.8\MySQLdb\constants
copying MySQLdb\constants\__init__.py -> build\lib.win-amd64-3.8\MySQLdb\constants
copying MySQLdb\constants\CR.py -> build\lib.win-amd64-3.8\MySQLdb\constants
copying MySQLdb\constants\FIELD_TYPE.py -> build\lib.win-amd64-3.8\MySQLdb\constants
copying MySQLdb\constants\ER.py -> build\lib.win-amd64-3.8\MySQLdb\constants
copying MySQLdb\constants\FLAG.py -> build\lib.win-amd64-3.8\MySQLdb\constants
copying MySQLdb\constants\REFRESH.py -> build\lib.win-amd64-3.8\MySQLdb\constants
copying MySQLdb\constants\CLIENT.py -> build\lib.win-amd64-3.8\MySQLdb\constants
running build_ext
building '_mysql' extension
creating build\temp.win-amd64-3.8
creating build\temp.win-amd64-3.8\Release
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29910\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Dversion_info=(1,2,5,'final',1) -
D__version__=1.2.5 "-IC:\Program Files (x86)\MySQL\MySQL Connector C 6.0.2\include" -IC:\Users\90539\Anaconda3\include -IC:\Users\90539\Anaconda3\include "-IC:\Program Files (x86)\Micr
osoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29910\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\in
clude\10.0.19041.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" "-IC:\Program Files
(x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" /Tc_mysql.c /Fobuild\temp.win-amd64-3.8\Release\_mysql.obj /Zl
_mysql.c
_mysql.c(42): fatal error C1083: i‡erme dosyas\x8d a‡\x8dlam\x8dyor: 'config-win.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.28.29910\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Failed building wheel for mysql-python
Running setup.py clean for mysql-python
Failed to build mysql-python
Installing collected packages: mysql-python
Running setup.py install for mysql-python ... / WARNING: Subprocess output does not appear to be encoded as cp1254
error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\90539\Anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\90539\\AppData\\Local\\Temp\\pip-install-tn8inoxo\\mysql-pyth
on\\setup.py'"'"'; __file__='"'"'C:\\Users\\90539\\AppData\\Local\\Temp\\pip-install-tn8inoxo\\mysql-python\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.re
ad().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\90539\AppData\Local\Temp\pip-record-ac858le3\install-reco
rd.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\90539\Anaconda3\Include\mysql-python'
cwd: C:\Users\90539\AppData\Local\Temp\pip-install-tn8inoxo\mysql-python\
Complete output (33 lines):
C:\Users\90539\Anaconda3\lib\site-packages\setuptools\dist.py:669: UserWarning: Usage of dash-separated 'distribution-name' will not be supported in future versions. Please use the
underscore name 'distribution_name' instead
warnings.warn(
C:\Users\90539\Anaconda3\lib\site-packages\setuptools\dist.py:669: UserWarning: Usage of dash-separated 'build-requires' will not be supported in future versions. Please use the un
derscore name 'build_requires' instead
warnings.warn(
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.8
copying _mysql_exceptions.py -> build\lib.win-amd64-3.8
creating build\lib.win-amd64-3.8\MySQLdb
copying MySQLdb\__init__.py -> build\lib.win-amd64-3.8\MySQLdb
copying MySQLdb\converters.py -> build\lib.win-amd64-3.8\MySQLdb
copying MySQLdb\connections.py -> build\lib.win-amd64-3.8\MySQLdb
copying MySQLdb\cursors.py -> build\lib.win-amd64-3.8\MySQLdb
copying MySQLdb\release.py -> build\lib.win-amd64-3.8\MySQLdb
copying MySQLdb\times.py -> build\lib.win-amd64-3.8\MySQLdb
creating build\lib.win-amd64-3.8\MySQLdb\constants
copying MySQLdb\constants\__init__.py -> build\lib.win-amd64-3.8\MySQLdb\constants
copying MySQLdb\constants\CR.py -> build\lib.win-amd64-3.8\MySQLdb\constants
copying MySQLdb\constants\FIELD_TYPE.py -> build\lib.win-amd64-3.8\MySQLdb\constants
copying MySQLdb\constants\ER.py -> build\lib.win-amd64-3.8\MySQLdb\constants
copying MySQLdb\constants\FLAG.py -> build\lib.win-amd64-3.8\MySQLdb\constants
copying MySQLdb\constants\REFRESH.py -> build\lib.win-amd64-3.8\MySQLdb\constants
copying MySQLdb\constants\CLIENT.py -> build\lib.win-amd64-3.8\MySQLdb\constants
running build_ext
building '_mysql' extension
creating build\temp.win-amd64-3.8
creating build\temp.win-amd64-3.8\Release
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29910\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Dversion_info=(1,2,5,'final',1)
-D__version__=1.2.5 "-IC:\Program Files (x86)\MySQL\MySQL Connector C 6.0.2\include" -IC:\Users\90539\Anaconda3\include -IC:\Users\90539\Anaconda3\include "-IC:\Program Files (x86)\Mi
crosoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29910\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\
include\10.0.19041.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" "-IC:\Program File
s (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" /Tc_mysql.c /Fobuild\temp.win-amd64-3.8\Release\_mysql.obj /Zl
_mysql.c
_mysql.c(42): fatal error C1083: i‡erme dosyas\x8d a‡\x8dlam\x8dyor: 'config-win.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.28.29910\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\90539\Anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\90539\\AppData\\Local\\Temp\
\pip-install-tn8inoxo\\mysql-python\\setup.py'"'"'; __file__='"'"'C:\\Users\\90539\\AppData\\Local\\Temp\\pip-install-tn8inoxo\\mysql-python\\setup.py'"'"';f=getattr(tokenize, '"'"'ope
n'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\90539\AppData\Local\Temp
\pip-record-ac858le3\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\90539\Anaconda3\Include\mysql-python' Check the logs for full command
output.
Is it possible that your python version changed from 2.7 to some 3.x version? See the package documentation here, it reads:
MySQL-3.23 through 5.5 and Python-2.4 through 2.7 are currently
supported. Python-3.0 will be supported in a future release. PyPy is
supported.
If you are now on 3.x try pip install mysqlclient.

How to fix "Failed building wheel for pyscipopt"?

I'm trying to install Pyscipopt for homework. There was an installation guide on the school website, the problem is that it doesn't work on my laptop. I have to write "pip install pyscipopt" in Anaconda Prompt, but I get the error "failed building wheel for pyscipopt". I don't know what it means or how to solve this, can anyone help me?
(base) C:\Users\claire>pip install pyscipopt
Collecting pyscipopt
Using cached https://files.pythonhosted.org/packages/a7/47/e3d5fcc37138c0eb9695d7c26e22b999c1274b06606db183c2aa36f98e5a/PySCIPOpt-2.2.0.tar.gz
Building wheels for collected packages: pyscipopt
Building wheel for pyscipopt (setup.py) ... error
ERROR: Complete output from command 'C:\Users\claire\Anaconda3\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\\Users\\claire\\AppData\\Local\\Temp\\pip-install-zja79xrm\\pyscipopt\\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\claire\AppData\Local\Temp\pip-wheel-jnmor4q4' --python-tag cp37:
ERROR: Using include path <C:\Users\claire\AppData\Local\Temp\pip-install-zja79xrm\pyscipopt\src>.
Using SCIP library <scip> at <C:\Users\claire\AppData\Local\Temp\pip-install-zja79xrm\pyscipopt\lib>.
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
creating build\lib.win-amd64-3.7\pyscipopt
copying src\pyscipopt\Multidict.py -> build\lib.win-amd64-3.7\pyscipopt
copying src\pyscipopt\__init__.py -> build\lib.win-amd64-3.7\pyscipopt
copying src\pyscipopt\scip.pyx -> build\lib.win-amd64-3.7\pyscipopt
copying src\pyscipopt\scip.pxd -> build\lib.win-amd64-3.7\pyscipopt
copying src\pyscipopt\benders.pxi -> build\lib.win-amd64-3.7\pyscipopt
copying src\pyscipopt\benderscut.pxi -> build\lib.win-amd64-3.7\pyscipopt
copying src\pyscipopt\branchrule.pxi -> build\lib.win-amd64-3.7\pyscipopt
copying src\pyscipopt\conshdlr.pxi -> build\lib.win-amd64-3.7\pyscipopt
copying src\pyscipopt\event.pxi -> build\lib.win-amd64-3.7\pyscipopt
copying src\pyscipopt\expr.pxi -> build\lib.win-amd64-3.7\pyscipopt
copying src\pyscipopt\heuristic.pxi -> build\lib.win-amd64-3.7\pyscipopt
copying src\pyscipopt\lp.pxi -> build\lib.win-amd64-3.7\pyscipopt
copying src\pyscipopt\presol.pxi -> build\lib.win-amd64-3.7\pyscipopt
copying src\pyscipopt\pricer.pxi -> build\lib.win-amd64-3.7\pyscipopt
copying src\pyscipopt\propagator.pxi -> build\lib.win-amd64-3.7\pyscipopt
copying src\pyscipopt\relax.pxi -> build\lib.win-amd64-3.7\pyscipopt
copying src\pyscipopt\sepa.pxi -> build\lib.win-amd64-3.7\pyscipopt
running build_ext
building 'pyscipopt.scip' extension
creating build\temp.win-amd64-3.7
creating build\temp.win-amd64-3.7\Release
creating build\temp.win-amd64-3.7\Release\src
creating build\temp.win-amd64-3.7\Release\src\pyscipopt
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.15.26726\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\claire\AppData\Local\Temp\pip-install-zja79xrm\pyscipopt\src -IC:\Users\claire\Anaconda3\include -IC:\Users\claire\Anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.15.26726\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.15.26726\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\cppwinrt" /Tcsrc\pyscipopt\scip.c /Fobuild\temp.win-amd64-3.7\Release\src\pyscipopt\scip.obj
scip.c
src\pyscipopt\scip.c(621): fatal error C1083: Cannot open include file: 'scip/scip.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\VC\\Tools\\MSVC\\14.15.26726\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Failed building wheel for pyscipopt
Running setup.py clean for pyscipopt
Failed to build pyscipopt
Installing collected packages: pyscipopt
Running setup.py install for pyscipopt ... error
ERROR: Complete output from command 'C:\Users\claire\Anaconda3\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\\Users\\claire\\AppData\\Local\\Temp\\pip-install-zja79xrm\\pyscipopt\\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\claire\AppData\Local\Temp\pip-record-aw3wx8lo\install-record.txt' --single-version-externally-managed --compile:
ERROR: Using include path <C:\Users\claire\AppData\Local\Temp\pip-install-zja79xrm\pyscipopt\src>.
Using SCIP library <scip> at <C:\Users\claire\AppData\Local\Temp\pip-install-zja79xrm\pyscipopt\lib>.
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
creating build\lib.win-amd64-3.7\pyscipopt
copying src\pyscipopt\Multidict.py -> build\lib.win-amd64-3.7\pyscipopt
copying src\pyscipopt\__init__.py -> build\lib.win-amd64-3.7\pyscipopt
copying src\pyscipopt\scip.pyx -> build\lib.win-amd64-3.7\pyscipopt
copying src\pyscipopt\scip.pxd -> build\lib.win-amd64-3.7\pyscipopt
copying src\pyscipopt\benders.pxi -> build\lib.win-amd64-3.7\pyscipopt
copying src\pyscipopt\benderscut.pxi -> build\lib.win-amd64-3.7\pyscipopt
copying src\pyscipopt\branchrule.pxi -> build\lib.win-amd64-3.7\pyscipopt
copying src\pyscipopt\conshdlr.pxi -> build\lib.win-amd64-3.7\pyscipopt
copying src\pyscipopt\event.pxi -> build\lib.win-amd64-3.7\pyscipopt
copying src\pyscipopt\expr.pxi -> build\lib.win-amd64-3.7\pyscipopt
copying src\pyscipopt\heuristic.pxi -> build\lib.win-amd64-3.7\pyscipopt
copying src\pyscipopt\lp.pxi -> build\lib.win-amd64-3.7\pyscipopt
copying src\pyscipopt\presol.pxi -> build\lib.win-amd64-3.7\pyscipopt
copying src\pyscipopt\pricer.pxi -> build\lib.win-amd64-3.7\pyscipopt
copying src\pyscipopt\propagator.pxi -> build\lib.win-amd64-3.7\pyscipopt
copying src\pyscipopt\relax.pxi -> build\lib.win-amd64-3.7\pyscipopt
copying src\pyscipopt\sepa.pxi -> build\lib.win-amd64-3.7\pyscipopt
running build_ext
building 'pyscipopt.scip' extension
creating build\temp.win-amd64-3.7
creating build\temp.win-amd64-3.7\Release
creating build\temp.win-amd64-3.7\Release\src
creating build\temp.win-amd64-3.7\Release\src\pyscipopt
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.15.26726\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\claire\AppData\Local\Temp\pip-install-zja79xrm\pyscipopt\src -IC:\Users\claire\Anaconda3\include -IC:\Users\claire\Anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.15.26726\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.15.26726\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\cppwinrt" /Tcsrc\pyscipopt\scip.c /Fobuild\temp.win-amd64-3.7\Release\src\pyscipopt\scip.obj
scip.c
src\pyscipopt\scip.c(621): fatal error C1083: Cannot open include file: 'scip/scip.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\VC\\Tools\\MSVC\\14.15.26726\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Command "'C:\Users\claire\Anaconda3\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\\Users\\claire\\AppData\\Local\\Temp\\pip-install-zja79xrm\\pyscipopt\\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\claire\AppData\Local\Temp\pip-record-aw3wx8lo\install-record.txt' --single-version-externally-managed --compile" failed with error code 1 in C:\Users\claire\AppData\Local\Temp\pip-install-zja79xrm\pyscipopt\
This is the actual error:
Cannot open include file: 'scip/scip.h': No such file or directory
To resolve it, please carry out the installation instructions as outlined here. Most importantly, you need to install the SCIP Optimization Suite first. You can get the Windows installer here. After installing, you need to set an environment variable telling the PySCIPOpt installer where to find the SCIP library for linking:
set SCIPOPTDIR="C:\Program Files\SCIPOptSuite-6.0.2"
pip install pyscipopt
(assuming you used the default installation path for the SCIPOptSuite)
I got this error trying to install python conda:
pip install conda
The error displayed was:
Building wheel for pycosat (setup.py) ... error
...
pycosat.c:10:10: fatal error: Python.h: No such file or directory 10 |
#include <Python.h>`
The solution was to install python3-dev, which has the required header.
sudo apt-get install python3-dev
The solution was here:
https://github.com/conda/pycosat/issues/34
It doesn't solve OP's specific problem, but I ended up here looking for a solution to this error.
Try this
pip install <package> --no-cache-dir

Install MySQL Client in Django Show Error

Hi I am trying to install Mysqlclient in Django and I got this message
collecting mysqlclient
Using cached https://files.pythonhosted.org/packages/f4/f1/3bb6f64ca7a429729413e6556b7ba5976df06019a5245a43d36032f1061e/mysqlclient-1.4.2.post1.tar.gz
Building wheels for collected packages: mysqlclient
Building wheel for mysqlclient (setup.py) ... error
ERROR: Complete output from command 'c:\users\usermo~1\virtua~1\tmsv2_~2\scripts\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\\Users\\userMO~1\\AppData\\Local\\Temp\\pip-install-vzfx29bg\\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 'C:\Users\userMO~1\AppData\Local\Temp\pip-wheel-rd_6y67h' --python-tag cp37:
ERROR: running bdist_wheel
running build
running build_py
creating build
creating build\lib.win32-3.7
creating build\lib.win32-3.7\MySQLdb
copying MySQLdb\__init__.py -> build\lib.win32-3.7\MySQLdb
copying MySQLdb\_exceptions.py -> build\lib.win32-3.7\MySQLdb
copying MySQLdb\compat.py -> build\lib.win32-3.7\MySQLdb
copying MySQLdb\connections.py -> build\lib.win32-3.7\MySQLdb
copying MySQLdb\converters.py -> build\lib.win32-3.7\MySQLdb
copying MySQLdb\cursors.py -> build\lib.win32-3.7\MySQLdb
copying MySQLdb\release.py -> build\lib.win32-3.7\MySQLdb
copying MySQLdb\times.py -> build\lib.win32-3.7\MySQLdb
creating build\lib.win32-3.7\MySQLdb\constants
copying MySQLdb\constants\__init__.py -> build\lib.win32-3.7\MySQLdb\constants
copying MySQLdb\constants\CLIENT.py -> build\lib.win32-3.7\MySQLdb\constants
copying MySQLdb\constants\CR.py -> build\lib.win32-3.7\MySQLdb\constants
copying MySQLdb\constants\ER.py -> build\lib.win32-3.7\MySQLdb\constants
copying MySQLdb\constants\FIELD_TYPE.py -> build\lib.win32-3.7\MySQLdb\constants
copying MySQLdb\constants\FLAG.py -> build\lib.win32-3.7\MySQLdb\constants
running build_ext
building 'MySQLdb._mysql' extension
creating build\temp.win32-3.7
creating build\temp.win32-3.7\Release
creating build\temp.win32-3.7\Release\MySQLdb
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\HostX86\x86\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Dversion_info=(1,4,2,'post',1) -D__version__=1.4.2.post1 "-IC:\Program Files (x86)\MySQL\MySQL Connector C 6.1\include\mariadb" "-Ic:\users\user moe\appdata\local\programs\python\python37-32\include" "-Ic:\users\user moe\appdata\local\programs\python\python37-32\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt" /TcMySQLdb/_mysql.c /Fobuild\temp.win32-3.7\Release\MySQLdb/_mysql.obj /Zl /D_CRT_SECURE_NO_WARNINGS
_mysql.c
MySQLdb/_mysql.c(29): fatal error C1083: Cannot open include file: 'mysql.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools\\VC\\Tools\\MSVC\\14.16.27023\\bin\\HostX86\\x86\\cl.exe' failed with exit status 2
----------------------------------------
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: Complete output from command 'c:\users\usermo~1\virtua~1\tmsv2_~2\scripts\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\\Users\\userMO~1\\AppData\\Local\\Temp\\pip-install-vzfx29bg\\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 'C:\Users\userMO~1\AppData\Local\Temp\pip-record-ea_7lykd\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\usermo~1\virtua~1\tmsv2_~2\include\site\python3.7\mysqlclient':
ERROR: running install
running build
running build_py
creating build
creating build\lib.win32-3.7
creating build\lib.win32-3.7\MySQLdb
copying MySQLdb\__init__.py -> build\lib.win32-3.7\MySQLdb
copying MySQLdb\_exceptions.py -> build\lib.win32-3.7\MySQLdb
copying MySQLdb\compat.py -> build\lib.win32-3.7\MySQLdb
copying MySQLdb\connections.py -> build\lib.win32-3.7\MySQLdb
copying MySQLdb\converters.py -> build\lib.win32-3.7\MySQLdb
copying MySQLdb\cursors.py -> build\lib.win32-3.7\MySQLdb
copying MySQLdb\release.py -> build\lib.win32-3.7\MySQLdb
copying MySQLdb\times.py -> build\lib.win32-3.7\MySQLdb
creating build\lib.win32-3.7\MySQLdb\constants
copying MySQLdb\constants\__init__.py -> build\lib.win32-3.7\MySQLdb\constants
copying MySQLdb\constants\CLIENT.py -> build\lib.win32-3.7\MySQLdb\constants
copying MySQLdb\constants\CR.py -> build\lib.win32-3.7\MySQLdb\constants
copying MySQLdb\constants\ER.py -> build\lib.win32-3.7\MySQLdb\constants
copying MySQLdb\constants\FIELD_TYPE.py -> build\lib.win32-3.7\MySQLdb\constants
copying MySQLdb\constants\FLAG.py -> build\lib.win32-3.7\MySQLdb\constants
running build_ext
building 'MySQLdb._mysql' extension
creating build\temp.win32-3.7
creating build\temp.win32-3.7\Release
creating build\temp.win32-3.7\Release\MySQLdb
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\HostX86\x86\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Dversion_info=(1,4,2,'post',1) -D__version__=1.4.2.post1 "-IC:\Program Files
(x86)\MySQL\MySQL Connector C 6.1\include\mariadb" "-Ic:\users\user moe\appdata\local\programs\python\python37-32\include" "-Ic:\users\user moe\appdata\local\programs\python\python37-32\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt" /TcMySQLdb/_mysql.c /Fobuild\temp.win32-3.7\Release\MySQLdb/_mysql.obj /Zl /D_CRT_SECURE_NO_WARNINGS
_mysql.c
MySQLdb/_mysql.c(29): fatal error C1083: Cannot open include file: 'mysql.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools\\VC\\Tools\\MSVC\\14.16.27023\\bin\\HostX86\\x86\\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Command "'c:\users\usermo~1\virtua~1\tmsv2_~2\scripts\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\\Users\\userMO~1\\AppData\\Local\\Temp\\pip-install-vzfx29bg\\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 'C:\Users\userMO~1\AppData\Local\Temp\pip-record-ea_7lykd\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\usermo~1\virtua~1\tmsv2_~2\include\site\python3.7\mysqlclient'" failed with error code 1 in C:\Users\userMO~1\AppData\Local\Temp\pip-install-vzfx29bg\mysqlclient\
I already tried several way
pip install opencv-contrib-python (can install no work)
pip install mysqlclient==1.3.12 (show same error)
I install the mycsqlclient from Wheel Link (show this error mysqlclient-1.4.2-cp38-cp38m-win_amd64.whl is not a supported wheel on this platform.)
My python version is: 3.7.3
(I come from desktop environment and while I read the Django, its say "Ridiculously fast" but now for MySQL connection problem took 4 days already).
You have downloaded the wrong wheel. The error message says you tried to install mysqlclient-1.4.2-cp38-cp38m-win_amd64.whl, which is for Python 3.8.
Since you are using Python 3.7, you should use either mysqlclient‑1.4.2‑cp37‑cp37m‑win32.whl or mysqlclient‑1.4.2‑cp37‑cp37m‑win_amd64.whl depending on whether you have installed 32-bit or 64-bit Python.
It seems like your Build Tools cannot handle some .h files. You can use unofficial precompiled package database to get already compiled mysqlclient.
After downloading it run
pip install name-of-whl-file.whl
If the python+win version of whl file fails to install, try using another version. Always works for me if Build Tools fail.
You can use pymysql
1.Install pymysql
pip install pymysql
Modify your init.py file
import pymysql
pymysql.install_as_MySQLdb()
You can start your project
I got the same error when I try to install mysqlclient in windows. after much time spent in this error. I found a result in the result install the latest visual studio and visual studio build tools. if programmer and only work on coding then transfer windows to ubuntu.i transfer on Ubuntu and enjoy coding
try this:
pip install mysqlclient-1.4.4-cp38-cp38-win_amd64.whl
if it did'nt work, then use the 32bit version
pip install mysqlclient-1.4.4-cp38-cp38-win32.whl
The best way to install mysql-client is to go to https://www.lfd.uci.edu/~gohlke/pythonlibs/#mysqlclient and you will find many mysql-client wheels.
Download the first one #do not change the name of the file,,
open command prompt,
use cd to go to the directory where your wheel has been installed,
then use pip install (name of file) #use .whl as well
if it doesn't work, download the second one and repeat the process, if that doesn't work as well, keep on downloading until I guarantee you that at least one of them would be installed in your computer

Installing AIORTC via pip on Windows10

how can I install AIORTC, the WebRTC/ObjectRTC bindings for Python on windows? when I do pip install aiortc, I get the below error:
I have the lib opus source code I got from their webpage, but where can I put it? if I'm understanding the error it can't find the c headers in the include path.
any suggestions would be greatly appreciated.
C:\Users\jmh>pip install aiortc
Collecting aiortc
Downloading https://files.pythonhosted.org/packages/d3/36/33ac9464f02198e0adbfc47f8a1106c09681750646efab1994e578b08f96/aiortc-0.9.3.tar.gz (1.1MB)
100% |████████████████████████████████| 1.1MB 9.3MB/s
Collecting aioice<0.7.0,>=0.6.0 (from aiortc)
Downloading https://files.pythonhosted.org/packages/01/57/a006fbb72ea5d3d428eb1243927c864cd8df64b09db84ba12906934a87aa/aioice-0.6.4-py3-none-any.whl
Requirement already satisfied: attrs in c:\users\jmh\anaconda3\lib\site-packages (from aiortc) (17.4.0)
Collecting crcmod (from aiortc)
Downloading https://files.pythonhosted.org/packages/6b/b0/e595ce2a2527e169c3bcd6c33d2473c1918e0b7f6826a043ca1245dd4e5b/crcmod-1.7.tar.gz (89kB)
100% |████████████████████████████████| 92kB 6.2MB/s
Collecting cryptography>=2.2 (from aiortc)
Downloading https://files.pythonhosted.org/packages/9e/93/1309bdc65b757bc6318fe835ce9388a2e23e47d3eca93f5834f1d7df70bb/cryptography-2.3-cp36-cp36m-win_amd64.whl (1.3MB)
100% |████████████████████████████████| 1.3MB 7.9MB/s
Collecting pyee (from aiortc)
Downloading https://files.pythonhosted.org/packages/8e/06/10c18578e2d8b9cf9902f424f86d433c647ca55e82293100f53e6c0afab4/pyee-5.0.0-py2.py3-none-any.whl
Collecting pylibsrtp>=0.5.0 (from aiortc)
Downloading https://files.pythonhosted.org/packages/bb/6d/9dddce7658bef12d2b9625e9a1905fab12d2d7252ecffa6729080bf8dc10/pylibsrtp-0.5.5-cp36-cp36m-win_amd64.whl (48kB)
100% |████████████████████████████████| 51kB 4.2MB/s
Requirement already satisfied: pyopenssl in c:\users\jmh\anaconda3\lib\site-packages (from aiortc) (17.5.0)
Collecting netifaces (from aioice<0.7.0,>=0.6.0->aiortc)
Downloading https://files.pythonhosted.org/packages/00/ba/227e378b815a075bbda86e516e31d55430abdaa32941b72144117f7a8999/netifaces-0.10.7-cp36-cp36m-win_amd64.whl
Requirement already satisfied: cffi!=1.11.3,>=1.7 in c:\users\jmh\anaconda3\lib\site-packages (from cryptography>=2.2->aiortc) (1.11.4)
Requirement already satisfied: six>=1.4.1 in c:\users\jmh\appdata\roaming\python\python36\site-packages (from cryptography>=2.2->aiortc) (1.11.0)
Requirement already satisfied: asn1crypto>=0.21.0 in c:\users\jmh\anaconda3\lib\site-packages (from cryptography>=2.2->aiortc) (0.24.0)
Requirement already satisfied: idna>=2.1 in c:\users\jmh\anaconda3\lib\site-packages (from cryptography>=2.2->aiortc) (2.6)
Requirement already satisfied: pycparser in c:\users\jmh\anaconda3\lib\site-packages (from cffi!=1.11.3,>=1.7->cryptography>=2.2->aiortc) (2.18)
Building wheels for collected packages: aiortc, crcmod
Running setup.py bdist_wheel for aiortc ... error
Complete output from command c:\users\jmh\anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\jmh\\AppData\\Local\\Temp\\pip-install-0twgblb0\\aiortc\\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\jmh\AppData\Local\Temp\pip-wheel-7xd9rp4p --python-tag cp36:
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.6
creating build\lib.win-amd64-3.6\aiortc
copying aiortc\exceptions.py -> build\lib.win-amd64-3.6\aiortc
copying aiortc\jitterbuffer.py -> build\lib.win-amd64-3.6\aiortc
copying aiortc\mediastreams.py -> build\lib.win-amd64-3.6\aiortc
copying aiortc\rtcconfiguration.py -> build\lib.win-amd64-3.6\aiortc
copying aiortc\rtcdatachannel.py -> build\lib.win-amd64-3.6\aiortc
copying aiortc\rtcdtlstransport.py -> build\lib.win-amd64-3.6\aiortc
copying aiortc\rtcicetransport.py -> build\lib.win-amd64-3.6\aiortc
copying aiortc\rtcpeerconnection.py -> build\lib.win-amd64-3.6\aiortc
copying aiortc\rtcrtpparameters.py -> build\lib.win-amd64-3.6\aiortc
copying aiortc\rtcrtpreceiver.py -> build\lib.win-amd64-3.6\aiortc
copying aiortc\rtcrtpsender.py -> build\lib.win-amd64-3.6\aiortc
copying aiortc\rtcrtptransceiver.py -> build\lib.win-amd64-3.6\aiortc
copying aiortc\rtcsctptransport.py -> build\lib.win-amd64-3.6\aiortc
copying aiortc\rtcsessiondescription.py -> build\lib.win-amd64-3.6\aiortc
copying aiortc\rtp.py -> build\lib.win-amd64-3.6\aiortc
copying aiortc\sdp.py -> build\lib.win-amd64-3.6\aiortc
copying aiortc\stats.py -> build\lib.win-amd64-3.6\aiortc
copying aiortc\utils.py -> build\lib.win-amd64-3.6\aiortc
copying aiortc\__init__.py -> build\lib.win-amd64-3.6\aiortc
creating build\lib.win-amd64-3.6\aiortc\codecs
copying aiortc\codecs\g711.py -> build\lib.win-amd64-3.6\aiortc\codecs
copying aiortc\codecs\opus.py -> build\lib.win-amd64-3.6\aiortc\codecs
copying aiortc\codecs\vpx.py -> build\lib.win-amd64-3.6\aiortc\codecs
copying aiortc\codecs\__init__.py -> build\lib.win-amd64-3.6\aiortc\codecs
running build_ext
generating cffi module 'build\\temp.win-amd64-3.6\\Release\\aiortc.codecs._vpx.c'
creating build\temp.win-amd64-3.6
creating build\temp.win-amd64-3.6\Release
generating cffi module 'build\\temp.win-amd64-3.6\\Release\\aiortc.codecs._opus.c'
building 'aiortc.codecs._opus' extension
creating build\temp.win-amd64-3.6\Release\build
creating build\temp.win-amd64-3.6\Release\build\temp.win-amd64-3.6
creating build\temp.win-amd64-3.6\Release\build\temp.win-amd64-3.6\Release
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.14.26428\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\users\jmh\anaconda3\include -Ic:\users\jmh\anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.14.26428\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.14.26428\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\cppwinrt" /Tcbuild\temp.win-amd64-3.6\Release\aiortc.codecs._opus.c /Fobuild\temp.win-amd64-3.6\Release\build\temp.win-amd64-3.6\Release\aiortc.codecs._opus.obj
aiortc.codecs._opus.c
build\temp.win-amd64-3.6\Release\aiortc.codecs._opus.c(493): fatal error C1083: Cannot open include file: 'opus/opus.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\VC\\Tools\\MSVC\\14.14.26428\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
----------------------------------------
Failed building wheel for aiortc
Running setup.py clean for aiortc
Running setup.py bdist_wheel for crcmod ... done
Stored in directory: C:\Users\jmh\AppData\Local\pip\Cache\wheels\50\24\4d\4580ca4a299f1ad6fd63443e6e584cb21e9a07988e4aa8daac
Successfully built crcmod
Failed to build aiortc
Installing collected packages: netifaces, aioice, crcmod, cryptography, pyee, pylibsrtp, aiortc
Found existing installation: cryptography 2.1.4
Uninstalling cryptography-2.1.4:
Successfully uninstalled cryptography-2.1.4
Running setup.py install for aiortc ... error
Complete output from command c:\users\jmh\anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\jmh\\AppData\\Local\\Temp\\pip-install-0twgblb0\\aiortc\\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\jmh\AppData\Local\Temp\pip-record-9v5v3hnf\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.6
creating build\lib.win-amd64-3.6\aiortc
copying aiortc\exceptions.py -> build\lib.win-amd64-3.6\aiortc
copying aiortc\jitterbuffer.py -> build\lib.win-amd64-3.6\aiortc
copying aiortc\mediastreams.py -> build\lib.win-amd64-3.6\aiortc
copying aiortc\rtcconfiguration.py -> build\lib.win-amd64-3.6\aiortc
copying aiortc\rtcdatachannel.py -> build\lib.win-amd64-3.6\aiortc
copying aiortc\rtcdtlstransport.py -> build\lib.win-amd64-3.6\aiortc
copying aiortc\rtcicetransport.py -> build\lib.win-amd64-3.6\aiortc
copying aiortc\rtcpeerconnection.py -> build\lib.win-amd64-3.6\aiortc
copying aiortc\rtcrtpparameters.py -> build\lib.win-amd64-3.6\aiortc
copying aiortc\rtcrtpreceiver.py -> build\lib.win-amd64-3.6\aiortc
copying aiortc\rtcrtpsender.py -> build\lib.win-amd64-3.6\aiortc
copying aiortc\rtcrtptransceiver.py -> build\lib.win-amd64-3.6\aiortc
copying aiortc\rtcsctptransport.py -> build\lib.win-amd64-3.6\aiortc
copying aiortc\rtcsessiondescription.py -> build\lib.win-amd64-3.6\aiortc
copying aiortc\rtp.py -> build\lib.win-amd64-3.6\aiortc
copying aiortc\sdp.py -> build\lib.win-amd64-3.6\aiortc
copying aiortc\stats.py -> build\lib.win-amd64-3.6\aiortc
copying aiortc\utils.py -> build\lib.win-amd64-3.6\aiortc
copying aiortc\__init__.py -> build\lib.win-amd64-3.6\aiortc
creating build\lib.win-amd64-3.6\aiortc\codecs
copying aiortc\codecs\g711.py -> build\lib.win-amd64-3.6\aiortc\codecs
copying aiortc\codecs\opus.py -> build\lib.win-amd64-3.6\aiortc\codecs
copying aiortc\codecs\vpx.py -> build\lib.win-amd64-3.6\aiortc\codecs
copying aiortc\codecs\__init__.py -> build\lib.win-amd64-3.6\aiortc\codecs
running build_ext
generating cffi module 'build\\temp.win-amd64-3.6\\Release\\aiortc.codecs._vpx.c'
creating build\temp.win-amd64-3.6
creating build\temp.win-amd64-3.6\Release
generating cffi module 'build\\temp.win-amd64-3.6\\Release\\aiortc.codecs._opus.c'
building 'aiortc.codecs._opus' extension
creating build\temp.win-amd64-3.6\Release\build
creating build\temp.win-amd64-3.6\Release\build\temp.win-amd64-3.6
creating build\temp.win-amd64-3.6\Release\build\temp.win-amd64-3.6\Release
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.14.26428\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\users\jmh\anaconda3\include -Ic:\users\jmh\anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.14.26428\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.14.26428\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\cppwinrt" /Tcbuild\temp.win-amd64-3.6\Release\aiortc.codecs._opus.c /Fobuild\temp.win-amd64-3.6\Release\build\temp.win-amd64-3.6\Release\aiortc.codecs._opus.obj
aiortc.codecs._opus.c
build\temp.win-amd64-3.6\Release\aiortc.codecs._opus.c(493): fatal error C1083: Cannot open include file: 'opus/opus.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\VC\\Tools\\MSVC\\14.14.26428\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
----------------------------------------
Command "c:\users\jmh\anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\jmh\\AppData\\Local\\Temp\\pip-install-0twgblb0\\aiortc\\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\jmh\AppData\Local\Temp\pip-record-9v5v3hnf\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\jmh\AppData\Local\Temp\pip-install-0twgblb0\aiortc\
C:\Users\jmh>
According to the github page of AIORTC, Windows 10 isn't supported at this time.
It is supported on Linux. Maybe try it out with virtualbox or WSL?

MYSQLdb with Python 3.6

I'm having a very hard time installing MYSQLdb under Python 3.6. I've been fighting with this for about a day now and was hoping someone had a fix. Note I am running Windows 10, MY SQL Workbench 6.3, PyCharm 2016.3.2, and Python 3.6 as already mentioned. To begin with, when trying to execute code in PyCharm which includes an import of MYSQLdb, I'd get an error saying no module found. So, I of course tried to pip install basically every binary possible. For most, I'd get the following:
C:\Users\[me]>pip install mysql-python
Collecting mysql-python
Using cached MySQL-python-1.2.5.zip
Building wheels for collected packages: mysql-python
Running setup.py bdist_wheel for mysql-python ... error
Complete output from command c:\python36\python.exe -u -c "import
setuptools, tokenize;__file__='C:\\Users\\[me]\\AppData\\Local\\Temp\\pip-build-90yksnqx\\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 C:\Users\[me]\AppData\Local\Temp\tmprh_xynj1pip-wheel- --python-tag cp36:
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.6
copying _mysql_exceptions.py -> build\lib.win-amd64-3.6
creating build\lib.win-amd64-3.6\MySQLdb
copying MySQLdb\__init__.py -> build\lib.win-amd64-3.6\MySQLdb
copying MySQLdb\converters.py -> build\lib.win-amd64-3.6\MySQLdb
copying MySQLdb\connections.py -> build\lib.win-amd64-3.6\MySQLdb
copying MySQLdb\cursors.py -> build\lib.win-amd64-3.6\MySQLdb
copying MySQLdb\release.py -> build\lib.win-amd64-3.6\MySQLdb
copying MySQLdb\times.py -> build\lib.win-amd64-3.6\MySQLdb
creating build\lib.win-amd64-3.6\MySQLdb\constants
copying MySQLdb\constants\__init__.py -> build\lib.win-amd64-3.6\MySQLdb\constants
copying MySQLdb\constants\CR.py -> build\lib.win-amd64-3.6\MySQLdb\constants
copying MySQLdb\constants\FIELD_TYPE.py -> build\lib.win-amd64-3.6\MySQLdb\constants
copying MySQLdb\constants\ER.py -> build\lib.win-amd64-3.6\MySQLdb\constants
copying MySQLdb\constants\FLAG.py -> build\lib.win-amd64-3.6\MySQLdb\constants
copying MySQLdb\constants\REFRESH.py -> build\lib.win-amd64-3.6\MySQLdb\constants
copying MySQLdb\constants\CLIENT.py -> build\lib.win-amd64-3.6\MySQLdb\constants
running build_ext
building '_mysql' extension
creating build\temp.win-amd64-3.6
creating build\temp.win-amd64-3.6\Release
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Dversion_info=(1,2,5,'final',1) -D__version__=1.2.5 "-IC:\Program Files (x86)\MySQL\MySQL Connector C 6.0.2\include" -Ic:\python36\include -Ic:\python36\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\8.1\include\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\winrt" /Tc_mysql.c /Fobuild\temp.win-amd64-3.6\Release\_mysql.obj /Zl
_mysql.c
_mysql.c(42): fatal error C1083: Cannot open include file: 'config-win.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2
Failed building wheel for mysql-python
Running setup.py clean for mysql-python
Failed to build mysql-python
Installing collected packages: mysql-python
Running setup.py install for mysql-python ... error
Complete output from command c:\python36\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\[me]\\AppData\\Local\\Temp\\pip-build-90yksnqx\\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 C:\Users\[me]\AppData\Local\Temp\pip-h7ydssnj-record\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.6
copying _mysql_exceptions.py -> build\lib.win-amd64-3.6
creating build\lib.win-amd64-3.6\MySQLdb
copying MySQLdb\__init__.py -> build\lib.win-amd64-3.6\MySQLdb
copying MySQLdb\converters.py -> build\lib.win-amd64-3.6\MySQLdb
copying MySQLdb\connections.py -> build\lib.win-amd64-3.6\MySQLdb
copying MySQLdb\cursors.py -> build\lib.win-amd64-3.6\MySQLdb
copying MySQLdb\release.py -> build\lib.win-amd64-3.6\MySQLdb
copying MySQLdb\times.py -> build\lib.win-amd64-3.6\MySQLdb
creating build\lib.win-amd64-3.6\MySQLdb\constants
copying MySQLdb\constants\__init__.py -> build\lib.win-amd64-3.6\MySQLdb\constants
copying MySQLdb\constants\CR.py -> build\lib.win-amd64-3.6\MySQLdb\constants
copying MySQLdb\constants\FIELD_TYPE.py -> build\lib.win-amd64-3.6\MySQLdb\constants
copying MySQLdb\constants\ER.py -> build\lib.win-amd64-3.6\MySQLdb\constants
copying MySQLdb\constants\FLAG.py -> build\lib.win-amd64-3.6\MySQLdb\constants
copying MySQLdb\constants\REFRESH.py -> build\lib.win-amd64-3.6\MySQLdb\constants
copying MySQLdb\constants\CLIENT.py -> build\lib.win-amd64-3.6\MySQLdb\constants
running build_ext
building '_mysql' extension
creating build\temp.win-amd64-3.6
creating build\temp.win-amd64-3.6\Release
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Dversion_info=(1,2,5,'final',1) -D__version__=1.2.5 "-IC:\Program Files (x86)\MySQL\MySQL Connector C 6.0.2\include" -Ic:\python36\include -Ic:\python36\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\8.1\include\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\winrt" /Tc_mysql.c /Fobuild\temp.win-amd64-3.6\Release\_mysql.obj /Zl
_mysql.c
_mysql.c(42): fatal error C1083: Cannot open include file: 'config-win.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2
So, I even then tried installing the unofficial binary for 3.6 available at http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy
This installed fine, but still no luck when executing in PyCharm.
Next, I went into preferences=>project interpreter in PyCharm and tried to install MYSQLdb directly from there. With that, I get this other error:
Collecting MySQLdb
Could not find a version that satisfies the requirement MySQLdb (from versions: )
No matching distribution found for MySQLdb
From my research this seems to happen a lot when using new releases of Python. Does anyone know of a workaround or when 3.6 will be supported?
try to use sqlalchemy that is fully suported for many ODBC driver. Insted of using mysqldb, mysqlconnector is better in python3.x. I migrated a project from sqlite to mysql server and work fine in python3.6
sqlalchemy offer a solution for connecting with another ODBC.
I had this same issue.
I followed the advice of another answer and got to SQLAlchemy using the pip below:
pip install SQLAlchemy
I have been unable to play with it yet, but it did install without error, so here is hoping!
I had this issue before and I found out that when using python 3.6 you just need to install mysqlclient:
1 - create a folder and than a virtualenv (virtualenv myvenv --python python3)
2 - Install the django version you want (pip install django==1.9.3)
3- Install mysqlclient (pip install mysqlclient)
If you go inside myvenv folder/lib/python3.6/site-packages you will see that MySQLdb module will be there.

Categories

Resources