PIP | Can't install screen - python

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

Related

ERROR: Command errored out with exit status 1:Python 3.8

I was trying
pip install pyaudio
But I got an error
Collecting pyaudio
Using cached PyAudio-0.2.11.tar.gz (37 kB)
Installing collected packages: pyaudio
Running setup.py install for pyaudio: started
Running setup.py install for pyaudio: finished with status 'error'
ERROR: Command errored out with exit status 1:
command: 'C:\Users\Admin\PycharmProjects\AI\venv\Scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Admin\\AppData\\Local\\Temp\\pycharm-packaging\\pyaudio\\setup.py'"'"'; __file__='"'"'C:\\Users\\Admin\\AppData\\Local\\Temp\\pycharm-packaging\\pyaudio\\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-9rgu21ro\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\Admin\PycharmProjects\AI\venv\include\site\python3.8\pyaudio'
cwd: C:\Users\Admin\AppData\Local\Temp\pycharm-packaging\pyaudio\
Complete output (17 lines):
running install
running build
running build_py
creating build
creating build\lib.win32-3.8
copying src\pyaudio.py -> build\lib.win32-3.8
warning: build_py: byte-compiling is disabled, skipping.
running build_ext
building '_portaudio' extension
creating build\temp.win32-3.8
creating build\temp.win32-3.8\Release
creating build\temp.win32-3.8\Release\src
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.25.28610\bin\HostX86\x86\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\Admin\PycharmProjects\AI\venv\include -IC:\Users\Admin\AppData\Local\Programs\Python\Python38-32\include -IC:\Users\Admin\AppData\Local\Programs\Python\Python38-32\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.25.28610\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/_portaudiomodule.c /Fobuild\temp.win32-3.8\Release\src/_portaudiomodule.obj
_portaudiomodule.c
src/_portaudiomodule.c(29): fatal error C1083: Cannot open include file: 'portaudio.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\\x86\\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\Admin\PycharmProjects\AI\venv\Scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Admin\AppData\Local\Temp\pycharm-packaging\pyaudio\setup.py'"'"'; file='"'"'C:\Users\Admin\AppData\Local\Temp\pycharm-packaging\pyaudio\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-9rgu21ro\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\Admin\PycharmProjects\AI\venv\include\site\python3.8\pyaudio' Check the logs for full command output.
You must use python versions 2.7, 3.4, 3.6 otherwise there will be an error.supporting python versions
I downloaded this version 'https://www.python.org/downloads/release/python-2717/' of python and it was able to install pyaudio.
pyaudio installed
If you have several versions of Python, then for example to run pip for Python 2.7.17 use this command:
py -2 -m pip install pyaudio
module pyaudio

snappy/snappymodule.cc(31): fatal error C1083: Cannot open include file: 'snappy-c.h': No such file or directory

