I was trying to install mod_wsgi , so i installed its prerequisites .
Python (3.7.4)
Microsoft Visual C++ Build tool (2015) Microsoft
Visual C++ 2015-2019 Redistributable (14.23.27820)
Xampp (for Apache 2.4)
But the on doing pip install mod_wsgi i got following errors
C:\Windows\system32>pip install mod_wsgi
Collecting mod_wsgi
Using cached https://files.pythonhosted.org/packages/26/03/a3ed5abc2e66c82c40b
0735c2f819c898d136879b00be4f5537126b6a4a4/mod_wsgi-4.6.7.tar.gz
Installing collected packages: mod-wsgi
Running setup.py install for mod-wsgi ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\taha.tauqir\appdata\local\programs\python\python37-32\py
thon.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\
\TAHA~1.TAU\\AppData\\Local\\Temp\\pip-install-_zkqbo33\\mod-wsgi\\setup.py'"'"'
; __file__='"'"'C:\\Users\\TAHA~1.TAU\\AppData\\Local\\Temp\\pip-install-_zkqbo3
3\\mod-wsgi\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);c
ode=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code,
__file__, '"'"'exec'"'"'))' install --record 'C:\Users\TAHA~1.TAU\AppData\Local\
Temp\pip-record-4uoq0nq8\install-record.txt' --single-version-externally-managed
--compile
cwd: C:\Users\TAHA~1.TAU\AppData\Local\Temp\pip-install-_zkqbo33\mod-ws
gi\
Complete output (33 lines):
c:\users\taha.tauqir\appdata\local\programs\python\python37-32\lib\distutils
\dist.py:274: UserWarning: Unknown distribution option: 'bugtrack_url'
warnings.warn(msg)
running install
running build
running build_py
creating build
creating build\lib.win32-3.7
creating build\lib.win32-3.7\mod_wsgi
copying src\__init__.py -> build\lib.win32-3.7\mod_wsgi
creating build\lib.win32-3.7\mod_wsgi\server
copying src\server\apxs_config.py -> build\lib.win32-3.7\mod_wsgi\server
copying src\server\environ.py -> build\lib.win32-3.7\mod_wsgi\server
copying src\server\__init__.py -> build\lib.win32-3.7\mod_wsgi\server
creating build\lib.win32-3.7\mod_wsgi\server\management
copying src\server\management\__init__.py -> build\lib.win32-3.7\mod_wsgi\se
rver\management
creating build\lib.win32-3.7\mod_wsgi\server\management\commands
copying src\server\management\commands\runmodwsgi.py -> build\lib.win32-3.7\
mod_wsgi\server\management\commands
copying src\server\management\commands\__init__.py -> build\lib.win32-3.7\mo
d_wsgi\server\management\commands
creating build\lib.win32-3.7\mod_wsgi\docs
copying docs\_build\html\__init__.py -> build\lib.win32-3.7\mod_wsgi\docs
creating build\lib.win32-3.7\mod_wsgi\images
copying images\__init__.py -> build\lib.win32-3.7\mod_wsgi\images
copying images\snake-whiskey.jpg -> build\lib.win32-3.7\mod_wsgi\images
running build_ext
building 'mod_wsgi.server.mod_wsgi' extension
creating build\temp.win32-3.7
creating build\temp.win32-3.7\Release
creating build\temp.win32-3.7\Release\src
creating build\temp.win32-3.7\Release\src\server
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\cl.exe /c /nologo
/Ox /W3 /GL /DNDEBUG /MD -IC:\xampp\apache/include -Ic:\users\taha.tauqir\appda
ta\local\programs\python\python37-32\include -Ic:\users\taha.tauqir\appdata\loca
l\programs\python\python37-32\include /Tcsrc/server\mod_wsgi.c /Fobuild\temp.win
32-3.7\Release\src/server\mod_wsgi.obj
mod_wsgi.c
c:\users\taha.tauqir\appdata\local\temp\pip-install-_zkqbo33\mod-wsgi\src\se
rver\wsgi_apache.h(39): fatal error C1083: Cannot open include file: 'ws2tcpip.h
': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\b
in\\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\taha.tauqir\appdata\loc
al\programs\python\python37-32\python.exe' -u -c 'import sys, setuptools, tokeni
ze; sys.argv[0] = '"'"'C:\\Users\\TAHA~1.TAU\\AppData\\Local\\Temp\\pip-install-
_zkqbo33\\mod-wsgi\\setup.py'"'"'; __file__='"'"'C:\\Users\\TAHA~1.TAU\\AppData\
\Local\\Temp\\pip-install-_zkqbo33\\mod-wsgi\\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\TAHA~1.TAU\AppData\Local\Temp\pip-record-4uoq0nq8\install-record.txt' --
single-version-externally-managed --compile Check the logs for full command outp
ut.
Related
I have a problem with installing Rebound via pip on Python. I initialize the installation with:
pip3 install rebound
Output starts with the following:
Collecting rebound
Using cached rebound-3.14.0.tar.gz (250 kB)
Using legacy 'setup.py install' for rebound, since package 'wheel' is not installed.
Installing collected packages: rebound
Running setup.py install for rebound ... \
and then an error appears:
Running setup.py install for rebound ... \ WARNING: Subprocess output does not appear to be encoded as cp1250
error
ERROR: Command errored out with exit status 1:
command: 'c:\users\jacob\appdata\local\programs\python\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Jacob\\AppData\\Local\\Temp\\pip-install-clca5gs3\\rebound_a19ceff23d4844dfb1d9ce4d08fba984\\setup.py'"'"'; __file__='"'"'C:\\Users\\Jacob\\AppData\\Local\\Temp\\pip-install-clca5gs3\\rebound_a19ceff23d4844dfb1d9ce4d08fba984\\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\Jacob\AppData\Local\Temp\pip-record-8w1f5up7\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\jacob\appdata\local\programs\python\python39\Include\rebound'
cwd: C:\Users\Jacob\AppData\Local\Temp\pip-install-clca5gs3\rebound_a19ceff23d4844dfb1d9ce4d08fba984\
Complete output (27 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
creating build\lib.win-amd64-3.9\rebound
copying rebound\citations.py -> build\lib.win-amd64-3.9\rebound
copying rebound\data.py -> build\lib.win-amd64-3.9\rebound
copying rebound\horizons.py -> build\lib.win-amd64-3.9\rebound
copying rebound\interruptible_pool.py -> build\lib.win-amd64-3.9\rebound
copying rebound\particle.py -> build\lib.win-amd64-3.9\rebound
copying rebound\plotting.py -> build\lib.win-amd64-3.9\rebound
copying rebound\simulation.py -> build\lib.win-amd64-3.9\rebound
copying rebound\simulationarchive.py -> build\lib.win-amd64-3.9\rebound
copying rebound\tools.py -> build\lib.win-amd64-3.9\rebound
copying rebound\units.py -> build\lib.win-amd64-3.9\rebound
copying rebound\widget.py -> build\lib.win-amd64-3.9\rebound
copying rebound\__init__.py -> build\lib.win-amd64-3.9\rebound
copying rebound\rebound.h -> build\lib.win-amd64-3.9\rebound
running build_ext
building 'librebound' extension
creating build\temp.win-amd64-3.9
creating build\temp.win-amd64-3.9\Release
creating build\temp.win-amd64-3.9\Release\src
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DLIBREBOUND -Isrc -Ic:\users\jacob\appdata\local\programs\python\python39\include -Ic:\users\jacob\appdata\local\programs\python\python39\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\include -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt /Tcsrc/binarydiff.c /Fobuild\temp.win-amd64-3.9\Release\src/binarydiff.obj -fstrict-aliasing -O3 -std=c99 -Wno-unknown-pragmas -DGITHASH=eb1f3890ab7f01487de2b3d01c42c1acdfd9d5e5 -DLIBREBOUND -D_GNU_SOURCE -fPIC
cl : Wiersz polecenia error D8021 : nieprawid\x88owy argument numeryczny "/Wno-unknown-pragmas"
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.28.29333\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\jacob\appdata\local\programs\python\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Jacob\\AppData\\Local\\Temp\\pip-install-clca5gs3\\rebound_a19ceff23d4844dfb1d9ce4d08fba984\\setup.py'"'"'; __file__='"'"'C:\\Users\\Jacob\\AppData\\Local\\Temp\\pip-install-clca5gs3\\rebound_a19ceff23d4844dfb1d9ce4d08fba984\\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\Jacob\AppData\Local\Temp\pip-record-8w1f5up7\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\jacob\appdata\local\programs\python\python39\Include\rebound' Check the logs for full command output.
Any idea what is the problem? It's clearly connected with MSVC. At the beginning there was an error which required MSVC ver. 14 or higher to be installed. After I've installed MSVC, above error occures.
Python ver. 3.9
pip ver. 21.0
setup.py adds a lot of compiler flags specific to gcc. It seems the authors don't expect the code to be used on w32. Only Linux and MacOS X are supported.
I've installed GMP 5.x , PBC (latest) and OPENSSL but when I try `pip3 install charm-crypto this error occurs. If anyone knows how to solve this error because I don't understand it please tell me? By the way the error is much longer than this but I couldn't paste it, It is mostly repeating the process of copying
(venv) C:\Users\admin\PycharmProjects\Testing>pip3 install charm-crypto
Collecting charm-crypto
Using cached Charm-Crypto-0.43.tar.gz (364 kB)
Requirement already satisfied: setuptools in c:\users\admin\pycharmprojects\testing\venv\lib\site-packages (from charm-crypto) (50.3.2)
Requirement already satisfied: pyparsing>=1.5.5 in c:\users\admin\pycharmprojects\testing\venv\lib\site-packages (from charm-crypto) (2.4.7)
Using legacy 'setup.py install' for charm-crypto, since package 'wheel' is not installed.
Installing collected packages: charm-crypto
Running setup.py install for charm-crypto ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\admin\pycharmprojects\testing\venv\scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\admin\\AppData\
\Local\\Temp\\pip-install-83yi7s_w\\charm-crypto\\setup.py'"'"'; __file__='"'"'C:\\Users\\admin\\AppData\\Local\\Temp\\pip-install-83yi7s_w\\charm-crypto\\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\admin\AppData\Local\Temp\pip-record-vq3a6qkl\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users
\admin\pycharmprojects\testing\venv\include\site\python3.9\charm-crypto'
cwd: C:\Users\admin\AppData\Local\Temp\pip-install-83yi7s_w\charm-crypto\
Complete output (194 lines):
Platform: Windows
Config file: config.mk
Warning, using default config vaules.
You probably want to run ./configure.sh first.
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
creating build\lib.win-amd64-3.9\charm
copying charm\config.py -> build\lib.win-amd64-3.9\charm
copying charm\__init__.py -> build\lib.win-amd64-3.9\charm
creating build\lib.win-amd64-3.9\charm\core
copying charm\core\__init__.py -> build\lib.win-amd64-3.9\charm\core
creating build\lib.win-amd64-3.9\charm\core\crypto
copying charm\core\crypto\__init__.py -> build\lib.win-amd64-3.9\charm\core\crypto
copying charm\adapters\abenc_adapt_hybrid.py -> build\lib.win-amd64-3.9\charm\adapters
copying charm\adapters\dabenc_adapt_hybrid.py -> build\lib.win-amd64-3.9\charm\adapters
copying charm\adapters\ibenc_adapt_hybrid.py -> build\lib.win-amd64-3.9\charm\adapters
copying charm\adapters\ibenc_adapt_identityhash.py -> build\lib.win-amd64-3.9\charm\adapters
copying charm\adapters\kpabenc_adapt_hybrid.py -> build\lib.win-amd64-3.9\charm\adapters
copying charm\adapters\pkenc_adapt_bchk05.py -> build\lib.win-amd64-3.9\charm\adapters
copying charm\adapters\pkenc_adapt_chk04.py -> build\lib.win-amd64-3.9\charm\adapters
copying charm\adapters\pkenc_adapt_hybrid.py -> build\lib.win-amd64-3.9\charm\adapters
copying charm\adapters\pksig_adapt_naor01.py -> build\lib.win-amd64-3.9\charm\adapters
copying charm\adapters\__init__.py -> build\lib.win-amd64-3.9\charm\adapters
running build_ext
building 'charm.core.math.pairing' extension
creating build\temp.win-amd64-3.9
creating build\temp.win-amd64-3.9\Release
creating build\temp.win-amd64-3.9\Release\charm
creating build\temp.win-amd64-3.9\Release\charm\core
creating build\temp.win-amd64-3.9\Release\charm\core\benchmark
creating build\temp.win-amd64-3.9\Release\charm\core\math
creating build\temp.win-amd64-3.9\Release\charm\core\math\pairing
creating build\temp.win-amd64-3.9\Release\charm\core\utilities
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DBENCHMARK_E
NABLED=1 -Icharm/core/utilities/ -Icharm/core/benchmark/ -Ic:\users\admin\pycharmprojects\testing\venv\include -IC:\Users\admin\AppData\Local\Programs\Python\Python3
9\include -IC:\Users\admin\AppData\Local\Programs\Python\Python39\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\
ATLMFC\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\include -IC:\Program Files (x86)\Windows Kits\10\include\10
.0.18362.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um -IC:\Program Fi
les (x86)\Windows Kits\10\include\10.0.18362.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt /Tccharm/core/benchmark/benchmarkmodule.c
/Fobuild\temp.win-amd64-3.9\Release\charm/core/benchmark/benchmarkmodule.obj
benchmarkmodule.c
C:\Users\admin\AppData\Local\Temp\pip-install-83yi7s_w\charm-crypto\charm\core\benchmark\benchmarkmodule.h(12): fatal error C1083: Impossible d'ouvrir le fichier
includeÿ: 'sys/time.h'ÿ: No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.28.29333\\bin\\HostX86\\x64\\cl.exe' failed with exit cod
e 2
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\admin\pycharmprojects\testing\venv\scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0]
= '"'"'C:\\Users\\admin\\AppData\\Local\\Temp\\pip-install-83yi7s_w\\charm-crypto\\setup.py'"'"'; __file__='"'"'C:\\Users\\admin\\AppData\\Local\\Temp\\pip-install-8
3yi7s_w\\charm-crypto\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(c
ode, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\admin\AppData\Local\Temp\pip-record-vq3a6qkl\install-record.txt' --single-version-externally-managed --co
mpile --install-headers 'c:\users\admin\pycharmprojects\testing\venv\include\site\python3.9\charm-crypto' Check the logs for full command output.
The problem is there is file with code which is not compatible with MSVC. sys/time.h is included in benchmarkmodule.h and unfortunately this file does not exit in MSVC.
Try to install mingw, set the CC to mingw compiler and run the pip3 command . If it still not working you can try to build it directly like explained in https://jhuisi.github.io/charm/install_source.html.
In all cases you will need a mingw compiler. However, it may be complicated.
You will need to install the msvc redistributable. When you run the make command, f you face the error Unknown MS Compiler version 1927. modify the cygwinccompiler.py file by adding :
#custom add
elif msc_ver == '1927':
# VS2019 / MSVC 16.7
return ['msvcr100']
#custom add
before the last add.
You may also need to add a file distutils.cfg like explained in https://wiki.python.org/moin/WindowsCompilers. Once these modifications done, the compilation should start normally.
Perhaps the easiest would be to compile it under linux.
I am trying to install mod_wsgi on windows 10 with python 3.7.3. When i run this command pip install mod_wsgi i am getting following error , i have also install Microsoft VC Build Tool 2019 v14.2
Using Windows 10 latest updates, pip latest version , setuptools latest verion . When mod_wsgi starts build then this error is occurring.
(venv) D:\myprojec>pip install mod_wsgi
Collecting mod_wsgi
Using cached mod_wsgi-4.7.1.tar.gz (498 kB)
Building wheels for collected packages: mod-wsgi
Building wheel for mod-wsgi (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'D:\venv\Scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\dell\\AppData\\Local\\Temp\\pip-install-d90lfqww\\mod-wsgi\\setup.py'"'"'; __file__='"'"'C:\\Users\\dell\\AppData\\Local\\Temp\\pip-install-d90lfqww\\mod-wsgi\\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\dell\AppData\Local\Temp\pip-wheel-3cghvb62'
cwd: C:\Users\dell\AppData\Local\Temp\pip-install-d90lfqww\mod-wsgi\
Complete output (33 lines):
c:\users\dell\appdata\local\programs\python\python37\lib\distutils\dist.py:274: UserWarning: Unknown distribution option: 'bugtrack_url'
warnings.warn(msg)
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
creating build\lib.win-amd64-3.7\mod_wsgi
copying src\__init__.py -> build\lib.win-amd64-3.7\mod_wsgi
creating build\lib.win-amd64-3.7\mod_wsgi\server
copying src\server\apxs_config.py -> build\lib.win-amd64-3.7\mod_wsgi\server
copying src\server\environ.py -> build\lib.win-amd64-3.7\mod_wsgi\server
copying src\server\__init__.py -> build\lib.win-amd64-3.7\mod_wsgi\server
creating build\lib.win-amd64-3.7\mod_wsgi\server\management
copying src\server\management\__init__.py -> build\lib.win-amd64-3.7\mod_wsgi\server\management
creating build\lib.win-amd64-3.7\mod_wsgi\server\management\commands
copying src\server\management\commands\runmodwsgi.py -> build\lib.win-amd64-3.7\mod_wsgi\server\management\commands
copying src\server\management\commands\__init__.py -> build\lib.win-amd64-3.7\mod_wsgi\server\management\commands
creating build\lib.win-amd64-3.7\mod_wsgi\docs
copying docs\_build\html\__init__.py -> build\lib.win-amd64-3.7\mod_wsgi\docs
creating build\lib.win-amd64-3.7\mod_wsgi\images
copying images\__init__.py -> build\lib.win-amd64-3.7\mod_wsgi\images
copying images\snake-whiskey.jpg -> build\lib.win-amd64-3.7\mod_wsgi\images
running build_ext
building 'mod_wsgi.server.mod_wsgi' 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\server
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.25.28610\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -ID:\xampp\apache\bin/include -ID:\venv\include -Ic:\users\dell\appdata\local\programs\python\python37\include -Ic:\users\dell\appdata\local\programs\python\python37\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.25.28610\include" /Tcsrc/server\mod_wsgi.c /Fobuild\temp.win-amd64-3.7\Release\src/server\mod_wsgi.obj
mod_wsgi.c
C:\Users\dell\AppData\Local\Temp\pip-install-d90lfqww\mod-wsgi\src\server\wsgi_apache.h(39): fatal error C1083: Cannot open include file: 'ws2tcpip.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.25.28610\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Failed building wheel for mod-wsgi
Running setup.py clean for mod-wsgi
Failed to build mod-wsgi
Installing collected packages: mod-wsgi
Running setup.py install for mod-wsgi ... error
ERROR: Command errored out with exit status 1:
command: 'D:\venv\Scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\dell\\AppData\\Local\\Temp\\pip-install-d90lfqww\\mod-wsgi\\setup.py'"'"'; __file__='"'"'C:\\Users\\dell\\AppData\\Local\\Temp\\pip-install-d90lfqww\\mod-wsgi\\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\dell\AppData\Local\Temp\pip-record-73ujk23s\install-record.txt' --single-version-externally-managed --compile --install-headers 'D:\venv\include\site\python3.7\mod-wsgi'
cwd: C:\Users\dell\AppData\Local\Temp\pip-install-d90lfqww\mod-wsgi\
Complete output (33 lines):
c:\users\dell\appdata\local\programs\python\python37\lib\distutils\dist.py:274: UserWarning: Unknown distribution option: 'bugtrack_url'
warnings.warn(msg)
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
creating build\lib.win-amd64-3.7\mod_wsgi
copying src\__init__.py -> build\lib.win-amd64-3.7\mod_wsgi
creating build\lib.win-amd64-3.7\mod_wsgi\server
copying src\server\apxs_config.py -> build\lib.win-amd64-3.7\mod_wsgi\server
copying src\server\environ.py -> build\lib.win-amd64-3.7\mod_wsgi\server
copying src\server\__init__.py -> build\lib.win-amd64-3.7\mod_wsgi\server
creating build\lib.win-amd64-3.7\mod_wsgi\server\management
copying src\server\management\__init__.py -> build\lib.win-amd64-3.7\mod_wsgi\server\management
creating build\lib.win-amd64-3.7\mod_wsgi\server\management\commands
copying src\server\management\commands\runmodwsgi.py -> build\lib.win-amd64-3.7\mod_wsgi\server\management\commands
copying src\server\management\commands\__init__.py -> build\lib.win-amd64-3.7\mod_wsgi\server\management\commands
creating build\lib.win-amd64-3.7\mod_wsgi\docs
copying docs\_build\html\__init__.py -> build\lib.win-amd64-3.7\mod_wsgi\docs
creating build\lib.win-amd64-3.7\mod_wsgi\images
copying images\__init__.py -> build\lib.win-amd64-3.7\mod_wsgi\images
copying images\snake-whiskey.jpg -> build\lib.win-amd64-3.7\mod_wsgi\images
running build_ext
building 'mod_wsgi.server.mod_wsgi' 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\server
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.25.28610\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -ID:\xampp\apache\bin/include -ID:\venv\include -Ic:\users\dell\appdata\local\programs\python\python37\include -Ic:\users\dell\appdata\local\programs\python\python37\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.25.28610\include" /Tcsrc/server\mod_wsgi.c /Fobuild\temp.win-amd64-3.7\Release\src/server\mod_wsgi.obj
mod_wsgi.c
C:\Users\dell\AppData\Local\Temp\pip-install-d90lfqww\mod-wsgi\src\server\wsgi_apache.h(39): fatal error C1083: Cannot open include file: 'ws2tcpip.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.25.28610\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Command errored out with exit status 1: 'D:\venv\Scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\dell\\AppData\\Local\\Temp\\pip-install-d90lfqww\\mod-wsgi\\setup.py'"'"'; __file__='"'"'C:\\Users\\dell\\AppData\\Local\\Temp\\pip-install-d90lfqww\\mod-wsgi\\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\dell\AppData\Local\Temp\pip-record-73ujk23s\install-record.txt' --single-version-externally-managed --compile --install-headers 'D:\venv\include\site\python3.7\mod-wsgi' Check the logs for full command output.
When I try to install screen by entering python -m pip install screen I get this error:
$ python -m pip install screen
Collecting screen
Using cached https://files.pythonhosted.org/packages/a4/d2/68dacd66f28618462650e475f29663eb1f97cecdc3cf8f0881e52f425a3a/screen-1.0.1.tar.gz
Building wheels for collected packages: screen
Running setup.py bdist_wheel for screen: started
Running setup.py bdist_wheel for screen: finished with status 'error'
Complete output from command C:\Users\MrGrimod\AppData\Local\Programs\Python\Python36\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\MrGrimod\\AppData\\Local\\Temp\\pip-install-z29mr6h3\\screen\\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\MrGrimod\AppData\Local\Temp\pip-wheel-ia8iysps --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\screen
copying screen\compat.py -> build\lib.win-amd64-3.6\screen
copying screen\old_str_util.py -> build\lib.win-amd64-3.6\screen
copying screen\__init__.py -> build\lib.win-amd64-3.6\screen
running build_ext
building 'screen.str_util' extension
creating build\temp.win-amd64-3.6
creating build\temp.win-amd64-3.6\Release
creating build\temp.win-amd64-3.6\Release\source
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MT -IC:\Users\MrGrimod\AppData\Local\Programs\Python\Python36\include -IC:\Users\MrGrimod\AppData\Local\Programs\Python\Python36\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\Include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" /Tcsource/str_util.c /Fobuild\temp.win-amd64-3.6\Release\source/str_util.obj
str_util.c
c:\users\mrgrimod\appdata\local\programs\python\python36\include\pyconfig.h(59): fatal error C1083: Datei (Include) kann nicht ge▒ffnet werden: "io.h": No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.16.27023\\bin\\HostX64\\x64\\cl.exe' failed with exit status 2
----------------------------------------
Failed building wheel for screen
Running setup.py clean for screen
Failed to build screen
Installing collected packages: screen
Running setup.py install for screen: started
Running setup.py install for screen: finished with status 'error'
Complete output from command C:\Users\MrGrimod\AppData\Local\Programs\Python\Python36\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\MrGrimod\\AppData\\Local\\Temp\\pip-install-z29mr6h3\\screen\\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\MrGrimod\AppData\Local\Temp\pip-record-exrcd0r5\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\screen
copying screen\compat.py -> build\lib.win-amd64-3.6\screen
copying screen\old_str_util.py -> build\lib.win-amd64-3.6\screen
copying screen\__init__.py -> build\lib.win-amd64-3.6\screen
running build_ext
building 'screen.str_util' extension
creating build\temp.win-amd64-3.6
creating build\temp.win-amd64-3.6\Release
creating build\temp.win-amd64-3.6\Release\source
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MT -IC:\Users\MrGrimod\AppData\Local\Programs\Python\Python36\include -IC:\Users\MrGrimod\AppData\Local\Programs\Python\Python36\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\Include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" /Tcsource/str_util.c /Fobuild\temp.win-amd64-3.6\Release\source/str_util.obj
str_util.c
c:\users\mrgrimod\appdata\local\programs\python\python36\include\pyconfig.h(59): fatal error C1083: Datei (Include) kann nicht ge▒ffnet werden: "io.h": No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.16.27023\\bin\\HostX64\\x64\\cl.exe' failed with exit status 2
----------------------------------------
Command "C:\Users\MrGrimod\AppData\Local\Programs\Python\Python36\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\MrGrimod\\AppData\\Local\\Temp\\pip-install-z29mr6h3\\screen\\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\MrGrimod\AppData\Local\Temp\pip-record-exrcd0r5\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\MrGrimod\AppData\Local\Temp\pip-install-z29mr6h3\screen\
I already installed setuptool successfully, but the error is still there.
most of the time, these kind of issues occurs due to c++ building tools are missing in your environment. download the tools from Microsoft and install.
Although I didn't manage to solve this specific problem I solved it for me by using Pillow GrabScreen instead of screen! Works like a charm
I'm trying to upgrade the builtin module pysqlite(sqlite3) on my windows 7, to the most recent version (currently 2.8.2).
My python version is 2.7.10.
When I run the pip commend on my cmd console, I get the following message:
C:\WINDOWS\system32>pip install --upgrade pysqlite Collecting pysqlite
Using cached pysqlite-2.8.2.tar.gz Installing collected packages:
pysqlite Running setup.py install for pysqlite ... error
Complete output from command "C:\Program Files\Anaconda\python.exe" -u -c "import setuptools,
tokenize;file='c:\users\Bob\appdata\local\temp\pip-build-semsbd\pysqlite\setup.py';exec(compile(getattr(tokenize,
'open', open)(file).read().replace('\r\n', '\n'), file,
'exec'))" install --record
c:\users\Bob\appdata\local\temp\pip-fkkno1-record\install-record.txt
--single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build\lib.win-amd64-2.7
creating build\lib.win-amd64-2.7\pysqlite2
copying lib\dbapi2.py -> build\lib.win-amd64-2.7\pysqlite2
copying lib\dump.py -> build\lib.win-amd64-2.7\pysqlite2
copying lib__init__.py -> build\lib.win-amd64-2.7\pysqlite2
creating build\lib.win-amd64-2.7\pysqlite2\test
copying lib\test\dbapi.py -> build\lib.win-amd64-2.7\pysqlite2\test
copying lib\test\dump.py -> build\lib.win-amd64-2.7\pysqlite2\test
copying lib\test\factory.py -> build\lib.win-amd64-2.7\pysqlite2\test
copying lib\test\hooks.py -> build\lib.win-amd64-2.7\pysqlite2\test
copying lib\test\regression.py -> build\lib.win-amd64-2.7\pysqlite2\test
copying lib\test\transactions.py -> build\lib.win-amd64-2.7\pysqlite2\test
copying lib\test\types.py -> build\lib.win-amd64-2.7\pysqlite2\test
copying lib\test\userfunctions.py -> build\lib.win-amd64-2.7\pysqlite2\test
copying lib\test__init__.py -> build\lib.win-amd64-2.7\pysqlite2\test
running build_ext
building 'pysqlite2._sqlite' extension
creating build\temp.win-amd64-2.7
creating build\temp.win-amd64-2.7\Release
creating build\temp.win-amd64-2.7\Release\src
C:\Users\Bob\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS-
/DNDEBUG -DMODULE_NAME=\"pysqlite2.dbapi2\" -I'{' -Iis -Inot
-Irecognized -Ias -Ian -Iinternal -Ior -Iexternal -Icommand, -Ioperable -Iprogram -Ior -Ibatch -Ifile. "-IC:\Program Files\Anaconda\include" "-IC:\Program Files\Anaconda\PC"
/Tcsrc/module.c /Fobuild\temp.win-amd64-2.7\Release\src/module.obj
module.c
c:\users\Bob\appdata\local\temp\pip-build-semsbd\pysqlite\src\connection.h(33)
: fatal error C1083: Cannot open include file: 'sqlite3.h': No such
file or directory
error: command 'C:\Users\Bob\AppData\Local\Programs\Common\Microsoft\Visual
C++ for Python\9.0\VC\Bin\amd64\cl.exe' failed with exit status 2
---------------------------------------- Command ""C:\Program Files\Anaconda\python.exe" -u -c "import setuptools,
tokenize;file='c:\users\Bob\appdata\local\temp\pip-build-semsbd\pysqlite\setup.py';exec(compile(getattr(tokenize,
'open', open)(file).read().replace('\r\n', '\n'), file,
'exec'))" install --record
c:\users\Bob\appdata\local\temp\pip-fkkno1-record\install-record.txt
--single-version-externally-managed --compile" failed with error code 1 in c:\users\Bob\appdata\local\temp\pip-build-semsbd\pysqlite\
So I tried using easy install, and got the following message:
C:\WINDOWS\system32>easy_install -U pysqlite Searching for pysqlite
Reading https://pypi.python.org/simple/pysqlite/ Best match: pysqlite
2.8.2 Downloading https://pypi.python.org/packages/cc/a4/023ee9dba54b3cf0c5a4d0fb2f1ad80332ef23549dd4b551a9f2cbe88786/pysqlite-2.8.2.tar.gz#md5=b8488f6a353bd6a3cd85d327d326376a
Processing pysqlite-2.8.2.tar.gz Writing
c:\users\Bob\appdata\local\temp\easy_install-jwrns4\pysqlite-2.8.2\setup.cfg
Running pysqlite-2.8.2\setup.py -q bdist_egg --dist-dir
c:\users\Bob\appdata\local\temp\easy_install-jwrns4\pysqlite-2.8.2\egg-dist-tmp-dw1hgi
warning: no files found matching 'doc*.txt' module.c
c:\users\Bob\appdata\local\temp\easy_install-jwrns4\pysqlite-2.8.2\src\connection.h(33)
: fatal error C1083: Cannot open include file: 'sqlite3.h': No such
file or directory error: Setup script exited with error: command
'C:\Users\Bob\AppData\Local\Programs\Common\Microsoft\Visual
C++ for Python\9.0\VC\Bin\amd64\cl.exe' failed with exit status 2
Any ideas how this module can be updated?
Thanks in advance!