pycld2
pycld2 copied to clipboard
Pip install fails on Windows 10
Python 3.5.3
reading manifest file 'pycld2.egg-info\SOURCES.txt' Traceback (most recent call last): File "<string>", line 1, in <module> File "C:\Temp\pip-install-8d49byj4\pycld2\setup.py", line 123, in <module> ext_modules=[module], File "C:\Python3\lib\site-packages\setuptools\__init__.py", line 145, in setup return distutils.core.setup(**attrs) File "C:\Python3\lib\distutils\core.py", line 148, in setup dist.run_commands() File "C:\Python3\lib\distutils\dist.py", line 955, in run_commands self.run_command(cmd) File "C:\Python3\lib\distutils\dist.py", line 974, in run_command cmd_obj.run() File "C:\Python3\lib\site-packages\setuptools\command\install.py", line 61, in run return orig.install.run(self) File "C:\Python3\lib\distutils\command\install.py", line 551, in run self.run_command(cmd_name) File "C:\Python3\lib\distutils\cmd.py", line 313, in run_command self.distribution.run_command(command) File "C:\Python3\lib\distutils\dist.py", line 974, in run_command cmd_obj.run() File "C:\Python3\lib\site-packages\setuptools\command\install_egg_info.py", line 34, in run self.run_command('egg_info') File "C:\Python3\lib\distutils\cmd.py", line 313, in run_command self.distribution.run_command(command) File "C:\Python3\lib\distutils\dist.py", line 974, in run_command cmd_obj.run() File "C:\Python3\lib\site-packages\setuptools\command\egg_info.py", line 296, in run self.find_sources() File "C:\Python3\lib\site-packages\setuptools\command\egg_info.py", line 303, in find_sources mm.run() File "C:\Python3\lib\site-packages\setuptools\command\egg_info.py", line 534, in run self.add_defaults() File "C:\Python3\lib\site-packages\setuptools\command\egg_info.py", line 578, in add_defaults self.read_manifest() File "C:\Python3\lib\site-packages\setuptools\command\sdist.py", line 199, in read_manifest self.filelist.append(line) File "C:\Python3\lib\site-packages\setuptools\command\egg_info.py", line 476, in append path = convert_path(item) File "C:\Python3\lib\distutils\util.py", line 125, in convert_path raise ValueError("path '%s' cannot be absolute" % pathname) ValueError: path '/home/rmyeid/code/pycld2/bindings/encodings.cc' cannot be absolute ----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Python3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Temp\pip-install-8d49byj4\pycld2\setup.py'"'"'; file='"'"'C:\Temp\pip-install-8d49byj4\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:\Temp\pip-record-r7gf1skx\install-record.txt' --single-version-externally-managed --compile Check the logs for full command output.
The reason is that in file
C:\Temp\pip-install-8d49byj4\pycld2\pycld2.egg-info\SOURCES.txt
There are lines:
LICENSE MANIFEST.in Makefile README.md requirements.txt setup.cfg setup.py test_pycld2.py /home/rmyeid/code/pycld2/bindings/encodings.cc /home/rmyeid/code/pycld2/bindings/pycldmodule.cc /home/rmyeid/code/pycld2/cld2/internal/cld2_generated_cjk_compatible.cc /home/rmyeid/code/pycld2/cld2/internal/cld2_generated_deltaocta0122.cc /home/rmyeid/code/pycld2/cld2/internal/cld2_generated_distinctocta0122.cc /home/rmyeid/code/pycld2/cld2/internal/cld2_generated_quad0122.cc /home/rmyeid/code/pycld2/cld2/internal/cld_generated_cjk_delta_bi_32.cc /home/rmyeid/code/pycld2/cld2/internal/cld_generated_cjk_uni_prop_80.cc /home/rmyeid/code/pycld2/cld2/internal/cld_generated_score_quad_octa_0122.cc /home/rmyeid/code/pycld2/cld2/internal/cldutil.cc /home/rmyeid/code/pycld2/cld2/internal/cldutil_shared.cc /home/rmyeid/code/pycld2/cld2/internal/compact_lang_det.cc /home/rmyeid/code/pycld2/cld2/internal/compact_lang_det_hint_code.cc /home/rmyeid/code/pycld2/cld2/internal/compact_lang_det_impl.cc /home/rmyeid/code/pycld2/cld2/internal/debug.cc /home/rmyeid/code/pycld2/cld2/internal/fixunicodevalue.cc /home/rmyeid/code/pycld2/cld2/internal/generated_distinct_bi_0.cc /home/rmyeid/code/pycld2/cld2/internal/generated_entities.cc /home/rmyeid/code/pycld2/cld2/internal/generated_language.cc /home/rmyeid/code/pycld2/cld2/internal/generated_ulscript.cc /home/rmyeid/code/pycld2/cld2/internal/getonescriptspan.cc /home/rmyeid/code/pycld2/cld2/internal/lang_script.cc /home/rmyeid/code/pycld2/cld2/internal/offsetmap.cc /home/rmyeid/code/pycld2/cld2/internal/scoreonescriptspan.cc /home/rmyeid/code/pycld2/cld2/internal/tote.cc /home/rmyeid/code/pycld2/cld2/internal/utf8statetable.cc bindings/README bindings/encodings.cc bindings/gen_enc.py bindings/gen_test.py bindings/pycldmodule.cc bindings/test.py bindings/test_shuffle.py cld2/internal/cld2_do_score.cc cld2/internal/cld2_dynamic_compat.h cld2/internal/cld2_dynamic_data.cc cld2/internal/cld2_dynamic_data.h
That duplicate same files with the normal reltive path in below.
You're correct @Badiboy, it looks like distutils does not
like distutils.util.convert_path()
does not like absolute
paths that are generated in pycld2.egg-info/SOURCES.txt.
When I run ./setup.py sdist
(on Mac OSX), it dumps (some)
absolute paths into pycld2.egg-info/SOURCES.txt, namely
those in pycld2/bindings/.cc and pycld2/cld2/internal/.cc.
I believe this is ironically from adding some path.join()
calls in setup.py, i.e. the specification of src_files
.
After switching to relative paths there, make clean
and
rerunning sdist
generates only relative paths
in pycld2.egg-info/SOURCES.txt
.
Commit is a373919d6f8cff463cd1a625df831d32fb57511f.
@aboSamoor do you mind uploading 0.42 to PyPI?
Or, you can add me as a maintainer at https://pypi.org/manage/project/pycld2/collaboration/. (My username there is bsolomon1124 also.) A maintainer can upload releases for a package. but can't add other collaborators, delete files, releases, or the project.
Just a reminder to update the pypi release, the latest available release on pypi is still 0.41, which doesn't install on Windows.
hi, im also having this issue. A pypi update would be greatly appreciated.
@aboSamoor I believe several of the open issues should be solved by uploading version 0.42 to PyPI, but the latest version there is 0.41. I do not have access to do that; would you be willing to do so or to give access via PyPI?
Same here, any workaround? @bsolomon1124 @aboSamoor @witzatom @alexkillen
Any updates to this bug? Any workarounds?
Just download the repository. Extract it. Open up cmd as admin. Navigate to the extracted folder. And run setup.py install