keeps failing installing aif360 package in Pycharm - numpy

I'm trying to install AIF360 package in Pycharm,
but whatever I try, either on command line or pycharm's own package managing system,
it keeps failing with this message:
Collecting aif360
Using cached aif360-0.4.0-py3-none-any.whl (175 kB)
Collecting scikit-learn>=0.22.1
Using cached scikit_learn-1.0.2-cp310-cp310-win_amd64.whl (7.2 MB)
Collecting pandas>=0.24.0
Using cached pandas-1.4.1-cp310-cp310-win_amd64.whl (10.6 MB)
Collecting scipy<1.6.0,>=1.2.0
Using cached scipy-1.5.4.tar.gz (25.2 MB)
Installing build dependencies: started
Installing build dependencies: still running...
Installing build dependencies: finished with status 'error'
error: subprocess-exited-with-error
pip subprocess to install build dependencies did not run successfully.
exit code: 1
[2450 lines of output]
Ignoring numpy: markers 'python_version == "3.6" and platform_system != "AIX"' don't match your environment
Ignoring numpy: markers 'python_version == "3.7" and platform_system != "AIX"' don't match your environment
Ignoring numpy: markers 'python_version == "3.6" and platform_system == "AIX"' don't match your environment
Ignoring numpy: markers 'python_version == "3.7" and platform_system == "AIX"' don't match your environment
Ignoring numpy: markers 'python_version >= "3.8" and platform_system == "AIX"' don't match your environment
Collecting wheel
Using cached wheel-0.37.1-py2.py3-none-any.whl (35 kB)
Collecting setuptools
Using cached setuptools-60.9.3-py3-none-any.whl (1.1 MB)
Collecting Cython>=0.29.18
Using cached Cython-0.29.28-py2.py3-none-any.whl (983 kB)
Collecting numpy==1.17.3
Using cached numpy-1.17.3.zip (6.4 MB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Collecting pybind11>=2.4.3
Using cached pybind11-2.9.1-py2.py3-none-any.whl (211 kB)
Building wheels for collected packages: numpy
Building wheel for numpy (setup.py): started
Building wheel for numpy (setup.py): finished with status 'error'
error: subprocess-exited-with-error
python setup.py bdist_wheel did not run successfully.
exit code: 1
[1938 lines of output]
Running from numpy source directory.
blas_opt_info:
blas_mkl_info:
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries mkl_rt not found in ['C:\\Users\\username\\PycharmProjects\\projectname\\venv\\lib', 'C:\\']
NOT AVAILABLE
blis_info:
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries blis not found in ['C:\\Users\\username\\PycharmProjects\\projectname\\venv\\lib', 'C:\\']
NOT AVAILABLE
...
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 PGroupFlangCompiler
Could not locate executable flang
don't know how to compile Fortran code on platform 'nt'
NOT AVAILABLE
atlas_3_10_blas_threads_info:
Setting PTATLAS=ATLAS
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries tatlas not found in ['C:\\Users...
NOT AVAILABLE
atlas_3_10_blas_info:
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
...
...
Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.752.0_x64__qbz5n2kfra8p0\Include -Ibuild\src.win-amd64-3.1\numpy\core\src\common -Ibuild\src.win-amd64-3.1\numpy\core\src\npymath -Ibuild\src.win-amd64-3.1\numpy\core\src\common -Ibuild\src.win-amd64-3.1\numpy\core\src\npymath -IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705\ATLMFC\include -IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705\include -IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um -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 /Tcbuild\src.win-amd64-3.1\numpy\core\src\multiarray\arraytypes.c /Fobuild\temp.win-amd64-3.10\Release\build\src.win-amd64-3.1\numpy\core\src\multiarray\arraytypes.obj
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DNPY_INTERNAL_BUILD=1 -DHAVE_NPY_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -Ibuild\src.win-amd64-3.1\numpy\core\src\umath -Ibuild\src.win-amd64-3.1\numpy\core\src\npymath -Ibuild\src.win-amd64-3.1\numpy\core\src\common -Inumpy\core\include -Ibuild\src.win-amd64-3.1\numpy\core\include/numpy -Inumpy\core\src\common -Inumpy\core\src -Inumpy\core -Inumpy\core\src\npymath -Inumpy\core\src\multiarray -Inumpy\core\src\umath -Inumpy\core\src\npysort -IC:\Users\username\PycharmProjects\projectname\venv\include -IC:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.752.0_x64__qbz5n2kfra8p0\include -IC:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.752.0_x64__qbz5n2kfra8p0\Include -Ibuild\src.win-amd64-3.1\numpy\core\src\common -Ibuild\src.win-amd64-3.1\numpy\core\src\npymath -Ibuild\src.win-amd64-3.1\numpy\core\src\common -Ibuild\src.win-amd64-3.1\numpy\core\src\npymath -IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705\ATLMFC\include -IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705\include -IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um -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 /Tcnumpy\core\src\multiarray\array_assign_scalar.c /Fobuild\temp.win-amd64-3.10\Release\numpy\core\src\multiarray\array_assign_scalar.obj
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DNPY_INTERNAL_BUILD=1 -DHAVE_NPY_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -Ibuild\src.win-amd64-3.1\numpy\core\src\umath -Ibuild\src.win-amd64-3.1\numpy\core\src\npymath -Ibuild\src.win-amd64-3.1\numpy\core\src\common -Inumpy\core\include -Ibuild\src.win-amd64-3.1\numpy\core\include/numpy -Inumpy\core\src\common -Inumpy\core\src -Inumpy\core -Inumpy\core\src\npymath -Inumpy\core\src\multiarray -Inumpy\core\src\umath -Inumpy\core\src\npysort -IC:\Users\username\PycharmProjects\projectname\venv\include -IC:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.752.0_x64__qbz5n2kfra8p0\include -IC:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.752.0_x64__qbz5n2kfra8p0\Include -Ibuild\src.win-amd64-3.1\numpy\core\src\common -Ibuild\src.win-amd64-3.1\numpy\core\src\npymath -Ibuild\src.win-amd64-3.1\numpy\core\src\common -Ibuild\src.win-amd64-3.1\numpy\core\src\npymath -IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705\ATLMFC\include -IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705\include -IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um -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 /Tcnumpy\core\src\multiarray\array_assign_array.c /Fobuild\temp.win-amd64-3.10\Release\numpy\core\src\multiarray\array_assign_array.obj
...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 /Tcbuild\src.win-amd64-3.1\numpy\core\src\multiarray\scalartypes.c /Fobuild\temp.win-amd64-3.10\Release\build\src.win-amd64-3.1\numpy\core\src\multiarray\scalartypes.obj" failed with exit status 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.
numpy
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
pip subprocess to install build dependencies did not run successfully.
exit code: 1
See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
I've tried uninstall-reinstalling numpy, tried both command line and Pycharm's own package manager, but none of them worked.
How can I resolve this?
Here are the things I've tried so far:
command-line installation outside of Pycharm works fine
** but not affecting the Pycharm project
Anaconda package installation works fine
** but also not affecting the Pycharm project
command-line installation inside of Pycharm fails with error
in-Pycharm package manager fails with the same error
Removing the NumPy package and reinstalling it did not change anything
Individually installing NumPy other than with aif360 did not change anything
I'm a Windows user - and installing Microsoft C++ Build Tools for Visual Studio 2019 did not change anything
Cannot uninstall aif360 package neither in pycharm command line or anaconda... takes forever, solving package specification and environment longer than 30 mins

For those who have faced the same issue,
I was able to resolve it by changing the python interpreter version to the matching one, which was surprisingly 3.1, which has to be at least 3.5 by requirement.
You can change the interpreter version either by creating a new project or in the settings in Pycharm.

Related

Installing tf-models-official on Windows 10

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".

Building bullet3 on Windows 10 - not all libraries installed

I have built bullet3-3.08 on Windows using cmake (commands have been executed from the build folder created in the bullet3-3.08 directory):
cmake -G "Visual Studio 16 2019" -A x64 -D "CMAKE_INSTALL_PREFIX:PATH=C:/Workspace/MyLibs/bullet3-3.08" ..
cmake --build . --config Release --parallel 8 --target install
I have noticed that the installation folder doesn't contain all built libraries, for example BulletCollision.lib is present the build/lib/Release folder but hasn't been installed in the C:/Workspace/MyLibs/bullet3-3.08/lib Moreover C:/Workspace/MyLibs/bullet3-3.08/include directory doesn't contain all headers, for example btBulletDynamicsCommon.h
How to fix that ? I don't want to copy headers/libs manually.
When building bullet3-3.08 on Windows with Visual Studio project files the libraries are not installed by default.
You need to add -DINSTALL_LIBS=ON to your command line to enable the installation, e.g.
cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_INSTALL_PREFIX:PATH=C:/Workspace/MyLibs/bullet3-3.08 -DINSTALL_LIBS=ON ..

Installing pandas : RuntimeError: Broken toolchain: cannot link a simple C program

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

CMake Error at CMakeLists.txt:7 (PROJECT): Failed to run MSBuild command:

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

cannot install rmagick with Windows 10 / Ruby 2.x / rails 3.x

I am trying to install Rmagick on a Win 10 machine for developing in the Ruby 2/rails 3 environment.
I've tried following various suggestions from different posts but have not had a success.
My current configuration is
Windows 10 64 bit laptop.
Installed ImageMagick-6.9.8-9-Q8-x86-dll.exe in C:\Program Files (x86)\ImageMagick-6.9.8-Q8
Environment variable CLASSPATH C:\Program Files (x86)\ImageMagick-6.9.8-Q8\lib C:\Program Files (x86)\ImageMagick-6.9.8-Q8\include
Env Variable CPATH C:\Program Files (x86)\ImageMagick-6.9.8-Q8
Env Variable LIBRARY_PATH C:\Program Files (x86)\ImageMagick-6.9.8-Q8\lib
NOTE - the above env variables are NOT in the system variables section they are in the user variables.
Command run in the rails project folder root: gem install rmagick -v '2.16.0' --platform=ruby -- --with-opt-lib=C:\Program Files (x86)\ImageMagick-6.9.8-Q8\lib --with-opt-include=C:\Program Files (x86)\ImageMagick-6.9.8-Q8\include
Response/error:
C:\Users\cmendella\Documents\Projects\intranet>gem install rmagick -v '2.16.0' --platform=ruby -- --with-opt-lib=C:\Program Files (x86)\ImageMagick-6.9.8-Q8\lib --with-opt-include=C:\Program Files (x86)\ImageMagick-6.9.8-Q8\include
Temporarily enhancing PATH to include DevKit...
Building native extensions with: '--with-opt-lib=C:\Program Files (x86)\ImageMagick-6.9.8-Q8\lib --with-opt-include=C:\Program Files (x86)\ImageMagick-6.9.8-Q8\include'
This could take a while...
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.
current directory: C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/rmagick-2.16.0/ext/RMagick
C:/RailsInstaller/Ruby2.3.0/bin/ruby.exe -r ./siteconf20170606-10484-1nvf2n8.rb extconf.rb --with-opt-lib=C:\Program Files (x86)\ImageMagick-6.9.8-Q8\lib --with-opt-include=C:\Program Files (x86)\ImageMagick-6.9.8-Q8\include
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include=${opt-dir}/include
--with-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=C:/RailsInstaller/Ruby2.3.0/bin/$(RUBY_BASE_NAME)
extconf.rb:141:in ``': No such file or directory - identify -version (Errno::ENOENT)
from extconf.rb:141:in `configure_compile_options'
from extconf.rb:16:in `initialize'
from extconf.rb:548:in `new'
from extconf.rb:548:in `<main>'
extconf failed, exit code 1
Gem files will remain installed in C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/rmagick-2.16.0 for inspection.
Results logged to C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/extensions/x86-mingw32/2.3.0/rmagick-2.16.0/gem_make.out