error: unrecognized arguments: egg_info --egg-base /tmp/pip-pip-egg-info-nx929i7g

On Ubuntu 20.04.3 LTS, I try to create a virtualenv for ariadne, but failed. For more details, see the following steps and errors:

$ git clone
$ cd ariadne

$ virtualenv venv
created virtual environment in 244ms
  creator CPython3Posix(dest=/home/werner/Public/repo/, clear=False, global=False)
  seeder FromAppData(download=False, pip=latest, setuptools=latest, wheel=latest, pkg_resources=latest, via=copy, app_data_dir=/home/werner/.local/share/virtualenv/seed-app-data/v1.0.1.debian.1)
  activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator

$ venv/bin/pip install -U pip
Looking in indexes:
Collecting pip
  Using cached (2.1 MB)
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 20.0.2
    Uninstalling pip-20.0.2:
      Successfully uninstalled pip-20.0.2
Successfully installed pip-22.0.3

$ venv/bin/pip install -e .
Looking in indexes:
Obtaining file:///home/werner/Public/repo/
  Preparing metadata ( ... error
  error: subprocess-exited-with-error
  × python egg_info did not run successfully.
  │ exit code: 2
  ╰─> [2 lines of output]
      usage: [-h] [-z] [-b] [-f] error: unrecognized arguments: egg_info --egg-base /tmp/pip-pip-egg-info-nx929i7g
      [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.

Any hints for fixing this problem will be highly appreciated.


First, make sure you activate your environment with source venv/bin/activate (assuming the structure is the same as with the stdlib venv, then update pip and try your install command again. If it still doesn’t work, as you can see from the error messages,


The issue is likely not with pip, but with the configuration (perhaps in the, setup.cfg or pyproject.toml) of the package you’re trying to install.

The project has a handcrafted, not the one pip install expects and it doesn’t accept arguments pip thinks it should.

To make a package pip install'able, please follow the packaging guide.

1 Like

@frostming Is there a quick fix for this problem?


You need to pickup a build backend and then follow their instructions. For example in your you seem to already have some code for setuptools, so you can decide to uncomment that bit.

However the customised install that modifies the user home directories is not something any backend supports (to be my best knowledge). So I would implement that as a second installation step asking the user to run a CLI command you provide in your package (e.g. ariadne install).

To add such command you can use a console_scripts entry-point.

As recommended by Frostming, please have a look on the Packaging tutorial, the structure of the package is fairly unconventional and it might not play well with the other Python tools, such as pip.

Thank you all for your help. Finally, the following steps solve this problem using this

$ git clone
$ cd ariadne
$ virtualenv venv 
$ venv/bin/pip install -U pip
$ venv/bin/pip install -e .