I have a code that uses a module which in turn uses the python module "file". Right now when I run my code I get the error -
File "c:\users\sss\appdata\local\programs\python\python36-32\lib\site-packages\enmscripting\common\element.py", line 3, in <module>
from file import FileResult
ModuleNotFoundError: No module named 'file'
So then I went to console and ran "import file". Sure enough I don't have that module.
import file
Traceback (most recent call last):
File "<ipython-input-27-f5da65cb6f61>", line 1, in <module>
import file
ModuleNotFoundError: No module named 'file'
I then proceeded with installing file using pip. Getting the error below. Please advise. I have searched a lot and haven't been able to find a fix.
C:\Users\sss>pip install file
Collecting file
Using cached https://files.pythonhosted.org/packages/0a/49/317ac8ed10afb25c4c24972ea4de4c5507d6b0ab13bca4941c9a0bdc64ea/file-0.3.0.tar.gz
Requirement already satisfied: cffi>=1.0.0 in c:\users\sss\appdata\local\programs\python\python36-32\lib\site-packages (from file)
Requirement already satisfied: pycparser in c:\users\sss\appdata\local\programs\python\python36-32\lib\site-packages (from cffi>=1.0.0->file)
Installing collected packages: file
Running setup.py install for file ... error
Complete output from command c:\users\sss\appdata\local\programs\python\python36-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Public\\Documents\\Wonder
share\\CreatorTemp\\pip-build-fe5vpmot\\file\\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\Public\Documents\Wondershare\CreatorTemp\pip-jqpbad1d-record\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build\lib.win32-3.6
creating build\lib.win32-3.6\file
copying src\file\_libmagic_build.py -> build\lib.win32-3.6\file
copying src\file\__init__.py -> build\lib.win32-3.6\file
running egg_info
writing src\file.egg-info\PKG-INFO
writing dependency_links to src\file.egg-info\dependency_links.txt
writing requirements to src\file.egg-info\requires.txt
writing top-level names to src\file.egg-info\top_level.txt
reading manifest file 'src\file.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*.py[cod]' found anywhere in distribution
warning: no previously-included files matching '__pycache__' found anywhere in distribution
warning: no previously-included files matching '*.so' found anywhere in distribution
warning: no previously-included files matching '*.dylib' found anywhere in distribution
writing manifest file 'src\file.egg-info\SOURCES.txt'
running build_ext
generating cffi module 'build\\temp.win32-3.6\\Release\\file._libmagic.c'
creating build\temp.win32-3.6
creating build\temp.win32-3.6\Release
building 'file._libmagic' extension
creating build\temp.win32-3.6\Release\build
creating build\temp.win32-3.6\Release\build\temp.win32-3.6
creating build\temp.win32-3.6\Release\build\temp.win32-3.6\Release
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x86\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\users\sss\appdata\local\
programs\python\python36-32\include -Ic:\users\sss\appdata\local\programs\python\python36-32\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\
14.16.27023\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.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" /Tcbuild\temp.win32-3.6\Release\file._libmagic.c /Fobuild\temp.win32-3.6\Release\build\temp.win32-3.6\Release\file._libmagic.obj
file._libmagic.c
build\temp.win32-3.6\Release\file._libmagic.c(492): fatal error C1083: Cannot open include file: 'magic.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.16.27023\\bin\\HostX86\\x86\\cl.exe' failed with exit status 2
Installed Magic again. No change -
C:\Users\sss>pip install libmagic
Collecting libmagic
Downloading https://files.pythonhosted.org/packages/83/86/419ddfc3879b4565a60e0c75b6d19baec48428cbc2f15aca5320b3d136f6/libmagic-1.0.tar.gz
Installing collected packages: libmagic
Running setup.py install for libmagic ... done
Successfully installed libmagic-1.0
Error - Same as before
ile._libmagic.c
build\temp.win32-3.6\Release\file._libmagic.c(492): fatal error C1083: Cannot open include file: 'magic.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.16.27023\\bin\\HostX86\\x86\\cl.exe' failed with exit status 2
Resolved -
I downgraded to Python 2.7 and everything works. It appears there are some compatibility issues with Python 3.6.
Resolved - I downgraded to Python 2.7 and everything works. It appears there are some compatibility issues with Python 3.6.
Related
When I try to pip install the py4ak lib using the following command:
pip install pyk4a --no-use-pep517 --global-option=build_ext --global-option="-IC:\Program Files\Azure Kinect SDK v1.4.1\sdk\include" --global-option="-LC:\Program Files\Azure Kinect SDK v1.4.1\sdk\windows-desktop\amd64\release\lib"
I get the following error:
PS C:\Users\Abdel Nasser\Documents\azure-kinect> pip install pyk4a --no-use-pep517 --global-option=build_ext --global-option="-IC:\Program Files\Azure Kinect SDK v1.4.1\sdk\include" --global-option="-LC:\Program Files\Azure Kinect SDK v1.4.1\sdk\windows-desktop\amd64\release\lib"
>>
WARNING: Disabling all use of wheels due to the use of --build-option / --global-option / --install-option.
WARNING: Ignoring invalid distribution -ywin32 (c:\users\abdel nasser\desktop\python\python38\lib\site-packages)
WARNING: Ignoring invalid distribution -ywin32 (c:\users\abdel nasser\desktop\python\python38\lib\site-packages)
Collecting pyk4a
Using cached pyk4a-1.4.0.tar.gz (23 kB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: numpy in c:\users\abdel nasser\desktop\python\python38\lib\site-packages (from pyk4a) (1.23.0)
Requirement already satisfied: python_version>="3.4" in c:\users\abdel nasser\desktop\python\python38\lib\site-packages (from pyk4a) (0.0.2)
Skipping wheel build for pyk4a, due to binaries being disabled for it.
WARNING: Ignoring invalid distribution -ywin32 (c:\users\abdel nasser\desktop\python\python38\lib\site-packages)
Installing collected packages: pyk4a
Running setup.py install for pyk4a ... error
error: subprocess-exited-with-error
× Running setup.py install for pyk4a did not run successfully.
│ exit code: 1
╰─> [13 lines of output]
Automatically detected kinect SDK. Adding include dir: C:\Program Files\Azure Kinect SDK v1.4.1\sdk\include and library dir C:\Program Files\Azure Kinect SDK v1.4.1\sdk\windows-desktop\AMD64\release\lib.
c:\users\abdel nasser\desktop\python\python38\lib\site-packages\setuptools\dist.py:771: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead
warnings.warn(
running build_ext
building 'k4a_module' extension
creating build
creating build\temp.win-amd64-cpython-38
creating build\temp.win-amd64-cpython-38\Release
creating build\temp.win-amd64-cpython-38\Release\pyk4a
"C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.32.31326\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD "-IC:\Program Files\Azure Kinect SDK v1.4.1\sdk\include" "-Ic:\users\abdel nasser\desktop\python\python38\lib\site-packages\numpy\core\include" "-IC:\Program Files\Azure Kinect SDK v1.4.1\sdk\include" "-Ic:\users\abdel nasser\desktop\python\python38\include" "-Ic:\users\abdel nasser\desktop\python\python38\Include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.32.31326\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.32.31326\include" /EHsc /Tppyk4a/pyk4a.cpp /Fobuild\temp.win-amd64-cpython-38\Release\pyk4a/pyk4a.obj
pyk4a.cpp
c:\users\abdel nasser\desktop\python\python38\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\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.32.31326\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> pyk4a
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
WARNING: Ignoring invalid distribution -ywin32 (c:\users\abdel nasser\desktop\python\python38\lib\site-packages)
WARNING: Ignoring invalid distribution -ywin32 (c:\users\abdel nasser\desktop\python\python38\lib\site-packages)
WARNING: Ignoring invalid distribution -ywin32 (c:\users\abdel nasser\desktop\python\python38\lib\site-packages)
Image of C++ build tools that are installed
I am not at all sure how to deal with this:
c:\users\abdel nasser\desktop\python\python38\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\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.32.31326\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2 [end of output]
Any help will be greatly appreciated.
To resolve the error, enable the VS compiler to find the header, by defining the environment variable INCLUDE pointing to the path of io.h.
The location of io.h may change for various versions and environments.
References:
'io.h': No such file or directory during "pip install netifaces"
I am going to install pygrib. However, whenever I try to install it, fatal error C1083 appears and says I can't find grib_api.h. Visual studio was also reinstalled, and github found grib_api.h and put it in the path, but it changed to a new error that there was no times in sys. When I solved this error, the error suddenly increased. No matter how hard I try with pip install, that error keeps coming out.
E:\pygrib-master>python setup.py install
eccodes not found, build may fail...
running install
C:\Users\zingg\AppData\Local\Programs\Python\Python310\lib\site-
packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py
install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
C:\Users\zingg\AppData\Local\Programs\Python\Python310\lib\site-
packages\setuptools\command\easy_install.py:160: EasyInstallDeprecationWarning:
easy_install command is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running bdist_egg
running egg_info
writing src\pygrib.egg-info\PKG-INFO
writing dependency_links to src\pygrib.egg-info\dependency_links.txt
writing requirements to src\pygrib.egg-info\requires.txt
writing top-level names to src\pygrib.egg-info\top_level.txt
reading manifest file 'src\pygrib.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*.def' under directory 'eccodes'
adding license file 'LICENSE'
writing manifest file 'src\pygrib.egg-info\SOURCES.txt'
installing library code to build\bdist.win-amd64\egg
running install_lib
running build_py
running build_ext
skipping 'src/pygrib\_pygrib.c' Cython extension (up-to-date)
building 'pygrib._pygrib' extension
"C:\Program Files\Microsoft Visual
Studio\2022\Community\VC\Tools\MSVC\14.31.31103\bin\HostX86\x64\cl.exe" /c /nologo /O2
/W3 /GL /DNDEBUG /MD -IC:\Users\zingg\AppData\Local\Programs\Python\Python310\include -
IC:\Users\zingg\AppData\Local\Programs\Python\Python310\Include -
IC:\Users\zingg\AppData\Local\Programs\Python\Python310\lib\site-
packages\numpy\core\include "-IC:\Program Files\Microsoft Visual
Studio\2022\Community\VC\Tools\MSVC\14.31.31103\ATLMFC\include" "-IC:\Program
Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.31.31103\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 Files (x86)\Windows
Kits\10\\include\10.0.19041.0\\cppwinrt" /Tcsrc/pygrib\_pygrib.c /Fobuild\temp.win-
amd64-3.10\Release\src/pygrib\_pygrib.obj
_pygrib.c
C:\Users\zingg\AppData\Local\Programs\Python\Python310\lib\site-
packages\numpy\core\include\numpy\npy_1_7_deprecated_api.h(14) : Warning Msg: Using
deprecated NumPy API, disable it with #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
src/pygrib\_pygrib.c(697): fatal error C1083: 포함 파일을 열 수 없습니다. 'grib_api.h': No
such file or directory
error: command 'C:\\Program Files\\Microsoft Visual
Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.31.31103\\bin\\HostX86\\x64\\cl.exe' failed
with exit code 2
Since upgrarding to Python 3.9.2 and trying to create new venv for some of my projects and install the requirements, some of the packages are erroring out. Two that I've had trouble with so far are python-levenshtein and fasttext. I'm on Windows 10.
I've tried upgrading pip, installing frow powershell instead of inside VSCODE, installing wheel, installing directly instead of using requirements.txt. I've read a bunch of questions on here which I'll leave links below. There's quite alot of output but it's generally some variation on this depending on the package:
Running setup.py clean for fasttext
Building wheel for python-Levenshtein (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'd:\vscode\serverless-chat-be\.venv\scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\joshb\\AppData\\Local\\Temp\\pip-install-ykra_2_4\\python-levenshtein_f6f5b4eafe494049bc8ae592ea544a34\\setup.py'"'"'; __file__='"'"'C:\\Users\\joshb\\AppData\\Local\\Temp\\pip-install-ykra_2_4\\python-levenshtein_f6f5b4eafe494049bc8ae592ea544a34\\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\joshb\AppData\Local\Temp\pip-wheel-1hctb729'
cwd: C:\Users\joshb\AppData\Local\Temp\pip-install-ykra_2_4\python-levenshtein_f6f5b4eafe494049bc8ae592ea544a34\
Complete output (33 lines):
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
creating build\lib.win-amd64-3.9\Levenshtein
copying Levenshtein\StringMatcher.py -> build\lib.win-amd64-3.9\Levenshtein
copying Levenshtein\__init__.py -> build\lib.win-amd64-3.9\Levenshtein
running egg_info
writing python_Levenshtein.egg-info\PKG-INFO
writing dependency_links to python_Levenshtein.egg-info\dependency_links.txt
writing entry points to python_Levenshtein.egg-info\entry_points.txt
writing namespace_packages to python_Levenshtein.egg-info\namespace_packages.txt
writing requirements to python_Levenshtein.egg-info\requires.txt
writing top-level names to python_Levenshtein.egg-info\top_level.txt
reading manifest file 'python_Levenshtein.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*pyc' found anywhere in distribution
warning: no previously-included files matching '*so' found anywhere in distribution
warning: no previously-included files matching '.project' found anywhere in distribution
warning: no previously-included files matching '.pydevproject' found anywhere in distribution
writing manifest file 'python_Levenshtein.egg-info\SOURCES.txt'
copying Levenshtein\_levenshtein.c -> build\lib.win-amd64-3.9\Levenshtein
copying Levenshtein\_levenshtein.h -> build\lib.win-amd64-3.9\Levenshtein
running build_ext
building 'Levenshtein._levenshtein' extension
creating build\temp.win-amd64-3.9
creating build\temp.win-amd64-3.9\Release
creating build\temp.win-amd64-3.9\Release\Levenshtein
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.26.28801\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Id:\vscode\serverless-chat-be\.venv\include -IC:\Users\joshb\AppData\Local\Programs\Python\Python39\include -IC:\Users\joshb\AppData\Local\Programs\Python\Python39\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.26.28801\include /TcLevenshtein/_levenshtein.c /Fobuild\temp.win-amd64-3.9\Release\Levenshtein/_levenshtein.obj
_levenshtein.c
C:\Users\joshb\AppData\Local\Programs\Python\Python39\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\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.26.28801\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
----------------------------------------
ERROR: Failed building wheel for python-Levenshtein
Running setup.py clean for python-Levenshtein
Failed to build fasttext python-Levenshtein
Links:
How to fix error "ERROR: Command errored out with exit status 1: python." when trying to install django-heroku using pip
https://github.com/pypa/pip/issues/8618
error command errored out with exit status 1 pip install
How can I fix this?
Will it just be a case of using Pyhon 3.8 for these projects for now?
EDIT:
The problem doesn't seem to be limited to Python version 3.9.2. I've tried installing on 3.8.8 and 3.8.0 32 Bit as I have both of these installed on my system and I'm getting the exact same issue.
enter image description hereI was installing the packages on my conda environment in order to run the pose estimation according to the tutorial from https://www.youtube.com/watch?v=nUjGLjOmF7o&list=PLX-LrBk6h3wQ17z1axCOAS1QVS1dvTEvR and the github page https://github.com/ildoonet/tf-pose-estimation where u have to run the requirement.txt file to install the 3rd party packages for it to run in the end $ pip3 install -r requirements.txt.
I had 3 errors. the first was missing Cython package that I already found and installed. The 2nd was an error: Error Microsoft Visual C++ 14.0 is required that i resolved going here https://medium.com/#jacky_ttt/day060-fix-error-microsoft-visual-c-14-0-is-required-629413e798cd and installing the necessary packages in the visual studio c++ build tools. But i came across a new error that even i can solve. I would appreciate any help. The error came on my anaconda prompt:
Building wheels for collected packages: pycocotools, tensorpack
Building wheel for pycocotools (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\M S Tiwana\.conda\envs\tfposee\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\MSTIWA~1\\AppData\\Local\\Temp\\pip-install-vjk9vvy3\\pycocotools\\setup.py'"'"'; __file__='"'"'C:\\Users\\MSTIWA~1\\AppData\\Local\\Temp\\pip-install-vjk9vvy3\\pycocotools\\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\MSTIWA~1\AppData\Local\Temp\pip-wheel-fdystmqn'
cwd: C:\Users\MSTIWA~1\AppData\Local\Temp\pip-install-vjk9vvy3\pycocotools\
Complete output (19 lines):
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
creating build\lib.win-amd64-3.7\pycocotools
copying pycocotools\coco.py -> build\lib.win-amd64-3.7\pycocotools
copying pycocotools\cocoeval.py -> build\lib.win-amd64-3.7\pycocotools
copying pycocotools\mask.py -> build\lib.win-amd64-3.7\pycocotools
copying pycocotools\__init__.py -> build\lib.win-amd64-3.7\pycocotools
running build_ext
building 'pycocotools._mask' extension
creating build\temp.win-amd64-3.7
creating build\temp.win-amd64-3.7\Release
creating build\temp.win-amd64-3.7\Release\pycocotools
creating build\temp.win-amd64-3.7\Release\common
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD "-IC:\Users\M S Tiwana\.conda\envs\tfposee\lib\site-packages\numpy\core\include" -Icommon "-IC:\Users\M S Tiwana\.conda\envs\tfposee\include" "-IC:\Users\M S Tiwana\.conda\envs\tfposee\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-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" /Tcpycocotools/_mask.c /Fobuild\temp.win-amd64-3.7\Release\pycocotools/_mask.obj -Wno-cpp -Wno-unused-function -std=c99
cl : Command line error D8021 : invalid numeric argument '/Wno-cpp'
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.25.28610\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Failed building wheel for pycocotools
Running setup.py clean for pycocotools
Building wheel for tensorpack (setup.py) ... done
Created wheel for tensorpack: filename=tensorpack-0.10-py2.py3-none-any.whl size=291265 sha256=85cc191f624cecba1af9d7bfeff01bd6fd592c8763010a1468abc0c6ccedfeac
Stored in directory: C:\Users\MSTIWA~1\AppData\Local\Temp\pip-ephem-wheel-cache-cjd1_8p6\wheels\8f\c4\7d\b7ca213c76a0b78c772c6d3173364b8102d262acda1ec45207
Successfully built tensorpack
Failed to build pycocotools
Installing collected packages: pycocotools, slidingwindow, tabulate, msgpack, msgpack-numpy, tensorpack
Running setup.py install for pycocotools ... error
Is there a visual studio c++ build tool install error ?
pycocotools is for linux, since you're using windows 10
instead of using: pip install pycocotools
use this: pip install pycocotools-windows
https://pypi.org/project/pycocotools-windows/
Hi I am running a Windows 10 x64 machine running python 3.7 and I am trying to run code off of this website
It is giving me this error:
Traceback (most recent call last):
File "model_main.py", line 25, in <module>
from object_detection import model_lib
File "C:\Python37\models\models-master\research\object_detection\model_lib.py", line 27, in <module>
from object_detection import eval_util
File "C:\Python37\models\models-master\research\object_detection\eval_util.py", line 33, in <module>
from object_detection.metrics import coco_evaluation
File "C:\Python37\models\models-master\research\object_detection\metrics\coco_evaluation.py", line 25, in <module>
from object_detection.metrics import coco_tools
File "C:\Python37\models\models-master\research\object_detection\metrics\coco_tools.py", line 51, in <module>
from pycocotools import coco
File "C:\Python37\models\models-master\research\pycocotools\coco.py", line 55, in <module>
from . import mask as maskUtils
File "C:\Python37\models\models-master\research\pycocotools\mask.py", line 3, in <module>
import pycocotools._mask as _mask
ModuleNotFoundError: No module named 'pycocotools._mask'
I have tried to run the setup.py install from the cocoapi\PythonAPI directory and get this error
running install
running bdist_egg
running egg_info
creating pycocotools.egg-info
writing pycocotools.egg-info\PKG-INFO
writing dependency_links to pycocotools.egg-info\dependency_links.txt
writing requirements to pycocotools.egg-info\requires.txt
writing top-level names to pycocotools.egg-info\top_level.txt
writing manifest file 'pycocotools.egg-info\SOURCES.txt'
reading manifest file 'pycocotools.egg-info\SOURCES.txt'
writing manifest file 'pycocotools.egg-info\SOURCES.txt'
installing library code to build\bdist.win-amd64\egg
running install_lib
running build_py
creating build\lib.win-amd64-3.7
creating build\lib.win-amd64-3.7\pycocotools
copying pycocotools\coco.py -> build\lib.win-amd64-3.7\pycocotools
copying pycocotools\cocoeval.py -> build\lib.win-amd64-3.7\pycocotools
copying pycocotools\mask.py -> build\lib.win-amd64-3.7\pycocotools
copying pycocotools\__init__.py -> build\lib.win-amd64-3.7\pycocotools
running build_ext
skipping 'pycocotools\_mask.c' Cython extension (up-to-date)
building 'pycocotools._mask' extension
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Python37\lib\site-packages\numpy\core\include -I../common -IC:\Python37\include -IC:\Python37\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\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" /Tc../common/maskApi.c /Fobuild\temp.win-amd64-3.7\Release\../common/maskApi.obj -Wno-cpp -Wno-unused-function -std=c99
cl : Command line error D8021 : invalid numeric argument '/Wno-cpp'
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.24.28314\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
I have everything up to date, Any help is appreciated thanks!!
pip install argparse
pip install dill
pip install fire
pip install matplotlib
pip install numba
pip install psutil
pip install requests
pip install scikit-image
pip install scipy
pip install slidingwindow
pip install tqdm
pip install "git+https://github.com/ppwwyyxx/tensorpack.git"
pip install "git+https://github.com/philferriere/cocoapi.git#egg=pycocotools&subdirectory=PythonAPI"
this helped me however not sure about all this packages needs.
couldn't found link where i found it to post here :(
It's not my own investigate, but it's works for me.