问题
I'm trying to install pyemd
package in Python through pip
and getting following error:
C:\Users\dipanwita.neogy>pip install pyemd
Collecting pyemd
Using cached pyemd-0.4.3.tar.gz
Requirement already satisfied: numpy<2.0.0,>=1.9.0 in c:\users\dipanwita.neogy\a
naconda3\lib\site-packages (from pyemd)
Building wheels for collected packages: pyemd
Running setup.py bdist_wheel for pyemd ... error
Complete output from command C:\Users\dipanwita.neogy\Anaconda3\python.exe -u
-c "import setuptools, tokenize;__file__='C:\\Users\\DIPANW~1.NEO\\AppData\\Loca
l\\Temp\\pip-build-nk13uh5b\\pyemd\\setup.py';f=getattr(tokenize, 'open', open)(
__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __fil
e__, 'exec'))" bdist_wheel -d C:\Users\DIPANW~1.NEO\AppData\Local\Temp\tmpngn2np
rmpip-wheel- --python-tag cp36:
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win32-3.6
creating build\lib.win32-3.6\pyemd
copying pyemd\__about__.py -> build\lib.win32-3.6\pyemd
copying pyemd\__init__.py -> build\lib.win32-3.6\pyemd
running build_ext
building 'pyemd.emd' 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
----------------------------------------
Failed building wheel for pyemd
Running setup.py clean for pyemd
Failed to build pyemd
Installing collected packages: pyemd
Running setup.py install for pyemd ... error
Complete output from command C:\Users\dipanwita.neogy\Anaconda3\python.exe -
u -c "import setuptools, tokenize;__file__='C:\\Users\\DIPANW~1.NEO\\AppData\\Lo
cal\\Temp\\pip-build-nk13uh5b\\pyemd\\setup.py';f=getattr(tokenize, 'open', open
)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __f
ile__, 'exec'))" install --record C:\Users\DIPANW~1.NEO\AppData\Local\Temp\pip-e
rihhtfj-record\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build\lib.win32-3.6
creating build\lib.win32-3.6\pyemd
copying pyemd\__about__.py -> build\lib.win32-3.6\pyemd
copying pyemd\__init__.py -> build\lib.win32-3.6\pyemd
running build_ext
building 'pyemd.emd' 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
----------------------------------------
Command "C:\Users\dipanwita.neogy\Anaconda3\python.exe -u -c "import setuptools,
tokenize;__file__='C:\\Users\\DIPANW~1.NEO\\AppData\\Local\\Temp\\pip-build-nk1
3uh5b\\pyemd\\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\DIPANW~1.NEO\AppData\Local\Temp\pip-erihhtfj-record\install-r
ecord.txt --single-version-externally-managed --compile" failed with error code
1 in C:\Users\DIPANW~1.NEO\AppData\Local\Temp\pip-build-nk13uh5b\pyemd\
I cannot find anything regarding this error. Please suggest me what should I do?
回答1:
The error you are receiving is: error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
. You need to read the error message carefully.
You just need to go to the link they have provided for you and follow the instructions: http://landinghub.visualstudio.com/visual-cpp-build-tools
回答2:
Following below steps helped me overcome the error:
- While installing the Visual Studio: Download Visual Studio
- ->
Desktop development with C++
- -> Check
C++/CLI support for v142 build tools (14.24)
- ->
Having the below dependency ready:
get Python --Version in CLI.
Download and install whl file from Twisted WHL file
pip install C:\"Twisted‑19.10.0‑cp36‑cp36m‑win_amd64.whl"
Finally Run:
- pip install -v pyemd
来源:https://stackoverflow.com/questions/44944249/pip-install-pyemd-error