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: Microsoft Visual C++ 14.0 is required
(13 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 3 months ago.
When I try to install ml-insights (referred to as ml_insights sometimes) using pip install ml-insights (https://pypi.org/project/ml-insights/), I get the following error (I use pyhton 3.8.5)
Collecting ml-insights
Using cached ml_insights-1.0.1-py2.py3-none-any.whl (36 kB)
Requirement already satisfied: matplotlib>=2.0.0 in c:\users\micha\documents\odsp\lib\site-packages (from ml-insights) (3.5.1)
Requirement already satisfied: scikit-learn>=0.24.2 in c:\users\micha\documents\odsp\lib\site-packages (from ml-insights) (1.0.2)
Requirement already satisfied: scipy>=1.6.0 in c:\users\micha\documents\odsp\lib\site-packages (from ml-insights) (1.8.0)
Requirement already satisfied: pandas>=0.23 in c:\users\micha\documents\odsp\lib\site-packages (from ml-insights) (1.4.2)
Requirement already satisfied: numpy>=1.16.0 in c:\users\micha\documents\odsp\lib\site-packages (from ml-insights) (1.22.3)
Collecting splinecalib>=0.0.2
Using cached splinecalib-0.0.3.tar.gz (56 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Requirement already satisfied: pyparsing>=2.2.1 in c:\users\micha\documents\odsp\lib\site-packages (from matplotlib>=2.0.0->ml-insights) (3.0.8)
Requirement already satisfied: packaging>=20.0 in c:\users\micha\documents\odsp\lib\site-packages (from matplotlib>=2.0.0->ml-insights) (21.3)
Requirement already satisfied: cycler>=0.10 in c:\users\micha\documents\odsp\lib\site-packages (from matplotlib>=2.0.0->ml-insights) (0.11.0)
Requirement already satisfied: pillow>=6.2.0 in c:\users\micha\documents\odsp\lib\site-packages (from matplotlib>=2.0.0->ml-insights) (9.1.0)
Requirement already satisfied: fonttools>=4.22.0 in c:\users\micha\documents\odsp\lib\site-packages (from matplotlib>=2.0.0->ml-insights) (4.33.2)
Requirement already satisfied: python-dateutil>=2.7 in c:\users\micha\documents\odsp\lib\site-packages (from matplotlib>=2.0.0->ml-insights) (2.8.2)
Requirement already satisfied: kiwisolver>=1.0.1 in c:\users\micha\documents\odsp\lib\site-packages (from matplotlib>=2.0.0->ml-insights) (1.4.2)
Requirement already satisfied: pytz>=2020.1 in c:\users\micha\documents\odsp\lib\site-packages (from pandas>=0.23->ml-insights) (2022.1)
Requirement already satisfied: threadpoolctl>=2.0.0 in c:\users\micha\documents\odsp\lib\site-packages (from scikit-learn>=0.24.2->ml-insights) (3.1.0)
Requirement already satisfied: joblib>=0.11 in c:\users\micha\documents\odsp\lib\site-packages (from scikit-learn>=0.24.2->ml-insights) (1.1.0)
Requirement already satisfied: six>=1.5 in c:\users\micha\documents\odsp\lib\site-packages (from python-dateutil>=2.7->matplotlib>=2.0.0->ml-insights) (1.16.0)
Building wheels for collected packages: splinecalib
Building wheel for splinecalib (setup.py): started
Building wheel for splinecalib (setup.py): finished with status 'error'
Running setup.py clean for splinecalib
Failed to build splinecalib
Installing collected packages: splinecalib, ml-insights
Running setup.py install for splinecalib: started
Running setup.py install for splinecalib: finished with status 'error'
error: subprocess-exited-with-error
python setup.py bdist_wheel did not run successfully.
exit code: 1
[14 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-38
creating build\lib.win-amd64-cpython-38\splinecalib
copying splinecalib\calib_utils.py -> build\lib.win-amd64-cpython-38\splinecalib
copying splinecalib\splinecalib.py -> build\lib.win-amd64-cpython-38\splinecalib
copying splinecalib\__init__.py -> build\lib.win-amd64-cpython-38\splinecalib
warning: build_py: byte-compiling is disabled, skipping.
running build_ext
building 'loss_fun_c' 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 splinecalib
error: subprocess-exited-with-error
Running setup.py install for splinecalib did not run successfully.
exit code: 1
[16 lines of output]
running install
C:\Users\micha\Documents\Odsp\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(
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-38
creating build\lib.win-amd64-cpython-38\splinecalib
copying splinecalib\calib_utils.py -> build\lib.win-amd64-cpython-38\splinecalib
copying splinecalib\splinecalib.py -> build\lib.win-amd64-cpython-38\splinecalib
copying splinecalib\__init__.py -> build\lib.win-amd64-cpython-38\splinecalib
warning: build_py: byte-compiling is disabled, skipping.
running build_ext
building 'loss_fun_c' 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.
splinecalib
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
Related
I am using Ubuntu 18.04.
Whenever I try to import pandas in Jupyter Notebook, I get this error.
I have tried several ways to resolve this issue available on internet.
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-2-7dd3504c366f> in <module>
----> 1 import pandas as pd
ModuleNotFoundError: No module named 'pandas'
I also got error while installing pandas in Jupyter notebook:
Building wheels for collected packages: pandas
Building wheel for pandas (PEP 517) ... error
ERROR: Complete output from command /snap/jupyter/6/bin/python /snap/jupyter/6/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py build_wheel /tmp/tmpecqq53bt:
ERROR: running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-cpython-37
creating build/lib.linux-x86_64-cpython-37/pandas
copying pandas/_version.py -> build/lib.linux-x86_64-cpython-37/pandas
check.warn(importable)
error: command 'gcc' failed: No such file or directory: 'gcc'
----------------------------------------
ERROR: Failed building wheel for pandas
Running setup.py clean for pandas
Failed to build pandas
ERROR: Could not build wheels for pandas which use PEP 517 and cannot be installed directly
I try to install pandas using ubuntu terminal but got these warnings.
pip3 install pandas
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: pandas in ./.local/lib/python3.6/site-packages (1.1.5)
Requirement already satisfied: pytz>=2017.2 in ./.local/lib/python3.6/site-packages (from pandas) (2022.4)
Requirement already satisfied: numpy>=1.15.4 in ./.local/lib/python3.6/site-packages (from pandas) (1.19.3)
Requirement already satisfied: python-dateutil>=2.7.3 in ./.local/lib/python3.6/site-packages (from pandas) (2.8.2)
Requirement already satisfied: six>=1.5 in ./.local/lib/python3.6/site-packages (from python-dateutil>=2.7.3->pandas) (1.16.0)
I am using Windows 11 x64, Python 3.11.0 run
pip install transformers
error
Microsoft Windows [Version 10.0.22621.674]
(c) Microsoft Corporation. All rights reserved.
C:\Users\donhu>python
Python 3.11.0 (main, Oct 24 2022, 18:26:48) [MSC v.1933 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()
C:\Users\donhu>conda install -c huggingface transformers
'conda' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\donhu>pip install transformers
Collecting transformers
Downloading transformers-4.24.0-py3-none-any.whl (5.5 MB)
---------------------------------------- 5.5/5.5 MB 12.5 MB/s eta 0:00:00
Collecting filelock
Using cached filelock-3.8.0-py3-none-any.whl (10 kB)
Collecting huggingface-hub<1.0,>=0.10.0
Using cached huggingface_hub-0.10.1-py3-none-any.whl (163 kB)
Requirement already satisfied: numpy>=1.17 in c:\users\donhu\appdata\local\programs\python\python311\lib\site-packages (from transformers) (1.23.4)
Requirement already satisfied: packaging>=20.0 in c:\users\donhu\appdata\local\programs\python\python311\lib\site-packages (from transformers) (21.3)
Collecting pyyaml>=5.1
Using cached PyYAML-6.0-cp311-cp311-win_amd64.whl (143 kB)
Collecting regex!=2019.12.17
Using cached regex-2022.10.31-cp311-cp311-win_amd64.whl (267 kB)
Requirement already satisfied: requests in c:\users\donhu\appdata\local\programs\python\python311\lib\site-packages (from transformers) (2.28.1)
Collecting tokenizers!=0.11.3,<0.14,>=0.11.1
Downloading tokenizers-0.13.1.tar.gz (358 kB)
---------------------------------------- 358.7/358.7 kB 21.8 MB/s eta 0:00:00
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting tqdm>=4.27
Using cached tqdm-4.64.1-py2.py3-none-any.whl (78 kB)
Collecting typing-extensions>=3.7.4.3
Using cached typing_extensions-4.4.0-py3-none-any.whl (26 kB)
Requirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in c:\users\donhu\appdata\local\programs\python\python311\lib\site-packages (from packaging>=20.0->transformers) (3.0.9)
Requirement already satisfied: colorama in c:\users\donhu\appdata\local\programs\python\python311\lib\site-packages (from tqdm>=4.27->transformers) (0.4.6)
Requirement already satisfied: charset-normalizer<3,>=2 in c:\users\donhu\appdata\local\programs\python\python311\lib\site-packages (from requests->transformers) (2.1.1)
Requirement already satisfied: idna<4,>=2.5 in c:\users\donhu\appdata\local\programs\python\python311\lib\site-packages (from requests->transformers) (3.4)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in c:\users\donhu\appdata\local\programs\python\python311\lib\site-packages (from requests->transformers) (1.26.12)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\donhu\appdata\local\programs\python\python311\lib\site-packages (from requests->transformers) (2022.9.24)
Building wheels for collected packages: tokenizers
Building wheel for tokenizers (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for tokenizers (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [51 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-311
creating build\lib.win-amd64-cpython-311\tokenizers
copying py_src\tokenizers\__init__.py -> build\lib.win-amd64-cpython-311\tokenizers
creating build\lib.win-amd64-cpython-311\tokenizers\models
copying py_src\tokenizers\models\__init__.py -> build\lib.win-amd64-cpython-311\tokenizers\models
creating build\lib.win-amd64-cpython-311\tokenizers\decoders
copying py_src\tokenizers\decoders\__init__.py -> build\lib.win-amd64-cpython-311\tokenizers\decoders
creating build\lib.win-amd64-cpython-311\tokenizers\normalizers
copying py_src\tokenizers\normalizers\__init__.py -> build\lib.win-amd64-cpython-311\tokenizers\normalizers
creating build\lib.win-amd64-cpython-311\tokenizers\pre_tokenizers
copying py_src\tokenizers\pre_tokenizers\__init__.py -> build\lib.win-amd64-cpython-311\tokenizers\pre_tokenizers
creating build\lib.win-amd64-cpython-311\tokenizers\processors
copying py_src\tokenizers\processors\__init__.py -> build\lib.win-amd64-cpython-311\tokenizers\processors
creating build\lib.win-amd64-cpython-311\tokenizers\trainers
copying py_src\tokenizers\trainers\__init__.py -> build\lib.win-amd64-cpython-311\tokenizers\trainers
creating build\lib.win-amd64-cpython-311\tokenizers\implementations
copying py_src\tokenizers\implementations\base_tokenizer.py -> build\lib.win-amd64-cpython-311\tokenizers\implementations
copying py_src\tokenizers\implementations\bert_wordpiece.py -> build\lib.win-amd64-cpython-311\tokenizers\implementations
copying py_src\tokenizers\implementations\byte_level_bpe.py -> build\lib.win-amd64-cpython-311\tokenizers\implementations
copying py_src\tokenizers\implementations\char_level_bpe.py -> build\lib.win-amd64-cpython-311\tokenizers\implementations
copying py_src\tokenizers\implementations\sentencepiece_bpe.py -> build\lib.win-amd64-cpython-311\tokenizers\implementations
copying py_src\tokenizers\implementations\sentencepiece_unigram.py -> build\lib.win-amd64-cpython-311\tokenizers\implementations
copying py_src\tokenizers\implementations\__init__.py -> build\lib.win-amd64-cpython-311\tokenizers\implementations
creating build\lib.win-amd64-cpython-311\tokenizers\tools
copying py_src\tokenizers\tools\visualizer.py -> build\lib.win-amd64-cpython-311\tokenizers\tools
copying py_src\tokenizers\tools\__init__.py -> build\lib.win-amd64-cpython-311\tokenizers\tools
copying py_src\tokenizers\__init__.pyi -> build\lib.win-amd64-cpython-311\tokenizers
copying py_src\tokenizers\models\__init__.pyi -> build\lib.win-amd64-cpython-311\tokenizers\models
copying py_src\tokenizers\decoders\__init__.pyi -> build\lib.win-amd64-cpython-311\tokenizers\decoders
copying py_src\tokenizers\normalizers\__init__.pyi -> build\lib.win-amd64-cpython-311\tokenizers\normalizers
copying py_src\tokenizers\pre_tokenizers\__init__.pyi -> build\lib.win-amd64-cpython-311\tokenizers\pre_tokenizers
copying py_src\tokenizers\processors\__init__.pyi -> build\lib.win-amd64-cpython-311\tokenizers\processors
copying py_src\tokenizers\trainers\__init__.pyi -> build\lib.win-amd64-cpython-311\tokenizers\trainers
copying py_src\tokenizers\tools\visualizer-styles.css -> build\lib.win-amd64-cpython-311\tokenizers\tools
running build_ext
running build_rust
error: can't find Rust compiler
If you are using an outdated pip version, it is possible a prebuilt wheel is available for this package but pip is not able to install from it. Installing from the wheel would avoid the need for a Rust compiler.
To update pip, run:
pip install --upgrade pip
and then retry package installation.
If you did intend to build this package from source, try installing a Rust compiler from your system package manager and ensure it is on the PATH during installation. Alternatively, rustup (available at https://rustup.rs) is the recommended way to download and update the Rust compiler toolchain.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for tokenizers
Failed to build tokenizers
ERROR: Could not build wheels for tokenizers, which is required to install pyproject.toml-based projects
C:\Users\donhu>
How to fix it?
I am new to python and i have have been trying to install web3 for some days even after installing microsoft build tools and checkmarking all the neccessities like windows 10sdk and all c++ build tools.But i'm still getting this error.I have googled this problem but still no solution,leaving me stuck at this step and its really frustrating , i even restarted my system after installing the microsoft build tools and yet i am still getting the error below.
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools>py -m pip install web3
Collecting web3
Using cached web3-5.28.0-py3-none-any.whl (499 kB)
Collecting aiohttp<4,>=3.7.4.post0
Using cached aiohttp-3.8.1-cp310-cp310-win_amd64.whl (555 kB)
Collecting eth-abi<3.0.0,>=2.0.0b6
Using cached eth_abi-2.1.1-py3-none-any.whl (27 kB)
Collecting hexbytes<1.0.0,>=0.1.0
Using cached hexbytes-0.2.2-py3-none-any.whl (6.1 kB)
Collecting ipfshttpclient==0.8.0a2
Using cached ipfshttpclient-0.8.0a2-py3-none-any.whl (82 kB)
Requirement already satisfied: pywin32>=223 in c:\users\kadit cuy\appdata\local\programs\python\python310\lib\site-packages (from web3) (303)
Collecting protobuf<4,>=3.10.0
Using cached protobuf-3.19.4-cp310-cp310-win_amd64.whl (895 kB)
Collecting eth-account<0.6.0,>=0.5.7
Using cached eth_account-0.5.7-py3-none-any.whl (101 kB)
Requirement already satisfied: eth-typing<3.0.0,>=2.0.0 in c:\users\kadit cuy\appdata\local\programs\python\python310\lib\site-packages (from web3) (2.3.0)
Requirement already satisfied: eth-hash[pycryptodome]<1.0.0,>=0.2.0 in c:\users\kadit cuy\appdata\local\programs\python\python310\lib\site-packages (from web3) (0.3.2)
Collecting lru-dict<2.0.0,>=1.1.6
Using cached lru-dict-1.1.7.tar.gz (10 kB)
Preparing metadata (setup.py) ... done
Collecting eth-utils<2.0.0,>=1.9.5
Using cached eth_utils-1.10.0-py3-none-any.whl (24 kB)
Collecting websockets<10,>=9.1
Using cached websockets-9.1.tar.gz (76 kB)
Preparing metadata (setup.py) ... done
Collecting jsonschema<4.0.0,>=3.2.0
Using cached jsonschema-3.2.0-py2.py3-none-any.whl (56 kB)
Requirement already satisfied: requests<3.0.0,>=2.16.0 in c:\users\kadit cuy\appdata\local\programs\python\python310\lib\site-packages (from web3) (2.27.1)
Collecting multiaddr>=0.0.7
Using cached multiaddr-0.0.9-py2.py3-none-any.whl (16 kB)
Collecting attrs>=17.3.0
Using cached attrs-21.4.0-py2.py3-none-any.whl (60 kB)
Requirement already satisfied: charset-normalizer<3.0,>=2.0 in c:\users\kadit cuy\appdata\local\programs\python\python310\lib\site-packages (from aiohttp<4,>=3.7.4.post0->web3) (2.0.12)
Collecting aiosignal>=1.1.2
Using cached aiosignal-1.2.0-py3-none-any.whl (8.2 kB)
Collecting yarl<2.0,>=1.0
Using cached yarl-1.7.2-cp310-cp310-win_amd64.whl (122 kB)
Collecting frozenlist>=1.1.1
Using cached frozenlist-1.3.0-cp310-cp310-win_amd64.whl (33 kB)
Collecting multidict<7.0,>=4.5
Using cached multidict-6.0.2-cp310-cp310-win_amd64.whl (27 kB)
Collecting async-timeout<5.0,>=4.0.0a3
Using cached async_timeout-4.0.2-py3-none-any.whl (5.8 kB)
Collecting parsimonious<0.9.0,>=0.8.0
Using cached parsimonious-0.8.1.tar.gz (45 kB)
Preparing metadata (setup.py) ... done
Collecting rlp<3,>=1.0.0
Using cached rlp-2.0.1-py2.py3-none-any.whl (20 kB)
Collecting bitarray<1.3.0,>=1.2.1
Using cached bitarray-1.2.2.tar.gz (48 kB)
Preparing metadata (setup.py) ... done
Collecting eth-keys<0.4.0,>=0.3.4
Using cached eth_keys-0.3.4-py3-none-any.whl (21 kB)
Collecting eth-rlp<2,>=0.1.2
Using cached eth_rlp-0.3.0-py3-none-any.whl (5.0 kB)
Collecting eth-keyfile<0.6.0,>=0.5.0
Using cached eth_keyfile-0.5.1-py3-none-any.whl (8.3 kB)
Collecting pycryptodome<4,>=3.6.6
Using cached pycryptodome-3.14.1-cp35-abi3-win_amd64.whl (1.8 MB)
Collecting cytoolz<1.0.0,>=0.10.1
Using cached cytoolz-0.11.2.tar.gz (481 kB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: setuptools in c:\users\kadit cuy\appdata\local\programs\python\python310\lib\site-packages (from jsonschema<4.0.0,>=3.2.0->web3) (61.2.0)
Collecting six>=1.11.0
Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting pyrsistent>=0.14.0
Using cached pyrsistent-0.18.1-cp310-cp310-win_amd64.whl (61 kB)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in c:\users\kadit cuy\appdata\local\programs\python\python310\lib\site-packages (from requests<3.0.0,>=2.16.0->web3) (1.26.9)
Requirement already satisfied: idna<4,>=2.5 in c:\users\kadit cuy\appdata\local\programs\python\python310\lib\site-packages (from requests<3.0.0,>=2.16.0->web3) (3.3)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\kadit cuy\appdata\local\programs\python\python310\lib\site-packages (from requests<3.0.0,>=2.16.0->web3) (2021.10.8)
Requirement already satisfied: toolz>=0.8.0 in c:\users\kadit cuy\appdata\local\programs\python\python310\lib\site-packages (from cytoolz<1.0.0,>=0.10.1->eth-utils<2.0.0,>=1.9.5->web3) (0.11.2)
Collecting eth-rlp<2,>=0.1.2
Using cached eth_rlp-0.2.1-py3-none-any.whl (5.0 kB)
Collecting base58
Using cached base58-2.1.1-py3-none-any.whl (5.6 kB)
Requirement already satisfied: varint in c:\users\kadit cuy\appdata\local\programs\python\python310\lib\site-packages (from multiaddr>=0.0.7->ipfshttpclient==0.8.0a2->web3) (1.0.2)
Requirement already satisfied: netaddr in c:\users\kadit cuy\appdata\local\programs\python\python310\lib\site-packages (from multiaddr>=0.0.7->ipfshttpclient==0.8.0a2->web3) (0.8.0)
Using legacy 'setup.py install' for lru-dict, since package 'wheel' is not installed.
Using legacy 'setup.py install' for websockets, since package 'wheel' is not installed.
Using legacy 'setup.py install' for bitarray, since package 'wheel' is not installed.
Using legacy 'setup.py install' for cytoolz, since package 'wheel' is not installed.
Using legacy 'setup.py install' for parsimonious, since package 'wheel' is not installed.
Installing collected packages: lru-dict, bitarray, websockets, six, pyrsistent, pycryptodome, protobuf, multidict, hexbytes, frozenlist, cytoolz, base58, attrs, async-timeout, yarl, parsimonious, multiaddr, jsonschema, eth-utils, aiosignal, rlp, ipfshttpclient, eth-keys, eth-abi, aiohttp, eth-rlp, eth-keyfile, eth-account, web3
Running setup.py install for lru-dict ... error
error: subprocess-exited-with-error
× Running setup.py install for lru-dict did not run successfully.
│ exit code: 1
╰─> [7 lines of output]
running install
C:\Users\KADIT CUY\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(
running build
running build_ext
building 'lru' 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.
╰─> lru-dict
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
Please someone should help!!
You can try to install the wheel first: pip install wheel. Then you can avoid using setup.py install.
And you can update the Microsoft Visual C++ to 14 or greater like the error message suggestted.
Sidenote: The error originates from installing lru-dict, not web3 directly.
You seem to have visual studio 2022 installed. You should check that you have installed all optional features needed for compiling for python (from here):
Install the Python development workload and the optional Python native development tools option.
Install the latest Windows SDK (under Native development in the installer).
Optional: Set $env:PlatformToolset to your toolset version before building, if it doesn't detect it. (Alternatively, you could open the developer command prompt)
Update to the latest setuptools Python package version
Especially the last is needed to have support for the latest compilers. Run pip install --upgrade setuptools. Then try to install again
I am running Python 2.7 and trying to install Apache-Beam.
I run this command: python -m pip install apache-beam. Output below.
The installation must be failing as I get this error when I try to run code that references the library: "No module named apache_beam"
Any help is much appreciated.
Here is the output from the installation:
(base) C:\Users\ned06>python -m pip install apache-beam
Collecting apache-beam
Collecting pyvcf<0.7.0,>=0.6.8 (from apache-beam)
Using cached https://files.pythonhosted.org/packages/20/b6/36bfb1760f6983788d9
16096193fc14c83cce512c7787c93380e09458c09/PyVCF-0.6.8.tar.gz
Requirement already satisfied: six<1.12,>=1.9 in c:\users\ned06\appdata\local\co
ntinuum\anaconda2\lib\site-packages (from apache-beam) (1.11.0)
Requirement already satisfied: pyyaml<4.0.0,>=3.12 in c:\users\ned06\appdata\loc
al\continuum\anaconda2\lib\site-packages (from apache-beam) (3.12)
Requirement already satisfied: typing<3.7.0,>=3.6.0 in c:\users\ned06\appdata\lo
cal\continuum\anaconda2\lib\site-packages (from apache-beam) (3.6.4)
Requirement already satisfied: pydot<1.3,>=1.2.0 in c:\users\ned06\appdata\local
\continuum\anaconda2\lib\site-packages (from apache-beam) (1.2.4)
Requirement already satisfied: oauth2client<5,>=2.0.1 in c:\users\ned06\appdata\
local\continuum\anaconda2\lib\site-packages (from apache-beam) (4.1.2)
Requirement already satisfied: dill<=0.2.8.2,>=0.2.6 in c:\users\ned06\appdata\l
ocal\continuum\anaconda2\lib\site-packages (from apache-beam) (0.2.6)
Requirement already satisfied: pytz<=2018.4,>=2018.3 in c:\users\ned06\appdata\l
ocal\continuum\anaconda2\lib\site-packages (from apache-beam) (2018.4)
Requirement already satisfied: hdfs<3.0.0,>=2.1.0 in c:\users\ned06\appdata\loca
l\continuum\anaconda2\lib\site-packages (from apache-beam) (2.1.0)
Requirement already satisfied: protobuf<4,>=3.5.0.post1 in c:\users\ned06\appdat
a\local\continuum\anaconda2\lib\site-packages (from apache-beam) (3.6.0)
Requirement already satisfied: grpcio<2,>=1.8 in c:\users\ned06\appdata\local\co
ntinuum\anaconda2\lib\site-packages (from apache-beam) (1.14.2)
Requirement already satisfied: futures<4.0.0,>=3.1.1 in c:\users\ned06\appdata\l
ocal\continuum\anaconda2\lib\site-packages (from apache-beam) (3.2.0)
Requirement already satisfied: mock<3.0.0,>=1.0.1 in c:\users\ned06\appdata\loca
l\continuum\anaconda2\lib\site-packages (from apache-beam) (2.0.0)
Requirement already satisfied: httplib2<=0.11.3,>=0.8 in c:\users\ned06\appdata\
local\continuum\anaconda2\lib\site-packages (from apache-beam) (0.9.2)
Requirement already satisfied: crcmod<2.0,>=1.7 in c:\users\ned06\appdata\local\
continuum\anaconda2\lib\site-packages (from apache-beam) (1.7)
Requirement already satisfied: avro<2.0.0,>=1.8.1 in c:\users\ned06\appdata\loca
l\continuum\anaconda2\lib\site-packages (from apache-beam) (1.8.2)
Requirement already satisfied: future<1.0.0,>=0.16.0 in c:\users\ned06\appdata\l
ocal\continuum\anaconda2\lib\site-packages (from apache-beam) (0.16.0)
Requirement already satisfied: setuptools in c:\users\ned06\appdata\local\contin
uum\anaconda2\lib\site-packages (from pyvcf<0.7.0,>=0.6.8->apache-beam) (40.2.0)
Requirement already satisfied: pyparsing>=2.1.4 in c:\users\ned06\appdata\local\
continuum\anaconda2\lib\site-packages (from pydot<1.3,>=1.2.0->apache-beam) (2.2
.0)
Requirement already satisfied: pyasn1-modules>=0.0.5 in c:\users\ned06\appdata\l
ocal\continuum\anaconda2\lib\site-packages (from oauth2client<5,>=2.0.1->apache-
beam) (0.2.2)
Requirement already satisfied: pyasn1>=0.1.7 in c:\users\ned06\appdata\local\con
tinuum\anaconda2\lib\site-packages (from oauth2client<5,>=2.0.1->apache-beam) (0
.4.3)
Requirement already satisfied: rsa>=3.1.4 in c:\users\ned06\appdata\local\contin
uum\anaconda2\lib\site-packages (from oauth2client<5,>=2.0.1->apache-beam) (3.4.
2)
Requirement already satisfied: pyreadline>=1.7.1 in c:\users\ned06\appdata\local
\continuum\anaconda2\lib\site-packages (from dill<=0.2.8.2,>=0.2.6->apache-beam)
(2.1)
Requirement already satisfied: docopt in c:\users\ned06\appdata\local\continuum\
anaconda2\lib\site-packages (from hdfs<3.0.0,>=2.1.0->apache-beam) (0.6.2)
Requirement already satisfied: requests>=2.7.0 in c:\users\ned06\appdata\local\c
ontinuum\anaconda2\lib\site-packages (from hdfs<3.0.0,>=2.1.0->apache-beam) (2.1
8.4)
Requirement already satisfied: enum34>=1.0.4 in c:\users\ned06\appdata\local\con
tinuum\anaconda2\lib\site-packages (from grpcio<2,>=1.8->apache-beam) (1.1.6)
Requirement already satisfied: funcsigs>=1; python_version < "3.3" in c:\users\n
ed06\appdata\local\continuum\anaconda2\lib\site-packages (from mock<3.0.0,>=1.0.
1->apache-beam) (1.0.2)
Requirement already satisfied: pbr>=0.11 in c:\users\ned06\appdata\local\continu
um\anaconda2\lib\site-packages (from mock<3.0.0,>=1.0.1->apache-beam) (4.2.0)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in c:\users\ned06\appdata\l
ocal\continuum\anaconda2\lib\site-packages (from requests>=2.7.0->hdfs<3.0.0,>=2
.1.0->apache-beam) (3.0.4)
Requirement already satisfied: idna<2.7,>=2.5 in c:\users\ned06\appdata\local\co
ntinuum\anaconda2\lib\site-packages (from requests>=2.7.0->hdfs<3.0.0,>=2.1.0->a
pache-beam) (2.6)
Requirement already satisfied: urllib3<1.23,>=1.21.1 in c:\users\ned06\appdata\l
ocal\continuum\anaconda2\lib\site-packages (from requests>=2.7.0->hdfs<3.0.0,>=2
.1.0->apache-beam) (1.22)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\ned06\appdata\loca
l\continuum\anaconda2\lib\site-packages (from requests>=2.7.0->hdfs<3.0.0,>=2.1.
0->apache-beam) (2018.4.16)
Building wheels for collected packages: pyvcf
Running setup.py bdist_wheel for pyvcf ... error
Complete output from command C:\Users\ned06\AppData\Local\Continuum\anaconda2\
python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\ned06\\appdat
a\\local\\temp\\pip-install-qtjnbs\\pyvcf\\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\ned06\appdata\local\temp\pip-wheel
-jrn5sw --python-tag cp27:
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win32-2.7
creating build\lib.win32-2.7\vcf
copying vcf\filters.py -> build\lib.win32-2.7\vcf
copying vcf\model.py -> build\lib.win32-2.7\vcf
copying vcf\parser.py -> build\lib.win32-2.7\vcf
copying vcf\sample_filter.py -> build\lib.win32-2.7\vcf
copying vcf\utils.py -> build\lib.win32-2.7\vcf
copying vcf\__init__.py -> build\lib.win32-2.7\vcf
creating build\lib.win32-2.7\vcf\test
copying vcf\test\prof.py -> build\lib.win32-2.7\vcf\test
copying vcf\test\test_vcf.py -> build\lib.win32-2.7\vcf\test
copying vcf\test\__init__.py -> build\lib.win32-2.7\vcf\test
running egg_info
writing requirements to PyVCF.egg-info\requires.txt
writing PyVCF.egg-info\PKG-INFO
writing top-level names to PyVCF.egg-info\top_level.txt
writing dependency_links to PyVCF.egg-info\dependency_links.txt
writing entry points to PyVCF.egg-info\entry_points.txt
reading manifest file 'PyVCF.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'PyVCF.egg-info\SOURCES.txt'
copying vcf\cparse.pyx -> build\lib.win32-2.7\vcf
running build_ext
cythoning vcf/cparse.pyx to vcf\cparse.c
warning: vcf\cparse.pyx:16:14: Non-trivial type declarators in shared declarat
ion (e.g. mix of pointers and values). Each pointer declaration should be on its
own line.
warning: vcf\cparse.pyx:16:21: Non-trivial type declarators in shared declarat
ion (e.g. mix of pointers and values). Each pointer declaration should be on its
own line.
warning: vcf\cparse.pyx:16:27: Non-trivial type declarators in shared declarat
ion (e.g. mix of pointers and values). Each pointer declaration should be on its
own line.
warning: vcf\cparse.pyx:16:40: Non-trivial type declarators in shared declarat
ion (e.g. mix of pointers and values). Each pointer declaration should be on its
own line.
building 'vcf.cparse' extension
error: Microsoft Visual C++ 9.0 is required. Get it from http://aka.ms/vcpytho
n27
----------------------------------------
Failed building wheel for pyvcf
Running setup.py clean for pyvcf
Failed to build pyvcf
Installing collected packages: pyvcf, apache-beam
Running setup.py install for pyvcf ... error
Complete output from command C:\Users\ned06\AppData\Local\Continuum\anaconda
2\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\ned06\\appd
ata\\local\\temp\\pip-install-qtjnbs\\pyvcf\\setup.py';f=getattr(tokenize, 'open
', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(co
de, __file__, 'exec'))" install --record c:\users\ned06\appdata\local\temp\pip-r
ecord-3ugbtb\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build\lib.win32-2.7
creating build\lib.win32-2.7\vcf
copying vcf\filters.py -> build\lib.win32-2.7\vcf
copying vcf\model.py -> build\lib.win32-2.7\vcf
copying vcf\parser.py -> build\lib.win32-2.7\vcf
copying vcf\sample_filter.py -> build\lib.win32-2.7\vcf
copying vcf\utils.py -> build\lib.win32-2.7\vcf
copying vcf\__init__.py -> build\lib.win32-2.7\vcf
creating build\lib.win32-2.7\vcf\test
copying vcf\test\prof.py -> build\lib.win32-2.7\vcf\test
copying vcf\test\test_vcf.py -> build\lib.win32-2.7\vcf\test
copying vcf\test\__init__.py -> build\lib.win32-2.7\vcf\test
running egg_info
writing requirements to PyVCF.egg-info\requires.txt
writing PyVCF.egg-info\PKG-INFO
writing top-level names to PyVCF.egg-info\top_level.txt
writing dependency_links to PyVCF.egg-info\dependency_links.txt
writing entry points to PyVCF.egg-info\entry_points.txt
reading manifest file 'PyVCF.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'PyVCF.egg-info\SOURCES.txt'
copying vcf\cparse.pyx -> build\lib.win32-2.7\vcf
running build_ext
skipping 'vcf\cparse.c' Cython extension (up-to-date)
building 'vcf.cparse' extension
error: Microsoft Visual C++ 9.0 is required. Get it from http://aka.ms/vcpyt
hon27
----------------------------------------
Command "C:\Users\ned06\AppData\Local\Continuum\anaconda2\python.exe -u -c "impo
rt setuptools, tokenize;__file__='c:\\users\\ned06\\appdata\\local\\temp\\pip-in
stall-qtjnbs\\pyvcf\\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\ned06\appdata\local\temp\pip-record-3ugbtb\install-rec
ord.txt --single-version-externally-managed --compile" failed with error code 1
in c:\users\ned06\appdata\local\temp\pip-install-qtjnbs\pyvcf\
Towards the end of your error log:
error: Microsoft Visual C++ 9.0 is required. Get it from http://aka.ms/vcpython27
This suggests that your problem stems from an out-of-date/lack of Microsoft Visual C++. You can install it here.
The Python SDK supports Python 3.6, 3.7, and 3.8. Beam 2.24.0 was the last release with support for Python 2.7 and 3.5.
# if you are still working with pathon2.7 try this,
pip install apache-beam==2.24.0
I would like to give a suggestion for you .Try use python3 with the virtual environment
# Check your version
python --version
# upgrade pip
pip install --upgrade pip
#create virtual env
python -m venv myenv
# activate your virtual env
source myenv/bin/activate
# install beam
pip3 install apache-beam==2.27.0 or
pip install apache-beam==2.27.0
I am trying Watson visual recognition with Python, following this: https://www.ibm.com/watson/developercloud/visual-recognition/api/v3/python.html?python#introduction
while tried to install the library:
pip install --upgrade "watson-developer-cloud>=1.2.1"
I am getting following error even after installing "Microsoft Visual C++ 14.0", I have uninstalled other versions of MSVC++ too.
Collecting watson-developer-cloud>=1.2.1
Using cached watson-developer-cloud-1.2.1.tar.gz
Requirement already up-to-date: requests<3.0,>=2.0 in c:\python36\lib\site-packages (from watson-developer-cloud>=1.2.1)
Requirement already up-to-date: python_dateutil>=2.5.3 in c:\python36\lib\site-packages (from watson-developer-cloud>=1.2.1)
Requirement already up-to-date: autobahn>=0.10.9 in c:\python36\lib\site-packages (from watson-developer-cloud>=1.2.1)
Collecting Twisted>=13.2.0 (from watson-developer-cloud>=1.2.1)
Using cached Twisted-17.9.0.tar.bz2
Collecting pyOpenSSL>=16.2.0 (from watson-developer-cloud>=1.2.1)
Using cached pyOpenSSL-17.5.0-py2.py3-none-any.whl
Collecting service-identity>=17.0.0 (from watson-developer-cloud>=1.2.1)
Using cached service_identity-17.0.0-py2.py3-none-any.whl
Requirement already up-to-date: idna<2.7,>=2.5 in c:\python36\lib\site-packages (from requests<3.0,>=2.0->watson-developer-cloud>=1.2.1)
Requirement already up-to-date: certifi>=2017.4.17 in c:\python36\lib\site-packages (from requests<3.0,>=2.0->watson-developer-cloud>=1.2.1)
Requirement already up-to-date: chardet<3.1.0,>=3.0.2 in c:\python36\lib\site-packages (from requests<3.0,>=2.0->watson-developer-cloud>=1.2.1)
Requirement already up-to-date: urllib3<1.23,>=1.21.1 in c:\python36\lib\site-packages (from requests<3.0,>=2.0->watson-developer-cloud>=1.2.1)
Requirement already up-to-date: six>=1.5 in c:\python36\lib\site-packages (from python_dateutil>=2.5.3->watson-developer-cloud>=1.2.1)
Requirement already up-to-date: txaio>=2.7.0 in c:\python36\lib\site-packages (from autobahn>=0.10.9->watson-developer-cloud>=1.2.1)
Requirement already up-to-date: zope.interface>=4.0.2 in c:\python36\lib\site-packages (from Twisted>=13.2.0->watson-developer-cloud>=1.2.1)
Requirement already up-to-date: constantly>=15.1 in c:\python36\lib\site-packages (from Twisted>=13.2.0->watson-developer-cloud>=1.2.1)
Requirement already up-to-date: incremental>=16.10.1 in c:\python36\lib\site-packages (from Twisted>=13.2.0->watson-developer-cloud>=1.2.1)
Requirement already up-to-date: Automat>=0.3.0 in c:\python36\lib\site-packages (from Twisted>=13.2.0->watson-developer-cloud>=1.2.1)
Requirement already up-to-date: hyperlink>=17.1.1 in c:\python36\lib\site-packages (from Twisted>=13.2.0->watson-developer-cloud>=1.2.1)
Collecting cryptography>=2.1.4 (from pyOpenSSL>=16.2.0->watson-developer-cloud>=1.2.1)
Using cached cryptography-2.2.2-cp36-cp36m-win_amd64.whl
Collecting pyasn1 (from service-identity>=17.0.0->watson-developer-cloud>=1.2.1)
Using cached pyasn1-0.4.2-py2.py3-none-any.whl
Collecting pyasn1-modules (from service-identity>=17.0.0->watson-developer-cloud>=1.2.1)
Using cached pyasn1_modules-0.2.1-py2.py3-none-any.whl
Requirement already up-to-date: attrs in c:\python36\lib\site-packages (from service-identity>=17.0.0->watson-developer-cloud>=1.2.1)
Requirement already up-to-date: setuptools in c:\python36\lib\site-packages (from zope.interface>=4.0.2->Twisted>=13.2.0->watson-developer-cloud>=1.2.1)
Collecting cffi>=1.7; platform_python_implementation != "PyPy" (from cryptography>=2.1.4->pyOpenSSL>=16.2.0->watson-developer-cloud>=1.2.1)
Using cached cffi-1.11.5-cp36-cp36m-win_amd64.whl
Collecting asn1crypto>=0.21.0 (from cryptography>=2.1.4->pyOpenSSL>=16.2.0->watson-developer-cloud>=1.2.1)
Using cached asn1crypto-0.24.0-py2.py3-none-any.whl
Collecting pycparser (from cffi>=1.7; platform_python_implementation != "PyPy"->cryptography>=2.1.4->pyOpenSSL>=16.2.0->watson-developer-cloud>=1.2.1)
Using cached pycparser-2.18.tar.gz
Installing collected packages: Twisted, pycparser, cffi, asn1crypto, cryptography, pyOpenSSL, pyasn1, pyasn1-modules, service-identity, watson-developer-cloud
Running setup.py install for Twisted: started
Running setup.py install for Twisted: finished with status 'error'
Complete output from command c:\python36\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\IPC_AD~1\\AppData\\Local\\Temp\\pip-build-ahl2cx7d\\Twisted\\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\IPC_AD~1\AppData\Local\Temp\pip-tqzdkhaj-record\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.6
creating build\lib.win-amd64-3.6\twisted
copying src\twisted\copyright.py -> build\lib.win-amd64-3.6\twisted
copying src\twisted\plugin.py -> build\lib.win-amd64-3.6\twisted
copying src\twisted\_version.py -> build\lib.win-amd64-3.6\twisted
copying src\twisted\__init__.py -> build\lib.win-amd64-3.6\twisted
.
.
.
.
copying src\twisted\words\xish\xpathparser.g -> build\lib.win-amd64-3.6\twisted\words\xish
running build_ext
building 'twisted.test.raiser' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
----------------------------------------
I have tried to install twisted by from .wl as
pip install Twisted-17.9.0-cp37-cp37m-win_amd64.whl
and
pip install Twisted-17.9.0-cp27-cp27m-win32.whl
both failed with error:
Twisted-17.9.0-cp37-cp37m-win_amd64.whl is not a supported wheel on this platform.
I am using Windows 7 64
While installing from unofficial python wheels you need to find appropriate wheel for your python and os.
This looks like the naming convention.
module (mod. ver.) (py ver.) os(32 or 64)
↓ ↓ ↓ ↓
Twisted-17.9.0-cp36-cp36m-win_amd64.whl
I have solved the issue by manually downloading and installing "Twisted" library with following command.
pip install Twisted-17.9.0-cp37-cp37m-win_amd64.whl
Thanks. This worked for me too. Was getting the same error.
Manually downloaded and installed Twisted 17.9.0 using
pip install Twisted-17.9.0-cp36-cp36m-win32.whl
and it worked.