pip installation fails (pathlib dependency problem)
iulian0512 opened this issue · 1 comments
iulian0512 commented
On win10 and mac osx 11.6.4(big sur) installation because of pathlib, note that pathlib is deprecated and not maintained according to https://pypi.org/project/pathlib/
there is another report on linux see https://bugs.launchpad.net/ubuntu/+source/python-pip/+bug/1962819
i am using
pip 22.0.3
Python 3.9.10
Collecting pathlib
Using cached pathlib-1.0.1.tar.gz (49 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [20 lines of output]
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/private/var/folders/v2/rxxl_sqx5rg_9dwwmxcglydr0000gn/T/pip-install-j5r0q2_g/pathlib_b603c25dee1b4edd8e3b0834fb35ee57/setup.py", line 6, in <module>
setup(
File "/opt/homebrew/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 109, in setup
_setup_distribution = dist = klass(attrs)
File "/opt/homebrew/lib/python3.9/site-packages/setuptools/dist.py", line 456, in __init__
for ep in metadata.entry_points(group='distutils.setup_keywords'):
File "/opt/homebrew/lib/python3.9/site-packages/setuptools/_vendor/importlib_metadata/__init__.py", line 999, in entry_points
return SelectableGroups.load(eps).select(**params)
File "/opt/homebrew/lib/python3.9/site-packages/setuptools/_vendor/importlib_metadata/__init__.py", line 449, in load
ordered = sorted(eps, key=by_group)
File "/opt/homebrew/lib/python3.9/site-packages/setuptools/_vendor/importlib_metadata/__init__.py", line 997, in <genexpr>
dist.entry_points for dist in unique(distributions())
File "/opt/homebrew/lib/python3.9/site-packages/setuptools/_vendor/importlib_metadata/__init__.py", line 609, in entry_points
return EntryPoints._from_text_for(self.read_text('entry_points.txt'), self)
File "/opt/homebrew/lib/python3.9/site-packages/setuptools/_vendor/importlib_metadata/__init__.py", line 917, in read_text
return self._path.joinpath(filename).read_text(encoding='utf-8')
AttributeError: 'PosixPath' object has no attribute 'read_text'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
dhondta commented
Hi @iulian0512 !
Thank you very much for the heads up. Fortunately for me, there exists a fork of pathlib
called pathlib2
.
This should do the trick. Anyway, it passes the tests, at least on Linux.