pycld2 icon indicating copy to clipboard operation
pycld2 copied to clipboard

Install failing On Windows 10 - python 3.8.0

Open Benbbe opened this issue 4 years ago • 11 comments

Hello, Install fails On Windows 10 - python 3.8.0 when trying to install pycld2

Collecting pycld2 Using cached https://files.pythonhosted.org/packages/21/d2/8b0def84a53c88d0eb27c67b05269fbd16ad68df8c78849e7b5d65e6aec 3/pycld2-0.41.tar.gz Installing collected packages: pycld2 Running setup.py install for pycld2 ... error ERROR: Command errored out with exit status 1: command: 'C:\dev\apps\python-3.8.0\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\User s\\$$$$$\\AppData\\Local\\Temp\\pip-install-k2k97h5p\\pycld2\\setup.py'"'"'; __file__='"'"'C:\\Users\\$$$\\AppData \\Local\\Temp\\pip-install-k2k97h5p\\pycld2\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.re ad().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C: \Users\$$$\AppData\Local\Temp\pip-record-rv13nhfp\install-record.txt' --single-version-externally-managed --compile cwd: C:\Users\$$$\AppData\Local\Temp\pip-install-k2k97h5p\pycld2\ Complete output (10 lines): running install running build running build_py creating build creating build\lib.win32-3.8 creating build\lib.win32-3.8\pycld2 copying pycld2\__init__.py -> build\lib.win32-3.8\pycld2 running build_ext building 'pycld2._pycld2' extension error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.micr osoft.com/downloads/ ---------------------------------------- ERROR: Command errored out with exit status 1: 'C:\dev\apps\python-3.8.0\python.exe' -u -c 'import sys, setuptools, toke nize; sys.argv[0] = '"'"'C:\\Users\\$$$\\AppData\\Local\\Temp\\pip-install-k2k97h5p\\pycld2\\setup.py'"'"'; __file__ ='"'"'C:\\Users\\$$$\\AppData\\Local\\Temp\\pip-install-k2k97h5p\\pycld2\\setup.py'"'"';f=getattr(tokenize, '"'"'ope n'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"' exec'"'"'))' install --record 'C:\Users\$$$\AppData\Local\Temp\pip-record-rv13nhfp\install-record.txt' --single-vers ion-externally-managed --compile Check the logs for full command output.

Regards

Benbbe avatar Nov 11 '19 19:11 Benbbe

From your error message:

extension error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/

Do you have that exec. available @Benbbe ?

bsolomon1124 avatar Nov 11 '19 19:11 bsolomon1124

Yes, I have Microsoft Visual C++ 14.20.27508. (x86 and x64). I have also older versions installed. @bsolomon1124

Benbbe avatar Nov 11 '19 22:11 Benbbe

Hello, Install fails On Windows 10 - python 3.8.0 when trying to install pycld2

Collecting pycld2 Using cached https://files.pythonhosted.org/packages/21/d2/8b0def84a53c88d0eb27c67b05269fbd16ad68df8c78849e7b5d65e6aec 3/pycld2-0.41.tar.gz Installing collected packages: pycld2 Running setup.py install for pycld2 ... error ERROR: Command errored out with exit status 1: command: 'C:\dev\apps\python-3.8.0\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\User s\\$$$$$\\AppData\\Local\\Temp\\pip-install-k2k97h5p\\pycld2\\setup.py'"'"'; __file__='"'"'C:\\Users\\$$$\\AppData \\Local\\Temp\\pip-install-k2k97h5p\\pycld2\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.re ad().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C: \Users\$$$\AppData\Local\Temp\pip-record-rv13nhfp\install-record.txt' --single-version-externally-managed --compile cwd: C:\Users\$$$\AppData\Local\Temp\pip-install-k2k97h5p\pycld2\ Complete output (10 lines): running install running build running build_py creating build creating build\lib.win32-3.8 creating build\lib.win32-3.8\pycld2 copying pycld2\__init__.py -> build\lib.win32-3.8\pycld2 running build_ext building 'pycld2._pycld2' extension error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.micr osoft.com/downloads/ ---------------------------------------- ERROR: Command errored out with exit status 1: 'C:\dev\apps\python-3.8.0\python.exe' -u -c 'import sys, setuptools, toke nize; sys.argv[0] = '"'"'C:\\Users\\$$$\\AppData\\Local\\Temp\\pip-install-k2k97h5p\\pycld2\\setup.py'"'"'; __file__ ='"'"'C:\\Users\\$$$\\AppData\\Local\\Temp\\pip-install-k2k97h5p\\pycld2\\setup.py'"'"';f=getattr(tokenize, '"'"'ope n'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"' exec'"'"'))' install --record 'C:\Users\$$$\AppData\Local\Temp\pip-record-rv13nhfp\install-record.txt' --single-vers ion-externally-managed --compile Check the logs for full command output.

Regards

@Benbbe I'm facing the same problem. DId find a solution?

azeezsanya avatar Feb 29 '20 05:02 azeezsanya

