This question already has answers here:
Error "Microsoft Visual C++ 14.0 is required (Unable to find vcvarsall.bat)"
(36 answers)
Error while installing lxml through pip: Microsoft Visual C++ 14.0 is required
(8 answers)
Pip error even Microsoft Visual C++ 14.0 is installed
(4 answers)
How to solve "error: Microsoft Visual C++ 14.0 or greater is required" when installing Python packages?
(9 answers)
Closed 12 months ago.
I could not install twint on command prompt. I tried with pip install twint and the following error message came up:
Building wheels for collected packages: cchardet
Building wheel for cchardet (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [12 lines of output]
cythonize: ['src/cchardet\\_cchardet.pyx']
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.10
creating build\lib.win-amd64-3.10\cchardet
copying src\cchardet\version.py -> build\lib.win-amd64-3.10\cchardet
copying src\cchardet\__init__.py -> build\lib.win-amd64-3.10\cchardet
running build_ext
building 'cchardet._cchardet' 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/
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for cchardet
Running setup.py clean for cchardet
Failed to build cchardet
Installing collected packages: cchardet, beautifulsoup4, aiohttp-socks, aiodns, twint
Running setup.py install for cchardet ... error
error: subprocess-exited-with-error
× Running setup.py install for cchardet did not run successfully.
│ exit code: 1
╰─> [12 lines of output]
cythonize: ['src/cchardet\\_cchardet.pyx']
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.10
creating build\lib.win-amd64-3.10\cchardet
copying src\cchardet\version.py -> build\lib.win-amd64-3.10\cchardet
copying src\cchardet\__init__.py -> build\lib.win-amd64-3.10\cchardet
running build_ext
building 'cchardet._cchardet' 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/
[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.
╰─> cchardet
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
C:\Users\Yannik>
Related
I want to install pari-jupyter. I get the following error:
PARIKernel\kernel.c(679): fatal error C1083: Cannot open include file: 'pari/pari.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.34.31933\\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: Failed building wheel for pari-jupyter
Failed to build pari-jupyter
ERROR: Could not build wheels for pari-jupyter, which is required to install pyproject.toml-based projects
How can I find pari/pari.h, and tell the compiler its location?
I want to install repast4py in windows 10, and I enter 'pip install repast4py' in cmd, but It displays errors
'src/repast4py/coremodule.cpp(342): error C7556: cannot mix designated-initializers with non-designated-initializers' and
'error C7555: use of designated initializers requires at least '/std:c++20',
After that I update my visual studio build tools to 2022, but yet It displays the same error. please help me. thanks
C:\Users\H.Zibaei>pip install repast4py
Collecting repast4py
Using cached repast4py-1.0.5b1.tar.gz (79 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting torch
Using cached torch-1.13.1-cp39-cp39-win_amd64.whl (162.5 MB)
Collecting Cython
Using cached Cython-0.29.32-py2.py3-none-any.whl (986 kB)
Requirement already satisfied: mpi4py in c:\users\h.zibaei\appdata\local\programs\python\python39\lib\site-packages (from repast4py) (3.1.4)
Collecting numba
Using cached numba-0.56.4-cp39-cp39-win_amd64.whl (2.5 MB)
Collecting networkx>=2.6.2
Using cached networkx-2.8.8-py3-none-any.whl (2.0 MB)
Collecting pyyaml
Using cached PyYAML-6.0-cp39-cp39-win_amd64.whl (151 kB)
Collecting numpy>=1.18.0
Using cached numpy-1.24.1-cp39-cp39-win_amd64.whl (14.9 MB)
Collecting llvmlite<0.40,>=0.39.0dev0
Using cached llvmlite-0.39.1-cp39-cp39-win_amd64.whl (23.2 MB)
Collecting numpy>=1.18.0
Using cached numpy-1.23.5-cp39-cp39-win_amd64.whl (14.7 MB)
Requirement already satisfied: setuptools in c:\users\h.zibaei\appdata\local\programs\python\python39\lib\site-packages (from numba->repast4py) (58.1.0)
Collecting typing-extensions
Using cached typing_extensions-4.4.0-py3-none-any.whl (26 kB)
Building wheels for collected packages: repast4py
Building wheel for repast4py (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for repast4py (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [30 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-39
creating build\lib.win-amd64-cpython-39\repast4py
copying src\repast4py\context.py -> build\lib.win-amd64-cpython-39\repast4py
copying src\repast4py\core.py -> build\lib.win-amd64-cpython-39\repast4py
copying src\repast4py\geometry.py -> build\lib.win-amd64-cpython-39\repast4py
copying src\repast4py\logging.py -> build\lib.win-amd64-cpython-39\repast4py
copying src\repast4py\network.py -> build\lib.win-amd64-cpython-39\repast4py
copying src\repast4py\parameters.py -> build\lib.win-amd64-cpython-39\repast4py
copying src\repast4py\random.py -> build\lib.win-amd64-cpython-39\repast4py
copying src\repast4py\schedule.py -> build\lib.win-amd64-cpython-39\repast4py
copying src\repast4py\space.py -> build\lib.win-amd64-cpython-39\repast4py
copying src\repast4py\util.py -> build\lib.win-amd64-cpython-39\repast4py
copying src\repast4py\value_layer.py -> build\lib.win-amd64-cpython-39\repast4py
copying src\repast4py\__init__.py -> build\lib.win-amd64-cpython-39\repast4py
running build_ext
building 'repast4py._core' extension
creating build\temp.win-amd64-cpython-39
creating build\temp.win-amd64-cpython-39\Release
creating build\temp.win-amd64-cpython-39\Release\src
creating build\temp.win-amd64-cpython-39\Release\src\repast4py
"C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.31.31103\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Users\H.Zibaei\AppData\Local\Temp\pip-build-env-vr63vhus\overlay\Lib\site-packages\numpy\core\include -IC:\Users\H.Zibaei\AppData\Local\Temp\pip-build-env-vr63vhus\overlay\Lib\site-packages\mpi4py\include -IC:\Users\H.Zibaei\AppData\Local\Programs\Python\Python39\include -IC:\Users\H.Zibaei\AppData\Local\Programs\Python\Python39\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.31.31103\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.31.31103\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.20348.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.20348.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.20348.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.20348.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.20348.0\\cppwinrt" /EHsc /Tpsrc/repast4py/coremodule.cpp /Fobuild\temp.win-amd64-cpython-39\Release\src/repast4py/coremodule.obj -std=c++11
cl : Command line warning D9002 : ignoring unknown option '-std=c++11'
coremodule.cpp
src/repast4py/coremodule.cpp(342): error C7556: cannot mix designated-initializers with non-designated-initializers
src/repast4py/coremodule.cpp(343): error C7555: use of designated initializers requires at least '/std:c++20'
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.31.31103\\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: Failed building wheel for repast4py
Failed to build repast4py
ERROR: Could not build wheels for repast4py, which is required to install pyproject.toml-based projects
Update:
python 3.9.12
visual studio 2022
pip 22.3.1
wheel 0.38.4
install pyproject.toml
Hi it seems like I'm unable to install cymunk. I get a fatal error C1083: Cannot open include file: 'alloca.h' when trying to build wheel for cymunk.
C:\Users\Jessy\kivent\venv>pip install git+git://github.com/kivy/cymunk.git
Collecting git+git://github.com/kivy/cymunk.git
Cloning git://github.com/kivy/cymunk.git to c:\users\jessy\appdata\local\temp\pip-req-build-774s6m7_
Running command git clone --filter=blob:none --quiet git://github.com/kivy/cymunk.git 'C:\Users\Jessy\AppData\Local\Temp\pip-req-build-774s6m7_'
Resolved git://github.com/kivy/cymunk.git to commit 24845cc0834cd07b9495d06ef3873252237c6714
Preparing metadata (setup.py) ... done
Building wheels for collected packages: cymunk
Building wheel for cymunk (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [16 lines of output]
Using distutils
C:\Users\Jessy\AppData\Local\Programs\Python\Python310\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\Jessy\AppData\Local\Temp\pip-req-build-774s6m7_\cymunk\cymunk.pxd
tree = Parsing.p_module(s, pxd, full_module_name)
warning: cymunk\constraint.pxd:6:41: Declarations should not be declared inline.
warning: cymunk\space.pxd:23:4: 'cpTimestamp' redeclared
warning: cymunk\space.pxd:59:4: 'cpConstraintPreSolveFunc' redeclared
warning: cymunk\space.pxd:60:4: 'cpConstraintPostSolveFunc' redeclared
warning: cymunk\shape.pxi:204:86: local variable 'info' referenced before assignment
warning: cymunk\shape.pxi:205:54: local variable 'info' referenced before assignment
warning: cymunk\shape.pxi:205:62: local variable 'info' referenced before assignment
cl : Command line warning D9002 : ignoring unknown option '-std=gnu99'
cl : Command line warning D9002 : ignoring unknown option '-ffast-math'
cl : Command line warning D9002 : ignoring unknown option '-fPIC'
chipmunk.c
C:\Users\Jessy\AppData\Local\Temp\pip-req-build-774s6m7_\cymunk\Chipmunk-Physics\include\chipmunk\chipmunk.h(36): fatal error C1083: Cannot open include file: 'alloca.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.34.31933\\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: Failed building wheel for cymunk
Running setup.py clean for cymunk
Failed to build cymunk
Installing collected packages: cymunk
Running setup.py install for cymunk ... error
error: subprocess-exited-with-error
× Running setup.py install for cymunk did not run successfully.
│ exit code: 1
╰─> [9 lines of output]
Using distutils
C:\Users\Jessy\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(
cl : Command line warning D9002 : ignoring unknown option '-std=gnu99'
cl : Command line warning D9002 : ignoring unknown option '-ffast-math'
cl : Command line warning D9002 : ignoring unknown option '-fPIC'
chipmunk.c
C:\Users\Jessy\AppData\Local\Temp\pip-req-build-774s6m7_\cymunk\Chipmunk-Physics\include\chipmunk\chipmunk.h(36): fatal error C1083: Cannot open include file: 'alloca.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.34.31933\\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.
╰─> cymunk
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
I tried with 'pipwin' and 'python setup.py build --compiler=mingw32'
TypeError: CCompiler_spawn() got an unexpected keyword argument 'env'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
Encountered error while generating package metadata.
See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
[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 got the same error when using Python 3.10. Apache-Superset currently only supports Python 3.8 and 3.9: https://pypi.org/project/apache-superset/
I am just trying to install package 'spherical-geometry with pip but failed. My python version is 3.8 in Mac OS system. And the pip is installed by anaconda3. Below I show the primary reported error. I am wondering how to solve this.
(base) ➜ Applications pip install spherical-geometry
Collecting spherical-geometry
Using cached spherical_geometry-1.2.19.tar.gz (9.2 MB)
Installing build dependencies ... done
Building wheels for collected packages: spherical-geometry
Building wheel for spherical-geometry (PEP 517) ... error
ERROR: Command errored out with exit status 1:
In file included from libqd/src/dd_const.cpp:11:
In file included from libqd/include/qd/dd_real.h:32:
...
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:640:26: error: no template named 'numeric_limits'
bool _FloatBigger = (numeric_limits<_FloatT>::digits > numeric_limits<_IntT>::digits),
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:640:60: error: no template named 'numeric_limits'
bool _FloatBigger = (numeric_limits<_FloatT>::digits > numeric_limits<_IntT>::digits),
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:641:18: error: no template named 'numeric_limits'
int _Bits = (numeric_limits<_IntT>::digits - numeric_limits<_FloatT>::digits)>
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:641:50: error: no template named 'numeric_limits'
int _Bits = (numeric_limits<_IntT>::digits - numeric_limits<_FloatT>::digits)>
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:646:17: error: no template named 'numeric_limits'
static_assert(numeric_limits<_FloatT>::radix == 2, "FloatT has incorrect radix");
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
/private/var/folders/77/s1_49xgj7bv4gxjwsbfgbh8m0000gn/T/pip-build-env-rucjcqmx/overlay/lib/python3.8/site-packages/setuptools/dist.py:642: UserWarning: Usage of dash-separated 'upload-dir' will not be supported in future versions. Please use the underscore name 'upload_dir' instead
warnings.warn(
/private/var/folders/77/s1_49xgj7bv4gxjwsbfgbh8m0000gn/T/pip-build-env-rucjcqmx/overlay/lib/python3.8/site-packages/setuptools/dist.py:642: UserWarning: Usage of dash-separated 'show-response' will not be supported in future versions. Please use the underscore name 'show_response' instead
warnings.warn(
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for spherical-geometry
Failed to build spherical-geometry
ERROR: Could not build wheels for spherical-geometry which use PEP 517 and cannot be installed directly