Reputation: 846
I'm having trouble figuring this one out -- when trying to install a package (zipline in this case), it's struggling to find the setuptools.build_meta file, which I DO HAVE in the site-packages\setuptools directory. As ignorant as I am, I tried dropping this file into the site-packages\pip_vendor\pep517 directly with no change. I'm sure this is simple, but I'm not seeing it. Any help would be appreciated! The trace back is below.
ERROR: Exception:
Traceback (most recent call last):
File "C:\Users\justjo\PycharmProjects\python35_venv\lib\site-packages\pip\_internal\cli\base_command.py", line 186, in _main
status = self.run(options, args)
File "C:\Users\justjo\PycharmProjects\python35_venv\lib\site-packages\pip\_internal\commands\install.py", line 331, in run
resolver.resolve(requirement_set)
File "C:\Users\justjo\PycharmProjects\python35_venv\lib\site-packages\pip\_internal\legacy_resolve.py", line 177, in resolve
discovered_reqs.extend(self._resolve_one(requirement_set, req))
File "C:\Users\justjo\PycharmProjects\python35_venv\lib\site-packages\pip\_internal\legacy_resolve.py", line 333, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File "C:\Users\justjo\PycharmProjects\python35_venv\lib\site-packages\pip\_internal\legacy_resolve.py", line 282, in _get_abstract_dist_for
abstract_dist = self.preparer.prepare_linked_requirement(req)
File "C:\Users\justjo\PycharmProjects\python35_venv\lib\site-packages\pip\_internal\operations\prepare.py", line 516, in prepare_linked_requirement
req, self.req_tracker, self.finder, self.build_isolation,
File "C:\Users\justjo\PycharmProjects\python35_venv\lib\site-packages\pip\_internal\operations\prepare.py", line 95, in _get_prepared_distribution
abstract_dist.prepare_distribution_metadata(finder, build_isolation)
File "C:\Users\justjo\PycharmProjects\python35_venv\lib\site-packages\pip\_internal\distributions\sdist.py", line 38, in prepare_distribution_metadata
self._setup_isolation(finder)
File "C:\Users\justjo\PycharmProjects\python35_venv\lib\site-packages\pip\_internal\distributions\sdist.py", line 96, in _setup_isolation
reqs = backend.get_requires_for_build_wheel()
File "C:\Users\justjo\PycharmProjects\python35_venv\lib\site-packages\pip\_vendor\pep517\wrappers.py", line 152, in get_requires_for_build_wheel
'config_settings': config_settings
File "C:\Users\justjo\PycharmProjects\python35_venv\lib\site-packages\pip\_vendor\pep517\wrappers.py", line 255, in _call_hook
raise BackendUnavailable(data.get('traceback', ''))
pip._vendor.pep517.wrappers.BackendUnavailable: Traceback (most recent call last):
File "C:\Users\justjo\PycharmProjects\python35_venv\lib\site-packages\pip\_vendor\pep517\_in_process.py", line 63, in _build_backend
obj = import_module(mod_path)
File "C:\Program Files\Python35\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 985, in _gcd_import
File "<frozen importlib._bootstrap>", line 968, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
ImportError: No module named 'setuptools.build_meta'
Upvotes: 4
Views: 12352
Reputation: 366
I resolved it by upgrading setuptools version to the latest:
sudo /usr/bin/python3.9 /usr/bin/pip3 install setuptools==58.0.4
Other versions:
/usr/bin/python3.9 /usr/bin/pip3 --version
pip 20.0.2 from /usr/lib/python3.9/dist-packages/pip (python 3.9)
/usr/bin/python3.9 --version
Python 3.9.5
lsb_release -d
Description: Ubuntu 20.04.2 LTS
uname -srvi
Linux 4.4.0-19041-Microsoft #1237-Microsoft Sat Sep 11 14:32:00 PST 2021 x86_64
Upvotes: 1
Reputation: 22
In my case, i downgraded my pip version to 9.0.1 using python -m pip install pip==9.0.1
and it worked for me
Upvotes: -2
Reputation: 846
So for anyone having the same error I solved this by downloading the package directly and deleting the pyproject.toml file, then cd path\setup.py and "pip install ." in a terminal/cmd.
Upvotes: 0