I'm trying to install tf-models-official on a PC with Windows 10.
When I run pip install tf-models-official on the command prompt, I get the following error
Building wheel for pycocotools (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\iavta\anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\iavta\\AppData\\Local\\Temp\\pip-install-0twx2hmy\\pycocotools_ebdc747cefa04c81a8aab51eebf9fe53\\setup.py'"'"'; __file__='"'"'C:\\Users\\iavta\\AppData\\Local\\Temp\\pip-install-0twx2hmy\\pycocotools_ebdc747cefa04c81a8aab51eebf9fe53\\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\iavta\AppData\Local\Temp\pip-wheel-60i3880o'
cwd: C:\Users\iavta\AppData\Local\Temp\pip-install-0twx2hmy\pycocotools_ebdc747cefa04c81a8aab51eebf9fe53\
Complete output (16 lines):
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.8
creating build\lib.win-amd64-3.8\pycocotools
copying pycocotools\coco.py -> build\lib.win-amd64-3.8\pycocotools
copying pycocotools\cocoeval.py -> build\lib.win-amd64-3.8\pycocotools
copying pycocotools\mask.py -> build\lib.win-amd64-3.8\pycocotools
copying pycocotools\__init__.py -> build\lib.win-amd64-3.8\pycocotools
running build_ext
cythoning pycocotools/_mask.pyx to pycocotools\_mask.c
C:\Users\iavta\anaconda3\lib\site-packages\Cython\Compiler\Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: C:\Users\iavta\AppData\Local\Temp\pip-install-0twx2hmy\pycocotools_ebdc747cefa04c81a8aab51eebf9fe53\pycocotools\_mask.pyx
tree = Parsing.p_module(s, pxd, full_module_name)
building 'pycocotools._mask' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
----------------------------------------
ERROR: Failed building wheel for pycocotools
Running setup.py clean for pycocotools
Successfully built termcolor
Failed to build pycocotools
I've already done pip install pycocotools-windows and I had no problems whatsoever during installation, and according to Vision Studio Installer, I have Visual Studio 2019 version 16.11.3 already installed. So, I have no idea why they ask me for Microsoft Visual C++ 14.0 or greater.
I solved the annoying "failed building wheel for pycocotools" issue on windows 10 anaconda (python=3.9) by:
Uninstall Visual Studio 2019;
Uninstall all Visual C++ Redistributable (2015-2019, 2013, 2012, etc.);
Install Visual Studio 2022, and tick Desktop development with C++.
Activate the new virtual environment, and run "pip install tf-models-official".
I am trying to install pandas, but installation fails and giving me the below error. I am using Windows Server 2012 and Python 3.4. I have installed Visual Studio 2017 also.
When I tried the same with anaconda its working fine.
(env_one_site) D:\workspace\site> pip install pandas
DEPRECATION: Python 3.4 support has been deprecated. pip 19.1 will be the last one supporting it. Please upgrade your Python as Python 3.4 won't be maintained after March 2019 (cf PEP 429).
Collecting pandas
Using cached https://files.pythonhosted.org/packages/08/01/803834bc8a4e708aedebb133095a88a4dad9f45bbaf5ad777d2bea543c7e/pandas-0.22.0.tar.gz
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... error
Complete output from command d:\workspace\one_site_project\env_one_site\scripts\python.exe d:\workspace\one_site_project\env_one_site\lib\site-packages\pip install --ignore-installed --no-user --prefix C:\Users\appadmin\AppData\Local
\Temp\pip-build-env-mn1ok9zs\normal --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- numpy>=1.9.0:
DEPRECATION: Python 3.4 support has been deprecated. pip 19.1 will be the last one supporting it. Please upgrade your Python as Python 3.4 won't be maintained after March 2019 (cf PEP 429).
Collecting numpy>=1.9.0
Downloading https://files.pythonhosted.org/packages/93/48/956b9dcdddfcedb1705839280e02cbfeb2861ed5d7f59241210530867d5b/numpy-1.16.3.zip (5.1MB)
Building wheels for collected packages: numpy
Building wheel for numpy (setup.py): started
Building wheel for numpy (setup.py): finished with status 'error'
Complete output from command d:\workspace\one_site_project\env_one_site\scripts\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\appadmin\\AppData\\Local\\Temp\\pip-install-rij08jgz\\numpy\\setup.py';f=getattr(tok
enize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d C:\Users\appadmin\AppData\Local\Temp\pip-wheel-_yjggw50 --python-tag cp34:
Running from numpy source directory.
blas_opt_info:
blas_mkl_info:
customize MSVCCompiler
libraries mkl_rt not found in ['d:\\workspace\\one_site_project\\env_one_site\\lib', 'C:\\']
NOT AVAILABLE
blis_info:
customize MSVCCompiler
libraries blis not found in ['d:\\workspace\\one_site_project\\env_one_site\\lib', 'C:\\']
NOT AVAILABLE
openblas_info:
customize MSVCCompiler
customize MSVCCompiler
libraries openblas not found in ['d:\\workspace\\one_site_project\\env_one_site\\lib', 'C:\\']
get_default_fcompiler: matching types: '['gnu', 'intelv', 'absoft', 'compaqv', 'intelev', 'gnu95', 'g95', 'intelvem', 'intelem', 'flang']'
customize GnuFCompiler
Could not locate executable g77
Could not locate executable f77
customize IntelVisualFCompiler
Could not locate executable ifort
Could not locate executable ifl
customize AbsoftFCompiler
Could not locate executable f90
customize CompaqVisualFCompiler
Could not locate executable DF
atlas_3_10_blas_info:
customize MSVCCompiler
libraries satlas not found in ['d:\\workspace\\one_site_project\\env_one_site\\lib', 'C:\\']
NOT AVAILABLE
atlas_blas_threads_info:
Setting PTATLAS=ATLAS
customize MSVCCompiler
libraries ptf77blas,ptcblas,atlas not found in ['d:\\workspace\\one_site_project\\env_one_site\\lib', 'C:\\']
NOT AVAILABLE
atlas_blas_info:
customize MSVCCompiler
libraries f77blas,cblas,atlas not found in ['d:\\workspace\\one_site_project\\env_one_site\\lib', 'C:\\']
NOT AVAILABLE
accelerate_info:
NOT AVAILABLE
C:\Users\appadmin\AppData\Local\Temp\pip-install-rij08jgz\numpy\numpy\distutils\system_info.py:638: UserWarning:
Atlas (http://math-atlas.sourceforge.net/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [atlas]) or by setting
the ATLAS environment variable.
self.calc_info()
blas_info:
customize MSVCCompiler
libraries blas not found in ['d:\\workspace\\one_site_project\\env_one_site\\lib', 'C:\\']
NOT AVAILABLE
C:\Users\appadmin\AppData\Local\Temp\pip-install-rij08jgz\numpy\numpy\distutils\system_info.py:638: UserWarning:
Blas (http://www.netlib.org/blas/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [blas]) or by setting
the BLAS environment variable.
self.calc_info()
blas_src_info:
NOT AVAILABLE
C:\Users\appadmin\AppData\Local\Temp\pip-install-rij08jgz\numpy\numpy\distutils\system_info.py:638: UserWarning:
Blas (http://www.netlib.org/blas/) sources not found.
Directories to search for the sources can be specified in the
numpy/distutils/site.cfg file (section [blas_src]) or by setting
the BLAS_SRC environment variable.
self.calc_info()
NOT AVAILABLE
'svnversion' is not recognized as an internal or external command,
operable program or batch file.
non-existing path in 'numpy\\distutils': 'site.cfg'
lapack_opt_info:
lapack_mkl_info:
customize MSVCCompiler
libraries mkl_rt not found in ['d:\\workspace\\one_site_project\\env_one_site\\lib', 'C:\\']
NOT AVAILABLE
openblas_lapack_info:
customize MSVCCompiler
customize MSVCCompiler
libraries openblas not found in ['d:\\workspace\\one_site_project\\env_one_site\\lib', 'C:\\']
NOT AVAILABLE
openblas_clapack_info:
customize MSVCCompiler
customize MSVCCompiler
libraries openblas,lapack not found in ['d:\\workspace\\one_site_project\\env_one_site\\lib', 'C:\\']
NOT AVAILABLE
C:\Users\appadmin\AppData\Local\Temp\pip-install-rij08jgz\numpy\numpy\distutils\system_info.py:638: UserWarning:
Lapack (http://www.netlib.org/lapack/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [lapack]) or by setting
the LAPACK environment variable.
self.calc_info()
lapack_src_info:
NOT AVAILABLE
C:\Users\appadmin\AppData\Local\Temp\pip-install-rij08jgz\numpy\numpy\distutils\system_info.py:638: UserWarning:
Lapack (http://www.netlib.org/lapack/) sources not found.
Directories to search for the sources can be specified in the
numpy/distutils/site.cfg file (section [lapack_src]) or by setting
the LAPACK_SRC environment variable.
self.calc_info()
NOT AVAILABLE
C:\Python34\Lib\distutils\dist.py:260: UserWarning: Unknown distribution option: 'define_macros'
warnings.warn(msg)
running bdist_wheel
running build
running config_cc
unifing config_cc, config, build_clib, build_ext, build commands --compiler options
running config_fc
unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
running build_src
build_src
building py_modules sources
creating build
creating build\src.win-amd64-3.4
creating build\src.win-amd64-3.4\numpy
creating build\src.win-amd64-3.4\numpy\distutils
building library "npymath" sources
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Bin\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Inumpy\core\src\common -Inumpy\core\src -Inumpy\core -Inumpy\core\src\npymath -Inumpy\core\src\multiarray -Inumpy\core\src\umat
h -Inumpy\core\src\npysort -IC:\Python34\include -IC:\Python34\include /Tc_configtest.c /Fo_configtest.obj
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Bin\link.exe /nologo /INCREMENTAL:NO /MANIFEST _configtest.obj /OUT:_configtest.exe /MANIFESTFILE:_configtest.exe.manifest
LINK : fatal error LNK1104: cannot open file 'MSVCRT.lib'
failure.
removing: _configtest.c _configtest.obj _configtest.obj.d
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\appadmin\AppData\Local\Temp\pip-install-rij08jgz\numpy\setup.py", line 415, in <module>
setup_package()
File "C:\Users\appadmin\AppData\Local\Temp\pip-install-rij08jgz\numpy\setup.py", line 407, in setup_package
setup(**metadata)
File "C:\Users\appadmin\AppData\Local\Temp\pip-install-rij08jgz\numpy\numpy\distutils\core.py", line 171, in setup
cmd_obj.run()
File "C:\Users\appadmin\AppData\Local\Temp\pip-install-rij08jgz\numpy\numpy\distutils\command\build_src.py", line 148, in run
self.build_sources()
File "C:\Users\appadmin\AppData\Local\Temp\pip-install-rij08jgz\numpy\numpy\distutils\command\build_src.py", line 159, in build_sources
self.build_library_sources(*libname_info)
File "C:\Users\appadmin\AppData\Local\Temp\pip-install-rij08jgz\numpy\numpy\distutils\command\build_src.py", line 292, in build_library_sources
sources = self.generate_sources(sources, (lib_name, build_info))
File "C:\Users\appadmin\AppData\Local\Temp\pip-install-rij08jgz\numpy\numpy\distutils\command\build_src.py", line 375, in generate_sources
source = func(extension, build_dir)
File "numpy\core\setup.py", line 667, in get_mathlib_info
raise RuntimeError("Broken toolchain: cannot link a simple C program")
RuntimeError: Broken toolchain: cannot link a simple C program
----------------------------------------
Failed building wheel for numpy
Running setup.py clean for numpy
Complete output from command d:\workspace\one_site_project\env_one_site\scripts\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\appadmin\\AppData\\Local\\Temp\\pip-install-rij08jgz\\numpy\\setup.py';f=getattr(tok
enize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" clean --all:
Running from numpy source directory.
`setup.py clean` is not supported, use one of the following instead:
- `git clean -xdf` (cleans all files)
- `git clean -Xdf` (cleans all versioned files, doesn't touch
files that aren't checked into the git repo)
Add `--force` to your command to use it anyway if you must (unsupported).
----------------------------------------
Failed cleaning build dir for numpy
Failed to build numpy
Installing collected packages: numpy
Running setup.py install for numpy: started
Running setup.py install for numpy: finished with status 'error'
Complete output from command d:\workspace\one_site_project\env_one_site\scripts\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\appadmin\\AppData\\Local\\Temp\\pip-install-rij08jgz\\numpy\\setup.py';f=getattr(t
okenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\appadmin\AppData\Local\Temp\pip-record-hx4uurea\install-record.txt --single-version-externa
lly-managed --prefix C:\Users\appadmin\AppData\Local\Temp\pip-build-env-mn1ok9zs\normal --compile --install-headers d:\workspace\one_site_project\env_one_site\include\site\python3.4\numpy:
Running from numpy source directory.
Note: if you need reliable uninstall behavior, then install
with pip instead of using `setup.py install`:
- `pip install .` (from a git repo or downloaded source
release)
- `pip install numpy` (last NumPy release on PyPi)
blas_opt_info:
blas_mkl_info:
customize MSVCCompiler
libraries mkl_rt not found in ['d:\\workspace\\one_site_project\\env_one_site\\lib', 'C:\\']
NOT AVAILABLE
blis_info:
customize MSVCCompiler
libraries blis not found in ['d:\\workspace\\one_site_project\\env_one_site\\lib', 'C:\\']
NOT AVAILABLE
openblas_info:
customize MSVCCompiler
customize MSVCCompiler
libraries openblas not found in ['d:\\workspace\\one_site_project\\env_one_site\\lib', 'C:\\']
get_default_fcompiler: matching types: '['gnu', 'intelv', 'absoft', 'compaqv', 'intelev', 'gnu95', 'g95', 'intelvem', 'intelem', 'flang']'
customize GnuFCompiler
Could not locate executable g77
Could not locate executable f77
customize IntelVisualFCompiler
Could not locate executable ifort
Could not locate executable ifl
customize AbsoftFCompiler
Could not locate executable f90
customize CompaqVisualFCompiler
Could not locate executable DF
customize IntelItaniumVisualFCompiler
Could not locate executable efl
customize Gnu95FCompiler
Could not locate executable gfortran
Could not locate executable f95
customize G95FCompiler
Could not locate executable g95
customize IntelEM64VisualFCompiler
customize IntelEM64TFCompiler
Could not locate executable efort
Could not locate executable efc
customize PGroupFlangCompiler
don't know how to compile Fortran code on platform 'nt'
NOT AVAILABLE
atlas_3_10_blas_threads_info:
Setting PTATLAS=ATLAS
customize MSVCCompiler
libraries tatlas not found in ['d:\\workspace\\one_site_project\\env_one_site\\lib', 'C:\\']
NOT AVAILABLE
atlas_3_10_blas_info:
customize MSVCCompiler
libraries satlas not found in ['d:\\workspace\\one_site_project\\env_one_site\\lib', 'C:\\']
NOT AVAILABLE
atlas_blas_threads_info:
Setting PTATLAS=ATLAS
customize MSVCCompiler
libraries ptf77blas,ptcblas,atlas not found in ['d:\\workspace\\one_site_project\\env_one_site\\lib', 'C:\\']
NOT AVAILABLE
atlas_blas_info:
customize MSVCCompiler
libraries f77blas,cblas,atlas not found in ['d:\\workspace\\one_site_project\\env_one_site\\lib', 'C:\\']
NOT AVAILABLE
accelerate_info:
NOT AVAILABLE
C:\Users\appadmin\AppData\Local\Temp\pip-install-rij08jgz\numpy\numpy\distutils\system_info.py:638: UserWarning:
Atlas (http://math-atlas.sourceforge.net/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [atlas]) or by setting
the ATLAS environment variable.
self.calc_info()
blas_info:
customize MSVCCompiler
libraries blas not found in ['d:\\workspace\\one_site_project\\env_one_site\\lib', 'C:\\']
NOT AVAILABLE
C:\Users\appadmin\AppData\Local\Temp\pip-install-rij08jgz\numpy\numpy\distutils\system_info.py:638: UserWarning:
Blas (http://www.netlib.org/blas/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [blas]) or by setting
the BLAS environment variable.
self.calc_info()
blas_src_info:
NOT AVAILABLE
C:\Users\appadmin\AppData\Local\Temp\pip-install-rij08jgz\numpy\numpy\distutils\system_info.py:638: UserWarning:
Blas (http://www.netlib.org/blas/) sources not found.
Directories to search for the sources can be specified in the
numpy/distutils/site.cfg file (section [blas_src]) or by setting
the BLAS_SRC environment variable.
self.calc_info()
NOT AVAILABLE
'svnversion' is not recognized as an internal or external command,
operable program or batch file.
non-existing path in 'numpy\\distutils': 'site.cfg'
lapack_opt_info:
lapack_mkl_info:
customize MSVCCompiler
libraries mkl_rt not found in ['d:\\workspace\\one_site_project\\env_one_site\\lib', 'C:\\']
NOT AVAILABLE
openblas_lapack_info:
customize MSVCCompiler
customize MSVCCompiler
libraries openblas not found in ['d:\\workspace\\one_site_project\\env_one_site\\lib', 'C:\\']
NOT AVAILABLE
openblas_clapack_info:
customize MSVCCompiler
customize MSVCCompiler
libraries openblas,lapack not found in ['d:\\workspace\\one_site_project\\env_one_site\\lib', 'C:\\']
NOT AVAILABLE
atlas_3_10_threads_info:
Setting PTATLAS=ATLAS
customize MSVCCompiler
libraries lapack_atlas not found in d:\workspace\one_site_project\env_one_site\lib
customize MSVCCompiler
libraries tatlas,tatlas not found in d:\workspace\one_site_project\env_one_site\lib
customize MSVCCompiler
libraries lapack_atlas not found in C:\
customize MSVCCompiler
libraries tatlas,tatlas not found in C:\
<class 'numpy.distutils.system_info.atlas_3_10_threads_info'>
NOT AVAILABLE
atlas_3_10_info:
customize MSVCCompiler
libraries lapack_atlas not found in d:\workspace\one_site_project\env_one_site\lib
customize MSVCCompiler
libraries satlas,satlas not found in d:\workspace\one_site_project\env_one_site\lib
customize MSVCCompiler
libraries lapack_atlas not found in C:\
customize MSVCCompiler
libraries satlas,satlas not found in C:\
<class 'numpy.distutils.system_info.atlas_3_10_info'>
NOT AVAILABLE
atlas_threads_info:
Setting PTATLAS=ATLAS
customize MSVCCompiler
libraries lapack_atlas not found in d:\workspace\one_site_project\env_one_site\lib
customize MSVCCompiler
libraries ptf77blas,ptcblas,atlas not found in d:\workspace\one_site_project\env_one_site\lib
customize MSVCCompiler
libraries lapack_atlas not found in C:\
customize MSVCCompiler
libraries ptf77blas,ptcblas,atlas not found in C:\
<class 'numpy.distutils.system_info.atlas_threads_info'>
NOT AVAILABLE
atlas_info:
customize MSVCCompiler
libraries lapack_atlas not found in d:\workspace\one_site_project\env_one_site\lib
customize MSVCCompiler
libraries f77blas,cblas,atlas not found in d:\workspace\one_site_project\env_one_site\lib
customize MSVCCompiler
libraries lapack_atlas not found in C:\
customize MSVCCompiler
libraries f77blas,cblas,atlas not found in C:\
<class 'numpy.distutils.system_info.atlas_info'>
NOT AVAILABLE
lapack_info:
customize MSVCCompiler
libraries lapack not found in ['d:\\workspace\\one_site_project\\env_one_site\\lib', 'C:\\']
NOT AVAILABLE
build_src
building py_modules sources
building library "npymath" sources
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Bin\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Inumpy\core\src\common -Inumpy\core\src -Inumpy\core -Inumpy\core\src\npymath -Inumpy\core\src\multiarray -Inumpy\core\src\um
ath -Inumpy\core\src\npysort -IC:\Python34\include -IC:\Python34\include /Tc_configtest.c /Fo_configtest.obj
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Bin\link.exe /nologo /INCREMENTAL:NO /MANIFEST _configtest.obj /OUT:_configtest.exe /MANIFESTFILE:_configtest.exe.manifest
LINK : fatal error LNK1104: cannot open file 'MSVCRT.lib'
failure.
removing: _configtest.c _configtest.obj _configtest.obj.d
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\appadmin\AppData\Local\Temp\pip-install-rij08jgz\numpy\setup.py", line 415, in <module>
setup_package()
File "C:\Users\appadmin\AppData\Local\Temp\pip-install-rij08jgz\numpy\setup.py", line 407, in setup_package
setup(**metadata)
File "C:\Users\appadmin\AppData\Local\Temp\pip-install-rij08jgz\numpy\numpy\distutils\core.py", line 171, in setup
return old_setup(**new_attr)
File "d:\workspace\one_site_project\env_one_site\lib\site-packages\setuptools\__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "C:\Python34\Lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Python34\Lib\distutils\dist.py", line 955, in run_commands
self.run_command(cmd)
File "C:\Python34\Lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Users\appadmin\AppData\Local\Temp\pip-install-rij08jgz\numpy\numpy\distutils\command\install.py", line 62, in run
r = self.setuptools_run()
File "C:\Users\appadmin\AppData\Local\Temp\pip-install-rij08jgz\numpy\numpy\distutils\command\install.py", line 36, in setuptools_run
return distutils_install.run(self)
File "C:\Python34\Lib\distutils\command\install.py", line 539, in run
self.run_command('build')
File "C:\Python34\Lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Python34\Lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Users\appadmin\AppData\Local\Temp\pip-install-rij08jgz\numpy\numpy\distutils\command\build.py", line 47, in run
old_build.run(self)
File "C:\Python34\Lib\distutils\command\build.py", line 126, in run
self.run_command(cmd_name)
File "C:\Python34\Lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Python34\Lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Users\appadmin\AppData\Local\Temp\pip-install-rij08jgz\numpy\numpy\distutils\command\build_src.py", line 148, in run
self.build_sources()
File "C:\Users\appadmin\AppData\Local\Temp\pip-install-rij08jgz\numpy\numpy\distutils\command\build_src.py", line 159, in build_sources
self.build_library_sources(*libname_info)
File "C:\Users\appadmin\AppData\Local\Temp\pip-install-rij08jgz\numpy\numpy\distutils\command\build_src.py", line 292, in build_library_sources
sources = self.generate_sources(sources, (lib_name, build_info))
File "C:\Users\appadmin\AppData\Local\Temp\pip-install-rij08jgz\numpy\numpy\distutils\command\build_src.py", line 375, in generate_sources
source = func(extension, build_dir)
File "numpy\core\setup.py", line 667, in get_mathlib_info
raise RuntimeError("Broken toolchain: cannot link a simple C program")
RuntimeError: Broken toolchain: cannot link a simple C program
----------------------------------------
Command "d:\workspace\one_site_project\env_one_site\scripts\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\appadmin\\AppData\\Local\\Temp\\pip-install-rij08jgz\\numpy\\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\appadmin\AppData\Local\Temp\pip-record-hx4uurea\install-record.txt --single-version-externally-managed --prefix C:\
Users\appadmin\AppData\Local\Temp\pip-build-env-mn1ok9zs\normal --compile --install-headers d:\workspace\one_site_project\env_one_site\include\site\python3.4\numpy" failed with error code 1 in C:\Users\appadmin\AppData\Local\Temp\pip-i
nstall-rij08jgz\numpy\
You are using pip version 19.0.3, however version 19.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
----------------------------------------
Command "d:\workspace\one_site_project\env_one_site\scripts\python.exe d:\workspace\one_site_project\env_one_site\lib\site-packages\pip install --ignore-installed --no-user --prefix C:\Users\appadmin\AppData\Local\Temp\pip-build-env-mn
1ok9zs\normal --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- numpy>=1.9.0" failed with error code 1 in None
I found this question, but it is for OSX. I am using a Windows Server 2012 machine.
I had the similar error. My solution was to use python3.7 for venv instead of python3.8
upgrade the pip using this command: python -m pip install --upgrade pip
then install the library: pip install yourlibrary
I am building a GPU Version of lightgbm(Windows). I've followed all the Installation Guide in https://github.com/Microsoft/LightGBM/blob/master/docs/Installation-Guide.rst#build-gpu-version:
Windows On Windows GPU version of LightGBM can be built using OpenCL,
Boost, CMake and VS Build Tools or MinGW.
If you use MinGW, the build procedure is similar to the build on
Linux. Refer to GPU Windows Compilation to get more details.
Following procedure is for the MSVC (Microsoft Visual C++) build.
Install Git for Windows, CMake (3.8 or higher) and VS Build Tools (VS
Build Tools is not needed if Visual Studio (2015 or newer) is
installed).
Install OpenCL for Windows. The installation depends on the brand
(NVIDIA, AMD, Intel) of your GPU card.
For running on Intel, get Intel SDK for OpenCL. For running on AMD,
get AMD APP SDK. For running on NVIDIA, get CUDA Toolkit. Further
reading and correspondence table: GPU SDK Correspondence and Device
Targeting Table.
Install Boost Binary.
Note: Match your Visual C++ version:
Visual Studio 2015 -> msvc-14.0-64.exe,
Visual Studio 2017 -> msvc-14.1-64.exe.
Run the following commands:
Set BOOST_ROOT=C:\local\boost_1_64_0\
Set BOOST_LIBRARYDIR=C:\local\boost_1_64_0\lib64-msvc-14.0
git clone --recursive https://github.com/Microsoft/LightGBM
cd LightGBM
mkdir build
cd build
cmake -DCMAKE_GENERATOR_PLATFORM=x64 -DUSE_GPU=1 ..
cmake --build . --target ALL_BUILD --config Release
But in the last step when I input
cmake -DCMAKE_GENERATOR_PLATFORM=x64 -DUSE_GPU=1 ..
I got the error:
C:\Windows\System32\LightGBM\build>cmake -DCMAKE_GENERATOR_PLATFORM=x64 -DUSE_GPU=1 ..
-- Selecting Windows SDK version to target Windows 10.0.17134.
CMake Error at CMakeLists.txt:7 (PROJECT):
Failed to run MSBuild command:
C:/Program Files (x86)/MSBuild/14.0/bin/MSBuild.exe
to get the value of VCTargetsPath:
Microsoft (R) 生成引擎版本 14.0.25420.1
版权所有(C) Microsoft Corporation。保留所有权利。
MSBUILD : error MSB1009: 项目文件不存在。
开关:VCTargetsPath.vcxproj
Exit code: 1
-- Configuring incomplete, errors occurred!
See also "C:/Windows/System32/LightGBM/build/CMakeFiles/CMakeOutput.log".
CMakeOutput.log:
The system is: Windows - 10.0.17134 - AMD64