aboSamoor / pycld2

Apache License 2.0
165 stars 63 forks source link

Setup issue: fatal error C1083: Cannot open compiler generated file: '': Invalid argument #56

Open raulkviana opened 1 year ago

raulkviana commented 1 year ago

Hello,

I'm tried to install pycld2 using pip package and I'm always getting the same error message. I've already tried to update pip, but I still get the same error message:

Building wheels for collected packages: pycld2
  Building wheel for pycld2 (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [41 lines of output]
      C:\some_folder\Python\Python39\lib\site-packages\setuptools\config\setupcfg.py:508: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead.
        warnings.warn(msg, warning_class)
      running bdist_wheel
      The [wheel] section is deprecated. Use [bdist_wheel] instead.
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-cpython-39
      creating build\lib.win-amd64-cpython-39\pycld2
      copying pycld2\__init__.py -> build\lib.win-amd64-cpython-39\pycld2
      running build_ext
      building 'pycld2._pycld2' extension
      creating build\temp.win-amd64-cpython-39
      creating build\temp.win-amd64-cpython-39\Release
      creating build\temp.win-amd64-cpython-39\Release\Users
      creating build\temp.win-amd64-cpython-39\Release\Users\xxx
      creating build\temp.win-amd64-cpython-39\Release\Users\xxx\AppData
      creating build\temp.win-amd64-cpython-39\Release\Users\xxx\AppData\Local
      creating build\temp.win-amd64-cpython-39\Release\Users\xxx\AppData\Local\Temp
      creating build\temp.win-amd64-cpython-39\Release\Users\xxx\AppData\Local\Temp\pip-install-zc43aqei
      creating build\temp.win-amd64-cpython-39\Release\Users\xxx\AppData\Local\Temp\pip-install-zc43aqei\pycld2_842e29bfe00540bc8c314808a0cc68a9
      creating build\temp.win-amd64-cpython-39\Release\Users\xxx\AppData\Local\Temp\pip-install-zc43aqei\pycld2_842e29bfe00540bc8c314808a0cc68a9\bindings
      creating build\temp.win-amd64-cpython-39\Release\Users\xxx\AppData\Local\Temp\pip-install-zc43aqei\pycld2_842e29bfe00540bc8c314808a0cc68a9\cld2
      creating build\temp.win-amd64-cpython-39\Release\Users\xxx\AppData\Local\Temp\pip-install-zc43aqei\pycld2_842e29bfe00540bc8c314808a0cc68a9\cld2\internal
      "c:\some_folder\Microsoft Visual Studio\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Users\xxx\AppData\Local\Temp\pip-install-zc43aqei\pycld2_842e29bfe00540bc8c314808a0cc68a9\cld2\internal -IC:\Users\xxx\AppData\Local\Temp\pip-install-zc43aqei\pycld2_842e29bfe00540bc8c314808a0cc68a9\cld2\public -IC:\some_folder\Python\Python39\include -IC:\some_folder\Python\Python39\Include "-Ic:\some_folder\Microsoft Visual Studio\VC\Tools\MSVC\14.16.27023\ATLMFC\include" "-Ic:\some_folder\Microsoft Visual Studio\VC\Tools\MSVC\14.16.27023\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt" /EHsc /TpC:\Users\xxx\AppData\Local\Temp\pip-install-zc43aqei\pycld2_842e29bfe00540bc8c314808a0cc68a9\bindings\encodings.cc /Fobuild\temp.win-amd64-cpython-39\Release\Users\xxx\AppData\Local\Temp\pip-install-zc43aqei\pycld2_842e29bfe00540bc8c314808a0cc68a9\bindings\encodings.obj -w -O2 -m64 -fPIC      
      cl : Command line warning D9025 : overriding '/W3' with '/w'
      cl : Command line warning D9002 : ignoring unknown option '-m64'
      cl : Command line warning D9002 : ignoring unknown option '-fPIC'
      encodings.cc
      "c:\some_folder\Microsoft Visual Studio\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Users\xxx\AppData\Local\Temp\pip-install-zc43aqei\pycld2_842e29bfe00540bc8c314808a0cc68a9\cld2\internal -IC:\Users\xxx\AppData\Local\Temp\pip-install-zc43aqei\pycld2_842e29bfe00540bc8c314808a0cc68a9\cld2\public -IC:\some_folder\Python\Python39\include -IC:\some_folder\Python\Python39\Include "-Ic:\some_folder\Microsoft Visual Studio\VC\Tools\MSVC\14.16.27023\ATLMFC\include" "-Ic:\some_folder\Microsoft Visual Studio\VC\Tools\MSVC\14.16.27023\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt" /EHsc /TpC:\Users\xxx\AppData\Local\Temp\pip-install-zc43aqei\pycld2_842e29bfe00540bc8c314808a0cc68a9\bindings\pycldmodule.cc /Fobuild\temp.win-amd64-cpython-39\Release\Users\xxx\AppData\Local\Temp\pip-install-zc43aqei\pycld2_842e29bfe00540bc8c314808a0cc68a9\bindings\pycldmodule.obj -w -O2 -m64 -fPIC  
      cl : Command line warning D9025 : overriding '/W3' with '/w'
      cl : Command line warning D9002 : ignoring unknown option '-m64'
      cl : Command line warning D9002 : ignoring unknown option '-fPIC'
      pycldmodule.cc
      "c:\some_folder\Microsoft Visual Studio\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Users\xxx\AppData\Local\Temp\pip-install-zc43aqei\pycld2_842e29bfe00540bc8c314808a0cc68a9\cld2\internal -IC:\Users\xxx\AppData\Local\Temp\pip-install-zc43aqei\pycld2_842e29bfe00540bc8c314808a0cc68a9\cld2\public -IC:\some_folder\Python\Python39\include -IC:\some_folder\Python\Python39\Include "-Ic:\some_folder\Microsoft Visual Studio\VC\Tools\MSVC\14.16.27023\ATLMFC\include" "-Ic:\some_folder\Microsoft Visual Studio\VC\Tools\MSVC\14.16.27023\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt" /EHsc /TpC:\Users\xxx\AppData\Local\Temp\pip-install-zc43aqei\pycld2_842e29bfe00540bc8c314808a0cc68a9\cld2\internal/cld2_generated_cjk_compatible.cc /Fobuild\temp.win-amd64-cpython-39\Release\Users\xxx\AppData\Local\Temp\pip-install-zc43aqei\pycld2_842e29bfe00540bc8c314808a0cc68a9\cld2\internal/cld2_generated_cjk_compatible.obj -w -O2 -m64 -fPIC
      cl : Command line warning D9025 : overriding '/W3' with '/w'
      cl : Command line warning D9002 : ignoring unknown option '-m64'
      cl : Command line warning D9002 : ignoring unknown option '-fPIC'
      cld2_generated_cjk_compatible.cc
      C:\Users\xxx\AppData\Local\Temp\pip-install-zc43aqei\pycld2_842e29bfe00540bc8c314808a0cc68a9\cld2\internal\cld2_generated_cjk_compatible.cc : fatal error C1083: Cannot open compiler generated file: '': Invalid argument
      error: command 'c:\\some_folder\\Microsoft Visual Studio\\VC\\Tools\\MSVC\\14.16.27023\\bin\\HostX86\\x64\\cl.exe' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pycld2
  Running setup.py clean for pycld2
Failed to build pycld2
Installing collected packages: pycld2, py4j, pptree, pinyin, overrides, mpld3, lru-dict, jieba, janome, docopt, zipp, xxhash, wrapt, urllib3, typing-extensions, threadpoolctl, terminaltables, tabulate, soupsieve, smart-open, six, regex, pyyaml, PySocks, pyparsing, pillow, packaging, numpy, num2words, networkx, multidict, more-itertools, lxml, kiwisolver, joblib, idna, future, ftfy, fsspec, frozenlist, fonttools, editdistance, dill, Cython, cycler, conllu, colorama, cloudpickle, charset-normalizer, certifi, attrs, async-timeout, yarl, tqdm, torch, segtok, scipy, requests, python-dateutil, pyarrow, multiprocess, lemminflect, langdetect, importlib-metadata, deprecated, contourpy, click, beautifulsoup4, anytree, aiosignal, wikipedia-api, simpful, scikit-learn, responses, pandas, OpenHowNet, nltk, miniful, matplotlib, language_tool_python, konoha, hyperopt, huggingface-hub, aiohttp, transformers, gdown, fst-pso, pyfume, datasets, bert-score, FuzzyTM, gensim, bpemb, flair, textattack
  Running setup.py install for pycld2 ... error
  error: subprocess-exited-with-error

  × Running setup.py install for pycld2 did not run successfully.
  │ exit code: 1
  ╰─> [42 lines of output]
      C:\some_folder\Python\Python39\lib\site-packages\setuptools\config\setupcfg.py:508: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead.
        warnings.warn(msg, warning_class)
      running install
      C:\some_folder\Python\Python39\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-39
      creating build\lib.win-amd64-cpython-39\pycld2
      copying pycld2\__init__.py -> build\lib.win-amd64-cpython-39\pycld2
      running build_ext
      building 'pycld2._pycld2' extension
      creating build\temp.win-amd64-cpython-39
      creating build\temp.win-amd64-cpython-39\Release
      creating build\temp.win-amd64-cpython-39\Release\Users
      creating build\temp.win-amd64-cpython-39\Release\Users\xxx
      creating build\temp.win-amd64-cpython-39\Release\Users\xxx\AppData
      creating build\temp.win-amd64-cpython-39\Release\Users\xxx\AppData\Local
      creating build\temp.win-amd64-cpython-39\Release\Users\xxx\AppData\Local\Temp
      creating build\temp.win-amd64-cpython-39\Release\Users\xxx\AppData\Local\Temp\pip-install-zc43aqei
      creating build\temp.win-amd64-cpython-39\Release\Users\xxx\AppData\Local\Temp\pip-install-zc43aqei\pycld2_842e29bfe00540bc8c314808a0cc68a9
      creating build\temp.win-amd64-cpython-39\Release\Users\xxx\AppData\Local\Temp\pip-install-zc43aqei\pycld2_842e29bfe00540bc8c314808a0cc68a9\bindings
      creating build\temp.win-amd64-cpython-39\Release\Users\xxx\AppData\Local\Temp\pip-install-zc43aqei\pycld2_842e29bfe00540bc8c314808a0cc68a9\cld2
      creating build\temp.win-amd64-cpython-39\Release\Users\xxx\AppData\Local\Temp\pip-install-zc43aqei\pycld2_842e29bfe00540bc8c314808a0cc68a9\cld2\internal
      "c:\some_folder\Microsoft Visual Studio\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Users\xxx\AppData\Local\Temp\pip-install-zc43aqei\pycld2_842e29bfe00540bc8c314808a0cc68a9\cld2\internal -IC:\Users\xxx\AppData\Local\Temp\pip-install-zc43aqei\pycld2_842e29bfe00540bc8c314808a0cc68a9\cld2\public -IC:\some_folder\Python\Python39\include -IC:\some_folder\Python\Python39\Include "-Ic:\some_folder\Microsoft Visual Studio\VC\Tools\MSVC\14.16.27023\ATLMFC\include" "-Ic:\some_folder\Microsoft Visual Studio\VC\Tools\MSVC\14.16.27023\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt" /EHsc /TpC:\Users\xxx\AppData\Local\Temp\pip-install-zc43aqei\pycld2_842e29bfe00540bc8c314808a0cc68a9\bindings\encodings.cc /Fobuild\temp.win-amd64-cpython-39\Release\Users\xxx\AppData\Local\Temp\pip-install-zc43aqei\pycld2_842e29bfe00540bc8c314808a0cc68a9\bindings\encodings.obj -w -O2 -m64 -fPIC      
      cl : Command line warning D9025 : overriding '/W3' with '/w'
      cl : Command line warning D9002 : ignoring unknown option '-m64'
      cl : Command line warning D9002 : ignoring unknown option '-fPIC'
      encodings.cc
      "c:\some_folder\Microsoft Visual Studio\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Users\xxx\AppData\Local\Temp\pip-install-zc43aqei\pycld2_842e29bfe00540bc8c314808a0cc68a9\cld2\internal -IC:\Users\xxx\AppData\Local\Temp\pip-install-zc43aqei\pycld2_842e29bfe00540bc8c314808a0cc68a9\cld2\public -IC:\some_folder\Python\Python39\include -IC:\some_folder\Python\Python39\Include "-Ic:\some_folder\Microsoft Visual Studio\VC\Tools\MSVC\14.16.27023\ATLMFC\include" "-Ic:\some_folder\Microsoft Visual Studio\VC\Tools\MSVC\14.16.27023\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt" /EHsc /TpC:\Users\xxx\AppData\Local\Temp\pip-install-zc43aqei\pycld2_842e29bfe00540bc8c314808a0cc68a9\bindings\pycldmodule.cc /Fobuild\temp.win-amd64-cpython-39\Release\Users\xxx\AppData\Local\Temp\pip-install-zc43aqei\pycld2_842e29bfe00540bc8c314808a0cc68a9\bindings\pycldmodule.obj -w -O2 -m64 -fPIC  
      cl : Command line warning D9025 : overriding '/W3' with '/w'
      cl : Command line warning D9002 : ignoring unknown option '-m64'
      cl : Command line warning D9002 : ignoring unknown option '-fPIC'
      pycldmodule.cc
      "c:\some_folder\Microsoft Visual Studio\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Users\xxx\AppData\Local\Temp\pip-install-zc43aqei\pycld2_842e29bfe00540bc8c314808a0cc68a9\cld2\internal -IC:\Users\xxx\AppData\Local\Temp\pip-install-zc43aqei\pycld2_842e29bfe00540bc8c314808a0cc68a9\cld2\public -IC:\some_folder\Python\Python39\include -IC:\some_folder\Python\Python39\Include "-Ic:\some_folder\Microsoft Visual Studio\VC\Tools\MSVC\14.16.27023\ATLMFC\include" "-Ic:\some_folder\Microsoft Visual Studio\VC\Tools\MSVC\14.16.27023\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt" /EHsc /TpC:\Users\xxx\AppData\Local\Temp\pip-install-zc43aqei\pycld2_842e29bfe00540bc8c314808a0cc68a9\cld2\internal/cld2_generated_cjk_compatible.cc /Fobuild\temp.win-amd64-cpython-39\Release\Users\xxx\AppData\Local\Temp\pip-install-zc43aqei\pycld2_842e29bfe00540bc8c314808a0cc68a9\cld2\internal/cld2_generated_cjk_compatible.obj -w -O2 -m64 -fPIC
      cl : Command line warning D9025 : overriding '/W3' with '/w'
      cl : Command line warning D9002 : ignoring unknown option '-m64'
      cl : Command line warning D9002 : ignoring unknown option '-fPIC'
      cld2_generated_cjk_compatible.cc
      C:\Users\xxx\AppData\Local\Temp\pip-install-zc43aqei\pycld2_842e29bfe00540bc8c314808a0cc68a9\cld2\internal\cld2_generated_cjk_compatible.cc : fatal error C1083: Cannot open compiler generated file: '': Invalid argument
      error: command 'c:\\some_folder\\Microsoft Visual Studio\\VC\\Tools\\MSVC\\14.16.27023\\bin\\HostX86\\x64\\cl.exe' failed with exit code 1
      [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.
╰─> pycld2

Does anyone know how to solve this? I'll try to install it in another computer to see if it works, meanwhile.

raulkviana commented 1 year ago

Installing in another PC yielded the same result

AdrianSchneble commented 8 months ago

I have the same issue as of Feb 2024. @raulkviana did you figure out how to solve the problem?

raulkviana commented 8 months ago

Hey, This was a very long time ago, so I don't remember what I did or if just gave up...


From: Adrian Schneble @.> Sent: 28 February 2024 14:28 To: aboSamoor/pycld2 @.> Cc: Raul Viana8204 @.>; Mention @.> Subject: Re: [aboSamoor/pycld2] Setup issue: fatal error C1083: Cannot open compiler generated file: '': Invalid argument (Issue #56)

I have the same issue as of Feb 2024. @raulkvianahttps://github.com/raulkviana did you figure out how to solve the problem?

— Reply to this email directly, view it on GitHubhttps://github.com/aboSamoor/pycld2/issues/56#issuecomment-1969105717, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ARNRU7T7DS5MAXZTJJCDMYLYV45IFAVCNFSM6AAAAAATLNJ6CSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRZGEYDKNZRG4. You are receiving this because you were mentioned.Message ID: @.***>