wmayner / pyemd

Fast EMD for Python: a wrapper for Pele and Werman's C++ implementation of the Earth Mover's Distance metric

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

building 'pyemd.emd' extension error: Microsoft Visual C++ 14.0 is required.

mukeshsah1 opened this issue · comments

(base) D:>pip install pyemd
Collecting pyemd
Using cached pyemd-0.5.1.tar.gz (91 kB)
Requirement already satisfied: numpy<2.0.0,>=1.9.0 in d:\tfs\pandit\anaconda\lib\site-packages (from pyemd) (1.18.1)
Building wheels for collected packages: pyemd
Building wheel for pyemd (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'D:\tfs\pandit\anaconda\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\mukesh.sah\AppData\Local\Temp\pip-install-db68s9hb\pyemd\setup.py'"'"'; file='"'"'C:\Users\mukesh.sah\AppData\Local\Temp\pip-install-db68s9hb\pyemd\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\mukesh.sah\AppData\Local\Temp\pip-wheel-le7hu_jm'
cwd: C:\Users\mukesh.sah\AppData\Local\Temp\pip-install-db68s9hb\pyemd
Complete output (11 lines):
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
creating build\lib.win-amd64-3.7\pyemd
copying pyemd_about_.py -> build\lib.win-amd64-3.7\pyemd
copying pyemd_init_.py -> build\lib.win-amd64-3.7\pyemd
running build_ext
building 'pyemd.emd' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/

ERROR: 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
ERROR: Command errored out with exit status 1:
command: 'D:\tfs\pandit\anaconda\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\mukesh.sah\AppData\Local\Temp\pip-install-db68s9hb\pyemd\setup.py'"'"'; file='"'"'C:\Users\mukesh.sah\AppData\Local\Temp\pip-install-db68s9hb\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\mukesh.sah\AppData\Local\Temp\pip-record-swz_qpxc\install-record.txt' --single-version-externally-managed --compile --install-headers 'D:\tfs\pandit\anaconda\Include\pyemd'
cwd: C:\Users\mukesh.sah\AppData\Local\Temp\pip-install-db68s9hb\pyemd
Complete output (11 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
creating build\lib.win-amd64-3.7\pyemd
copying pyemd_about_.py -> build\lib.win-amd64-3.7\pyemd
copying pyemd_init_.py -> build\lib.win-amd64-3.7\pyemd
running build_ext
building 'pyemd.emd' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
----------------------------------------
ERROR: Command errored out with exit status 1: 'D:\tfs\pandit\anaconda\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\mukesh.sah\AppData\Local\Temp\pip-install-db68s9hb\pyemd\setup.py'"'"'; file='"'"'C:\Users\mukesh.sah\AppData\Local\Temp\pip-install-db68s9hb\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\mukesh.sah\AppData\Local\Temp\pip-record-swz_qpxc\install-record.txt' --single-version-externally-managed --compile --install-headers 'D:\tfs\pandit\anaconda\Include\pyemd' Check the logs for full command output.

I am getting this error though I have installed Microsoft Visual C++ 14.0.
Pyemd bug

I am using anaconda version 2020.02
python 3.7.6
pymed version = 0.5.1
please help to fix this issue. I am installing through pip.

I have the same problem with you , did you solve the problem?

Version 1.0.0 has wheels built for Windows; hopefully that should fix these issues.