ERROR: Command errored out with exit status 1: bagit

Before installing my local Galaxy, I did this:

sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update
sudo apt-get install python3.6
sudo apt-get install python3.6-venv
python3.6 -m venv env_python36
source env_python36/bin/activate
pip install --upgrade pip
pip install requests[security]
pip install requests

Suggestion: change the version of setuptools at the requirements’ file.

pip install setuptools –upgrade

mkdir Galaxy
cd Galaxy

Download/copy of directory containing the Galaxy release

git clone -b release_20.01
cd galaxy
cp config/galaxy.yml.sample config/galaxy.yml

Because I got an error during the installation, I fixed the uwsgi:

./.venv/bin/pip uninstall -y uwsgi && ./.venv/bin/pip install --no-cache-dir uwsgi==2.0.17

I ran the command:


Installing the local Galaxy, release 20.01, I got this message at the end of the installation. I already have the bagit installed in my virtual environment.

Collecting bagit==1.7.0

    Using cached bagit-1.7.0.tar.gz (28 kb)
    ERROR: Command errored out with exit status 1:
     command: /disk2/Users/FLIR/Galaxy/galaxy/.venv/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-g6p0egwj/bagit/'"'"'; __file__='"'"'/tmp/pip-install-g6p0egwj/bagit/'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);'"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-g6p0egwj/bagit/pip-egg-info
         cwd: /tmp/pip-install-g6p0egwj/bagit/
    Complete output (26 lines):
    Download error on hostname '' doesn't match either of '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '' -- Some packages may not be found!
    Download error on hostname '' doesn't match either of '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '' -- Some packages may not be found!
    Couldn't find index page for 'setuptools_scm' (maybe misspelled?)
    Download error on hostname '' doesn't match either of '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '' -- Some packages may not be found!
    No local packages or download links found for setuptools-scm
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-g6p0egwj/bagit/", line 78, in <module>
        "Programming Language :: Python :: 3.6",
      File "/usr/local/lib/python3.5/distutils/", line 108, in setup
        _setup_distribution = dist = klass(attrs)
      File "/disk2/Users/FLIR/Galaxy/galaxy/.venv/lib/python3.5/site-packages/setuptools/", line 239, in __init__
      File "/disk2/Users/FLIR/Galaxy/galaxy/.venv/lib/python3.5/site-packages/setuptools/", line 264, in fetch_build_eggs
      File "/disk2/Users/FLIR/Galaxy/galaxy/.venv/lib/python3.5/site-packages/", line 580, in resolve
        dist = best[req.key] = env.best_match(req, ws, installer)
      File "/disk2/Users/FLIR/Galaxy/galaxy/.venv/lib/python3.5/site-packages/", line 818, in best_match
        return self.obtain(req, installer) # try and download/install
      File "/disk2/Users/FLIR/Galaxy/galaxy/.venv/lib/python3.5/site-packages/", line 830, in obtain
        return installer(requirement)
      File "/disk2/Users/FLIR/Galaxy/galaxy/.venv/lib/python3.5/site-packages/setuptools/", line 314, in fetch_build_egg
        return cmd.easy_install(req)
      File "/disk2/Users/FLIR/Galaxy/galaxy/.venv/lib/python3.5/site-packages/setuptools/command/", line 587, in easy_install
        raise DistutilsError(msg)
    distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('setuptools-scm')
ERROR: Command errored out with exit status 1: python egg_info Check the logs for full command output. 

Any suggestion to solve this?
Thank you in advance.

1 Like

I am facing this error. while installing Galaxy on my local virtual machine (Ubuntu 20.4)

1 Like

Sorry for the late reply. It looks like there are 2 problems:

  1. There should be bagit “wheels” on PyPI, but they are (no longer?) there. @nsoranzo do you have any idea what happened here?
  2. pip tried building bagit from source but failed to download setuptools-scm, which exists in PyPI. If this was not a transient issue, is there some proxy or firewall that could be interfering?
1 Like

@ajay.ducs this is a separate issue, it would be best to open a separate help topic for this if you’re still stuck. It looks like your system failed to download the pysam wheel and that’s why it’s trying to build it from source. The first step would be to figure out why it’s not using the wheel (this should not happen for standard Linux or macOS systems using a stable release version of Galaxy).

1 Like