Search code examples
pythonpython-3.xpipanacondapython-wheel

Deprecated wheel error when installing package in Python


I am using Python 3-6.10, package which is supported by Pycld2. But when I call pip install pycld2 in command prompt or in Jupyter Notebook, the same message appears:

**ValueError: path '/home/rmyeid/code/pycld2/bindings/encodings.cc' cannot be absolute**
  ----------------------------------------
ERROR: Failed building wheel for pycld2
Running setup.py clean for pycld2
Failed to build pycld2
DEPRECATION: Could not build wheels for pycld2 which do not use PEP 517. 
pip will fall back to legacy 'setup.py install' for these. pip 21.0 will remove support for this functionality. 
**A possible replacement is to fix the wheel build issue reported above. 
You can find discussion regarding this at https://github.com/pypa/pip/issues/8368.**
Installing collected packages: pycld2
Running setup.py install for pycld2 ... error
ERROR: Command errored out with exit status 1: 'E:\Anaconda\python.exe' -u -c 'import sys, 
setuptools, tokenize; sys.argv[0] = '"'"'C:\\WINDOWS\\TEMP\\pip-install-gdceaml0\\pycld2\\setup.py'"'"';
 __file__='"'"'C:\\WINDOWS\\TEMP\\pip-install-gdceaml0\\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:\WINDOWS\TEMP\pip-record-nifp6wxi\install-record.txt' --single-version-externally-
managed --compile --install-headers 'E:\Anaconda\Include\pycld2' Check the logs for full command output.

From what I understand, it seems that there is a problem with the wheel (I don't know how to solve that), a problem with ValueError encodings and command error exit status 1. I don't know whether they are all the same problem. I have followed the link https://github.com/pypa/pip/issues/8368 and still can't find the solution.


Solution

  • This issue has been reported at https://github.com/aboSamoor/pycld2/issues/23. As a workaround, you can use the sources from GitHub. The commit below points to a Zip archive of the 0.42 version of pycld2.

    pip install https://github.com/aboSamoor/pycld2/zipball/e3ac86ed4d4902e912691c1531d0c5645382a726