pip install is unable to build dependencies, failing at setup.py egg_info

Question:

Earlier I was trying to install jupyter notebook when I first time saw this type of error, but when I tried opening jupyter notebook from command prompt, Inspite of error, it was working fine. So, I ignored it. But, now it is not even installing pandas. I tried installing unroll, but it showed the same type of error. I have also tried installing using pip3 instead of pip.

C:Userskumar>pip install unroll
Collecting unroll
Using cached unroll-0.1.0.tar.gz (7.3 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [32 lines of output]
  Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.14.tar.gz
  Traceback (most recent call last):
    File "C:msys64mingw64libpython3.9site-packagesez_setup.py", line 143, in use_setuptools
      raise ImportError
  ImportError

  During handling of the above exception, another exception occurred:

  Traceback (most recent call last):
    File "<string>", line 2, in <module>
    File "<pip-setuptools-caller>", line 34, in <module>
    File "C:UserskumarAppDataLocalTemppip-install-6homm6dqunroll_6700898ee7fe4673888ca58fbca3ae45setup.py", line 2, in <module>
      ez_setup.use_setuptools()
    File "C:msys64mingw64libpython3.9site-packagesez_setup.py", line 145, in use_setuptools
      return _do_download(version, download_base, to_dir, download_delay)
    File "C:msys64mingw64libpython3.9site-packagesez_setup.py", line 123, in _do_download
      tarball = download_setuptools(version, download_base,
    File "C:msys64mingw64libpython3.9site-packagesez_setup.py", line 193, in download_setuptools
      src = urlopen(url)
    File "C:msys64mingw64libpython3.9urllibrequest.py", line 214, in urlopen
      return opener.open(url, data, timeout)
    File "C:msys64mingw64libpython3.9urllibrequest.py", line 523, in open
      response = meth(req, response)
    File "C:msys64mingw64libpython3.9urllibrequest.py", line 632, in http_response
      response = self.parent.error(
    File "C:msys64mingw64libpython3.9urllibrequest.py", line 561, in error
      return self._call_chain(*args)
    File "C:msys64mingw64libpython3.9urllibrequest.py", line 494, in _call_chain
      result = func(*args)
    File "C:msys64mingw64libpython3.9urllibrequest.py", line 641, in http_error_default
      raise HTTPError(req.full_url, code, msg, hdrs, fp)
  urllib.error.HTTPError: HTTP Error 403: SSL is required
  [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.






C:Userskumar>pip install pandas
Collecting pandas
Using cached pandas-1.4.3.tar.gz (4.9 MB)
Installing build dependencies ... error
error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> [71 lines of output]
  Collecting setuptools>=51.0.0
    Using cached setuptools-62.6.0-py3-none-any.whl (1.2 MB)
  Collecting wheel
    Using cached wheel-0.37.1-py2.py3-none-any.whl (35 kB)
  Collecting Cython<3,>=0.29.24
    Using cached Cython-0.29.30-py2.py3-none-any.whl (985 kB)
  Collecting oldest-supported-numpy>=0.10
    Using cached oldest_supported_numpy-2022.5.28-py3-none-any.whl (3.9 kB)
  Collecting numpy==1.19.3
    Using cached numpy-1.19.3.zip (7.3 MB)
    Installing build dependencies: started
    Installing build dependencies: finished with status 'done'
    Getting requirements to build wheel: started
    Getting requirements to build wheel: finished with status 'error'
    error: subprocess-exited-with-error

    Getting requirements to build wheel did not run successfully.
    exit code: 1

    [40 lines of output]
    Traceback (most recent call last):
      File "C:UserskumarAppDataLocalTemptmp6grceh36_in_process.py", line 363, in <module>
        main()
      File "C:UserskumarAppDataLocalTemptmp6grceh36_in_process.py", line 345, in main
        json_out['return_val'] = hook(**hook_input['kwargs'])
      File "C:UserskumarAppDataLocalTemptmp6grceh36_in_process.py", line 124, in get_requires_for_build_wheel
        backend = _build_backend()
      File "C:UserskumarAppDataLocalTemptmp6grceh36_in_process.py", line 89, in _build_backend
        obj = import_module(mod_path)
      File "C:msys64mingw64libpython3.9importlib__init__.py", line 127, in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
      File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
      File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
      File "<frozen importlib._bootstrap>", line 972, in _find_and_load_unlocked
      File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
      File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
      File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
      File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
      File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
      File "<frozen importlib._bootstrap_external>", line 850, in exec_module
      File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
      File "C:UserskumarAppDataLocalTemppip-build-env-888p6dt5overlaylibpython3.9site-packagessetuptools__init__.py", line 253, in <module>
        monkey.patch_all()
      File "C:UserskumarAppDataLocalTemppip-build-env-888p6dt5overlaylibpython3.9site-packagessetuptoolsmonkey.py", line 101, in patch_all
        patch_for_msvc_specialized_compiler()
      File "C:UserskumarAppDataLocalTemppip-build-env-888p6dt5overlaylibpython3.9site-packagessetuptoolsmonkey.py", line 164, in patch_for_msvc_specialized_compiler
        patch_func(*msvc9('find_vcvarsall'))
      File "C:UserskumarAppDataLocalTemppip-build-env-888p6dt5overlaylibpython3.9site-packagessetuptoolsmonkey.py", line 151, in patch_params
        mod = import_module(mod_name)
      File "C:msys64mingw64libpython3.9importlib__init__.py", line 127, in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
      File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
      File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
      File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
      File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
      File "<frozen importlib._bootstrap_external>", line 850, in exec_module
      File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
      File "C:UserskumarAppDataLocalTemppip-build-env-888p6dt5overlaylibpython3.9site-packagessetuptools_distutilsmsvc9compiler.py", line 295, in <module>
        raise DistutilsPlatformError("VC %0.1f is not supported by this module" % VERSION)
    distutils.errors.DistutilsPlatformError: VC 6.0 is not supported by this module
    [end of output]

    note: This error originates from a subprocess, and is likely not a problem with pip.
  error: subprocess-exited-with-error

  Getting requirements to build wheel did not run successfully.
  exit code: 1

  See above for output.

  note: This error originates from a subprocess, and is likely not a problem with pip.
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

I don’t know why pip suddenly stopped working, I have already tried updating pip to latest version, which shows requirement already satisfied. I have also tried installing latest version of ez-setup, setup tools and wheel.

C:Userskumar>pip list
Package    Version
---------- -------
ez-setup   0.9
pip        22.1.2
setuptools 62.6.0
wheel      0.37.1
Asked By: ANIKET KUMAR

||

Answers:

Ok, I tried to update visual studio but the update was failing again and again at a particular point. Later on, I did a windows reset and this time, all the packages that I installed after reset are working and are getting listed under pip list, I was also able to download pandas. I think since mysys also contains a python, when I installed mysys for c++, mysys automatically installed a python 3.10 on my computer and which caused the contradiction, since both python were of different versions, my pc started using pip which came along with mysys, earlier I didn’t realise this because I didn’t knew much about working of pip other than basic installation command, I thought pip list doesn’t shows manually installed packages, until now when I ran pip list after resetting pc.

C:Userskumar>pip list
Package              Version
-------------------- -----------
argon2-cffi          21.3.0
argon2-cffi-bindings 21.2.0
asttokens            2.0.5
attrs                22.1.0
backcall             0.2.0
beautifulsoup4       4.11.1
bleach               5.0.1
certifi              2022.6.15
cffi                 1.15.1
charset-normalizer   2.1.0
colorama             0.4.5
cycler               0.11.0
debugpy              1.6.2
decorator            5.1.1
defusedxml           0.7.1
entrypoints          0.4
executing            0.9.1
fastjsonschema       2.16.1
fonttools            4.34.4
idna                 3.3
ipykernel            6.15.1
ipython              8.4.0
ipython-genutils     0.2.0
ipywidgets           7.7.1
jedi                 0.18.1
Jinja2               3.1.2
joblib               1.1.0
jsonschema           4.8.0
jupyter              1.0.0
jupyter-client       7.3.4
jupyter-console      6.4.4
jupyter-core         4.11.1
jupyterlab-pygments  0.2.2
jupyterlab-widgets   1.1.1
kiwisolver           1.4.4
MarkupSafe           2.1.1
matplotlib           3.5.2
matplotlib-inline    0.1.3
mistune              0.8.4
nbclient             0.6.6
nbconvert            6.5.0
nbformat             5.4.0
nest-asyncio         1.5.5
notebook             6.4.12
numpy                1.23.1
packaging            21.3
pandas               1.4.3
pandocfilters        1.5.0
parso                0.8.3
pickleshare          0.7.5
Pillow               9.2.0
pip                  22.2
prometheus-client    0.14.1
prompt-toolkit       3.0.30
psutil               5.9.1
pure-eval            0.2.2
pycparser            2.21
Pygments             2.12.0
pyparsing            3.0.9
pyrsistent           0.18.1
python-dateutil      2.8.2
pytz                 2022.1
pywin32              304
pywinpty             2.0.6
pyzmq                23.2.0
qtconsole            5.3.1
QtPy                 2.1.0
requests             2.28.1
scikit-learn         1.1.1
scipy                1.9.0
Send2Trash           1.8.0
setuptools           56.0.0
six                  1.16.0
soupsieve            2.3.2.post1
stack-data           0.3.0
terminado            0.15.0
threadpoolctl        3.1.0
tinycss2             1.1.1
tornado              6.2
tqdm                 4.64.0
traitlets            5.3.0
urllib3              1.26.11
wcwidth              0.2.5
webencodings         0.5.1
widgetsnbextension   3.6.1

As you can see, the pip list I posted above in question, contains almost no packages, whereas I already had numpy, scikit-learn, requests, selenium and other few packages installed.
For any newbie out there, first of all check if by chance your pc has two different versions of python, cause for me that was the reason for error.
I would like to thank everyone for spending their time to help me out.

Answered By: ANIKET KUMAR
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.