Apex: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-omtf7yt4-build/

Created on 26 Nov 2019  路  2Comments  路  Source: NVIDIA/apex

I'm running with python3, but when I do pip3 install -v --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" ./ I get

/usr/lib/python3/dist-packages/pip/commands/install.py:212: UserWarning: Disabling all use of wheels due to the use of --build-options / --global-options / --install-options.
  cmdoptions.check_install_build_global(options)
Processing /home/loreto/apex
  Running setup.py (path:/tmp/pip-omtf7yt4-build/setup.py) egg_info for package from file:///home/loreto/apex
    Running command python setup.py egg_info
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-omtf7yt4-build/setup.py", line 5, in <module>
        from pip._internal import main as pipmain
    ModuleNotFoundError: No module named 'pip._internal'
Cleaning up...
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-omtf7yt4-build/
Exception information:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/usr/lib/python3/dist-packages/pip/commands/install.py", line 342, in run
    requirement_set.prepare_files(finder)
  File "/usr/lib/python3/dist-packages/pip/req/req_set.py", line 380, in prepare_files
    ignore_dependencies=self.ignore_dependencies))
  File "/usr/lib/python3/dist-packages/pip/req/req_set.py", line 634, in _prepare_file
    abstract_dist.prep_for_dist()
  File "/usr/lib/python3/dist-packages/pip/req/req_set.py", line 129, in prep_for_dist
    self.req_to_install.run_egg_info()
  File "/usr/lib/python3/dist-packages/pip/req/req_install.py", line 439, in run_egg_info
    command_desc='python setup.py egg_info')
  File "/usr/lib/python3/dist-packages/pip/utils/__init__.py", line 725, in call_subprocess
    % (command_desc, proc.returncode, cwd))
pip.exceptions.InstallationError: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-omtf7yt4-build/

so when to force "python setup.py egg_info" to be "python3 setup.py egg_info"

Most helpful comment

The only solution was re-installing pip from scrach:

curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python3 get-pip.py --force-reinstall
cd apex/
sudo pip3 install .

All 2 comments

[UPDATE]
I have tried to update python alternatives so that python now points to python3:

$ pip3 --version
pip 9.0.1 from /usr/lib/python3/dist-packages (python 3.6)
$ python3 -m pip --version
pip 9.0.1 from /usr/lib/python3/dist-packages (python 3.6)
$ python3 --version
Python 3.6.9
$ python --version
Python 3.6.9

but I get the same error: pip.exceptions.InstallationError: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-1fxihlyu-build/

The only solution was re-installing pip from scrach:

curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python3 get-pip.py --force-reinstall
cd apex/
sudo pip3 install .
Was this page helpful?
0 / 5 - 0 ratings

Related issues

michaelklachko picture michaelklachko  路  4Comments

ccoulombe picture ccoulombe  路  3Comments

lemonhu picture lemonhu  路  3Comments

Data-drone picture Data-drone  路  4Comments

Hecmay picture Hecmay  路  4Comments