11

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.

I tried dropping this file into the site-packages\pip\_vendor\pep517 directly, with no change.

The traceback 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'
1
  • 2
    This is a known bug with pip 20 version, virtualenv and setuptools (even 47 version). The easiest solution would be downgrade pip to 19 version. :( referer: github.com/pypa/setuptools/issues/1694 Commented Jun 11, 2020 at 8:17

3 Answers 3

6

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
Sign up to request clarification or add additional context in comments.

1 Comment

pip install -U setuptools is more general and seemed to work for me.
0

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.

1 Comment

For completeness....I also had issues with installing "tables" package. The answer at stackoverflow.com/questions/51842961/… fixed this.
-2

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

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.