I'm not able to install python-snappy module. I have successfully installed snappy module first but getting below error for python-snappy.
(new-env) C:\Automation\test-automation\connect>pip install python-snappy
Collecting python-snappy
Using cached https://files.pythonhosted.org/packages/45/35/65d9f8cc537129894b4b32647d80212d1fa342877581c5b8a69872cea8be/python-snappy-0.5.4.tar.gz
Installing collected packages: python-snappy
Running setup.py install for python-snappy ... error
Complete output from command C:\Automation\test-automation\new-env\Scripts\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\vagrant\\AppData\\Local\\Temp\\
2\\pip-install-17b8xwg1\\python-snappy\\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\vagrant\AppData\Local\Temp\2\pip-record-vdvhb6a5\install-record.txt --single-version-externally-managed --compile --install-headers C:\Automation\tes
t-automation\new-env\include\site\python3.7\python-snappy:
running install
running build
running build_py
creating build
creating build\lib.win32-3.7
creating build\lib.win32-3.7\snappy
copying snappy\hadoop_snappy.py -> build\lib.win32-3.7\snappy
copying snappy\snappy.py -> build\lib.win32-3.7\snappy
copying snappy\snappy_cffi.py -> build\lib.win32-3.7\snappy
copying snappy\snappy_cffi_builder.py -> build\lib.win32-3.7\snappy
copying snappy\snappy_formats.py -> build\lib.win32-3.7\snappy
copying snappy\__init__.py -> build\lib.win32-3.7\snappy
copying snappy\__main__.py -> build\lib.win32-3.7\snappy
running build_ext
building 'snappy._snappy' extension
creating build\temp.win32-3.7
creating build\temp.win32-3.7\Release
creating build\temp.win32-3.7\Release\snappy
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Automation\test-automation\new-env\include "-IC:\Program Files (x8
6)\Python37-32\include" "-IC:\Program Files (x86)\Python37-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\8.1\include\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\include\um" "-IC:\Program Files (x86)\Windows
Kits\8.1\include\winrt" /EHsc /Tpsnappy/snappymodule.cc /Fobuild\temp.win32-3.7\Release\snappy/snappymodule.obj
snappymodule.cc
snappy/snappymodule.cc(31): fatal error C1083: Cannot open include file: 'snappy-c.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:\Automation\test-automation\new-env\Scripts\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\vagrant\\AppData\\Local\\Temp\\2\\pip-install-17b8xwg1\
\python-snappy\\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:\Us
ers\vagrant\AppData\Local\Temp\2\pip-record-vdvhb6a5\install-record.txt --single-version-externally-managed --compile --install-headers C:\Automation\test-automation\new-env\inc
lude\site\python3.7\python-snappy" failed with error code 1 in C:\Users\vagrant\AppData\Local\Temp\2\pip-install-17b8xwg1\python-snappy\
(new-env) C:\Automation\test-automation\connect>
Successfully installed snappy and Visual Studio 14.
In such cases you can download the wheel files compiled by C. Gohlke.
All you need to do is that find which dependencies you need and then search on the http://www.lfd.uci.edu/~gohlke/pythonlibs/ according to your python version.
After downloading the file, go to that file location and simply install it using pip.
For example in this case lets say you are using python 3.7 version and you want to install python-snappy then first download python_snappy‑0.5.4‑cp37‑cp37m‑win_amd64.whl and then save it on some location. Again go to that location and simply use pip install python_snappy-0.5.4-cp37-cp37m-win_amd64.whl.
That's it.

Intalling pycairo with Python 3.7 on Windows