This looks similar to issues in other libraries such as https://github.com/statsmodels/statsmodels/issues/4160, https://github.com/benfred/implicit/issues/91, https://github.com/explosion/spaCy/issues/741.

bsolomon1124 avatar Mar 25 '20 12:03 bsolomon1124

I'm able to reproduce this:

docker run --rm -it python:windowsservercore-ltsc2016 powershell

Then:

PS C:\> py -3 -m pip --version
pip 20.0.2 from C:\Python\lib\site-packages\pip (python 3.8)
PS C:\> py -3 -m pip install pycld2
Collecting pycld2
  Downloading pycld2-0.41.tar.gz (41.4 MB)
     |????????????????????????????????| 41.4 MB 134 kB/s
Building wheels for collected packages: pycld2
  Building wheel for pycld2 (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: 'C:\Python\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\ContainerAdministrator\\AppData\\Local\\Temp\\pip-install-7ikci4ue\\pycld2\\setup.py'"'"'; __file__='"'"'C:\\Users\\ContainerAdministrator\\AppData\\Local\\Temp\\pip-install-7ikci4ue\\pycld2\\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\ContainerAdministrator\AppData\Local\Temp\pip-wheel-jc5qr4yb'
       cwd: C:\Users\ContainerAdministrator\AppData\Local\Temp\pip-install-7ikci4ue\pycld2\
  Complete output (11 lines):
  The [wheel] section is deprecated. Use [bdist_wheel] instead.
  running build
  running build_py
  creating build
  creating build\lib.win-amd64-3.8
  creating build\lib.win-amd64-3.8\pycld2
  copying pycld2\__init__.py -> build\lib.win-amd64-3.8\pycld2
  running build_ext
  building 'pycld2._pycld2' extension
  ----------------------------------------
  ERROR: Failed building wheel for pycld2
  Running setup.py clean for pycld2
Failed to build pycld2
Installing collected packages: pycld2
    Running setup.py install for pycld2 ... error
    ERROR: Command errored out with exit status 1:
     command: 'C:\Python\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\ContainerAdministrator\\AppData\\Local\\Temp\\pip-install-7ikci
ue\\pycld2\\setup.py'"'"'; __file__='"'"'C:\\Users\\ContainerAdministrator\\AppData\\Local\\Temp\\pip-install-7ikci4ue\\pycld2\\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\ContainerAdmi4istrator\AppData\Local\Temp\pip-record-ayi_bxdw\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Python\Include\pycld2'             '         cwd: C:\Users\ContainerAdministrator\AppData\Local\Temp\pip-install-7ikci4ue\pycld2\                                                                              n    Complete output (10 lines):
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.8
    creating build\lib.win-amd64-3.8\pycld2
    copying pycld2\__init__.py -> build\lib.win-amd64-3.8\pycld2
    running build_ext
    building 'pycld2._pycld2' 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: 'C:\Python\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\ContainerAdministrator\\AppDat
\\Local\\Temp\\pip-install-7ikci4ue\\pycld2\\setup.py'"'"'; __file__='"'"'C:\\Users\\ContainerAdministrator\\AppData\\Local\\Temp\\pip-install-7ikci4ue\\pycld2\\setup.py'"
"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' installa--record 'C:\Users\ContainerAdministrator\AppData\Local\Temp\pip-record-ayi_bxdw\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Py'hon\Include\pycld2' Check the logs for full command output.

As another answer suggested, upgrading setuptools did not work. (I don't have a clue why it would.)

bsolomon1124 avatar Mar 25 '20 19:03 bsolomon1124

Anyone find a solution to this?

SuperPauly avatar Oct 02 '20 15:10 SuperPauly

I had a similar problem trying to install greenlet and pynvim.

If you use chocolatey this might work:

choco install visualcppbuildtools

If not, just download it from https://go.microsoft.com/fwlink/?LinkId=691126 (Direct download link)

PhilT avatar Dec 17 '20 11:12 PhilT

Me too - whatever I tried on windows - I failed. I installed it by the inofficially binaries which i found here: https://www.lfd.uci.edu/~gohlke/pythonlibs/

No issues at all - working flawlessly.

tefod-zz avatar Dec 17 '20 11:12 tefod-zz

Me too - whatever I tried on windows - I failed. I installed it by the inofficially binaries which i found here: https://www.lfd.uci.edu/~gohlke/pythonlibs/

No issues at all - working flawlessly.

@tefod-zz thanks for sharing this. it saved the day.

gertva avatar Jan 25 '21 13:01 gertva

Me too - whatever I tried on windows - I failed. I installed it by the inofficially binaries which i found here: https://www.lfd.uci.edu/~gohlke/pythonlibs/

No issues at all - working flawlessly.

thanks ❤️ it works

TalhaUsuf avatar Mar 15 '22 13:03 TalhaUsuf

Me too - whatever I tried on windows - I failed. I installed it by the inofficially binaries which i found here: https://www.lfd.uci.edu/~gohlke/pythonlibs/

No issues at all - working flawlessly.

It works for me! Big thanks!

Jun-jie-Huang avatar Jun 10 '22 06:06 Jun-jie-Huang