I'm trying to install pycairo, and in spite of what I found on the Internet, I don't manage to to it
I did pip install pycairo, but it askek me to install Visual Basic Build Tool. I did it but it doesn't work then. I tried a lot of ideas found on the web (e.g. with this website https://www.lfd.uci.edu/~gohlke/pythonlibs/), but it also didn't work.
When I try pip install pycairo, the error message is :
Collecting pycairo
Using cached https://files.pythonhosted.org/packages/48/20/5e83af98eb897935bf7dc39455e892ba866feebb9b7c3b392982866f9958/pycairo-1.18.1.tar.gz
Installing collected packages: pycairo
Running setup.py install for pycairo ... error
ERROR: Command errored out with exit status 1:
command: 'd:\programmes\python\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Thomas\\AppData\\Local\\Temp\\pip-install-58_68_s2\\pycairo\\setup.py'"'"'; __file__='"'"'C:\\Users\\Thomas\\AppData\\Local\\Temp\\pip-install-58_68_s2\\pycairo\\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\Thomas\AppData\Local\Temp\pip-record-6wtp6mn1\install-record.txt' --single-version-externally-managed --compile
cwd: C:\Users\Thomas\AppData\Local\Temp\pip-install-58_68_s2\pycairo\
Complete output (18 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
creating build\lib.win-amd64-3.7\cairo
copying cairo\__init__.py -> build\lib.win-amd64-3.7\cairo
copying cairo\__init__.pyi -> build\lib.win-amd64-3.7\cairo
copying cairo\py.typed -> build\lib.win-amd64-3.7\cairo
running build_ext
building 'cairo._cairo' extension
creating build\temp.win-amd64-3.7
creating build\temp.win-amd64-3.7\Release
creating build\temp.win-amd64-3.7\Release\cairo
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.21.27702\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MT -DPYCAIRO_VERSION_MAJOR=1 -DPYCAIRO_VERSION_MINOR=18 -DPYCAIRO_VERSION_MICRO=1 -Id:\programmes\python\include -Id:\programmes\python\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.21.27702\include" "-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" /Tccairo/device.c /Fobuild\temp.win-amd64-3.7\Release\cairo/device.obj
device.c
C:\Users\Thomas\AppData\Local\Temp\pip-install-58_68_s2\pycairo\cairo\pycairo.h(37): fatal error C1083: Impossible d'ouvrir le fichier includeÿ: 'cairo.h'ÿ: No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.21.27702\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Command errored out with exit status 1: 'd:\programmes\python\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Thomas\\AppData\\Local\\Temp\\pip-install-58_68_s2\\pycairo\\setup.py'"'"'; __file__='"'"'C:\\Users\\Thomas\\AppData\\Local\\Temp\\pip-install-58_68_s2\\pycairo\\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\Thomas\AppData\Local\Temp\pip-record-6wtp6mn1\install-record.txt' --single-version-externally-managed --compile Check the logs for full command output.
And I don't understant it !
installing libraries can be a little tough on Windows.
I usually use this website :
https://www.lfd.uci.edu/~gohlke/pythonlibs/
Then, search for your package (here : pycairo‑1.18.1‑cp37‑cp37m‑win_amd64.whl)
Then, you launch cmd in the folder where you downloaded the file, and execute :
pip install pycairo‑1.18.1‑cp37‑cp37m‑win_amd64.whl
I hope this will help you !

Could not install pycocotools in windows: fatal error C1083: Cannot open include file: 'io.h': No such file or directory error:

I'm new to machine learning and have started with a windows 8.1 pc having GeForce GTX 540M. I followed this tutorial to get started with the object detection models. I built my own dataset and tried to train it as per the tutorial but with "ssd_mobilenet_v1_coco_2017_11_17" model. But could not perform it successfully as i had troubles with the "train.py" file given in the tutorial.
So I googled and found that we have to use "model_main.py" to train the model. While trying to train using "model_main.py" I got this error:
"ImportModuleError: No module named 'pycocotools' was found"
So I tried to install the cocoapi from this link . I followed the instructions as given, but got stuck with the error shown below, I've tried a lot of solutions but nothing worked. Any help will be much appreciated.
(tensorflow1) C:\tensorflow1\models\research\object_detection>pip install git+https://github.com/philferriere/cocoapi.git#subdirectory=PythonAPI
Collecting git+https://github.com/philferriere/cocoapi.git#subdirectory=PythonAPI
Cloning https://github.com/philferriere/cocoapi.git to c:\users\home\appdata\l
ocal\temp\pip-req-build-76t4e6ys
Building wheels for collected packages: pycocotools
Running setup.py bdist_wheel for pycocotools ... error
Complete output from command c:\users\home\anaconda3\envs\tensorflow1\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Home\\AppData\\Local\\Temp\\pip-req-build-76t4e6ys\\PythonAPI\\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\Home\AppData\Local\Temp\pip-wheel-4_r37hm6 --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\pycocotools
copying pycocotools\coco.py -> build\lib.win-amd64-3.6\pycocotools
copying pycocotools\cocoeval.py -> build\lib.win-amd64-3.6\pycocotools
copying pycocotools\mask.py -> build\lib.win-amd64-3.6\pycocotools
copying pycocotools\__init__.py -> build\lib.win-amd64-3.6\pycocotools
running build_ext
building 'pycocotools._mask' extension
creating build\temp.win-amd64-3.6
creating build\temp.win-amd64-3.6\Release
creating build\temp.win-amd64-3.6\Release\pycocotools
creating build\temp.win-amd64-3.6\common
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\bin\HostX86\x64\cl.exe /c/nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\users\home\anaconda3\envs\tensorflow1\lib\site-packages\numpy\core\include -I../common -Ic:\users\home\anaconda3\envs\tensorflow1\include -Ic:\users\home\anaconda3\envs\tensorflow1\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\include" /Tcpycocotools/_mask.c /Fobuild\temp.win-amd64-3.6\Release\pycocotools/_mask.obj
_mask.c
c:\users\home\anaconda3\envs\tensorflow1\include\pyconfig.h(59): fatal error C1083: Cannot open include file: 'io.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.15.26726\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
----------------------------------------
Failed building wheel for pycocotools
Running setup.py clean for pycocotools
Complete output from command c:\users\home\anaconda3\envs\tensorflow1\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Home\\AppData\\Local\\Temp\\pip-req-build-76t4e6ys\\PythonAPI\\setup.py';f=getattr(tokenize, 'open',open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" clean --all:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Home\AppData\Local\Temp\pip-req-build-76t4e6ys\PythonAPI\setup.py", line 25, in <module>
cythonize(ext_modules)
File "c:\users\home\anaconda3\envs\tensorflow1\lib\site-packages\Cython\Build\Dependencies.py", line 956, in cythonize
aliases=aliases)
File "c:\users\home\anaconda3\envs\tensorflow1\lib\site-packages\Cython\Buil
d\Dependencies.py", line 801, in create_extension_list
for file in nonempty(sorted(extended_iglob(filepattern)), "'%s' doesn't ma
tch any files" % filepattern):
File "c:\users\home\anaconda3\envs\tensorflow1\lib\site-packages\Cython\Buil
d\Dependencies.py", line 111, in nonempty
raise ValueError(error_msg)
ValueError: 'pycocotools/_mask.pyx' doesn't match any files
----------------------------------------
Failed cleaning build dir for pycocotools
Failed to build pycocotools
Installing collected packages: pycocotools
Running setup.py install for pycocotools ... error
Complete output from command c:\users\home\anaconda3\envs\tensorflow1\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Home\\AppData\\Local\\Temp\\pip-req-build-76t4e6ys\\PythonAPI\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" build_ext "-L/C:/Program Files (x86)/Windows Kits/10/Include/10.0.17134.0/ucrt" install --record C:\Users\Home\AppData\Local\Temp\pip-record-ykypadav\install-record.txt --single-version-externally-managed --compile:
running build_ext
building 'pycocotools._mask' extension
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\bin\HostX86\x64\cl.exe /c/nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\users\home\anaconda3\envs\tensorflow1\lib\site-packages\numpy\core\include -I../common -Ic:\users\home\anaconda3\envs\tensorflow1\include -Ic:\users\home\anaconda3\envs\tensorflow1\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\include" /Tcpycocotools/_mask.c /Fobuild\temp.win-amd64-3.6\Release\pycocotools/_mask.obj
_mask.c
c:\users\home\anaconda3\envs\tensorflow1\include\pyconfig.h(59): fatal error
C1083: Cannot open include file: 'io.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.15.26726\\bin\\HostX86\\x64\\cl.exe' failed with exit
status 2
----------------------------------------
Command "c:\users\home\anaconda3\envs\tensorflow1\python.exe -u -c "import setup
tools, tokenize;__file__='C:\\Users\\Home\\AppData\\Local\\Temp\\pip-req-build-76t4e6ys\\PythonAPI\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" build_ext "-L/C:/Program Files (x86)/Windows Kits/10/Include/10.0.17134.0/ucrt" install --record C:\Users\Home\AppData\Local\Temp\pip-record-ykypadav\install-record.txt --single-version-externally-managed --compile" failed with error code 1
in C:\Users\Home\AppData\Local\Temp\pip-req-build-76t4e6ys\PythonAPI
(tensorflow1) C:\tensorflow1\models\research\object_detection>
easy fix, use pip install pycocotools-windows
First install Visual C++ 2015 Build Tools from https://go.microsoft.com/fwlink/?LinkId=691126 with default selection.
Then,
pip install git+https://github.com/philferriere/cocoapi.git#egg=pycocotools^&subdirectory=PythonAPI
you can try:
pip install pycocotools-windows
it's worked for me :) on windows station :
I was getting the same error
ValueError: 'pycocotools/_mask.pyx' doesn't match any files
So I cloned https://github.com/waleedka/coco to my local device. Then when I was running make I was getting the above error.
the exact command I was running was--
C:\Users\Admin\Desktop\coco-master>python3 PythonAPI/setup.py build_ext install
I was when I was running above command I got the problem.
Then I found out a solution on the issues page of the same repository. It happens that you have to cd into PythonAPI then run--
python setup.py build_ext --inplace
That solved some problems for me.
Moreover some people were saying they still got problems but when they used python3 instead of python their problem was solved.
Try the following command (it worked for me on Windows 10, Python 3.7.5, and Visual 2017) :
pip3 install "git+https://github.com/philferriere/cocoapi.git#egg=pycocotools&subdirectory=PythonAPI"
(from https://github.com/cocodataset/cocoapi/issues/169#issuecomment-462528628)
If you are getting this ERROR: Command errored out with exit status 1 or 2
Then install this:
pip install git+https://github.com/philferriere/cocoapi.git#egg=pycocotools^subdirectory=PythonAPI
pip install pycocotools-windows
worked for me

error in pip install channels_redis~=2.0

I have some problem with install channels_redis on python 3.6 32-bit, pip 9 and windows 10 with the following errors:
fatal error C1510: Cannot load language resource clui.dll.
error: command 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\cl.exe' failed with exit status 4
====================================================================
error: command 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\cl.exe' failed with exit status 4
I try to find hiredis windows binaries but can't find any thing.
error log:
running build_clib
building 'hiredis_for_hiredis_py' library
creating build\temp.win32-3.6
creating build\temp.win32-3.6\vendor
creating build\temp.win32-3.6\vendor\hiredis
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MT /Tcvendor/hiredis/read.c /Fobuild\temp.win32-3.6\vendor/hiredis/read.obj
fatal error C1510: Cannot load language resource clui.dll.
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\bin\\cl.exe' failed with exit status 4
----------------------------------------
Running setup.py clean for hiredis
Failed to build hiredis
Installing collected packages: msgpack, hiredis, aioredis, channels-redis
Running setup.py install for hiredis: started
Running setup.py install for hiredis: finished with status 'error'
Complete output from command C:\Users\ahe\Desktop\Mou\scm\wstest\env\Scripts\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\---\\AppData\\Local\\Temp\\pycharm-packaging\\hiredis\\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\ahe\AppData\Local\Temp\pip-9to4gn6g-record\install-record.txt --single-version-externally-managed --compile --install-headers C:\Users\---\scm\wstest\env\include\site\python3.6\hiredis:
running install
running build
running build_py
creating build
creating build\lib.win32-3.6
creating build\lib.win32-3.6\hiredis
copying hiredis\version.py -> build\lib.win32-3.6\hiredis
copying hiredis\__init__.py -> build\lib.win32-3.6\hiredis
warning: build_py: byte-compiling is disabled, skipping.
running build_clib
building 'hiredis_for_hiredis_py' library
creating build\temp.win32-3.6
creating build\temp.win32-3.6\vendor
creating build\temp.win32-3.6\vendor\hiredis
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MT /Tcvendor/hiredis/read.c /Fobuild\temp.win32-3.6\vendor/hiredis/read.obj
fatal error C1510: Cannot load language resource clui.dll.
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\bin\\cl.exe' failed with exit status 4
----------------------------------------
Failed building wheel for hiredis
Command "C:\Users\---\scm\wstest\env\Scripts\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\---\\AppData\\Local\\Temp\\pycharm-packaging\\hiredis\\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\---\AppData\Local\Temp\pip-9to4gn6g-record\install-record.txt --single-version-externally-managed --compile --install-headers C:\Users\---\scm\wstest\env\include\site\python3.6\hiredis" failed with error code 1 in C:\Users\---\AppData\Local\Temp\pycharm-packaging\hiredis\

Categories

Resources