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 GitHub - galaxyproject/galaxy: Data intensive science for everyone.
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:

sh run.sh

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/setup.py'"'"'; __file__='"'"'/tmp/pip-install-g6p0egwj/bagit/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\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 https://pypi.python.org/simple/setuptools_scm/: hostname 'webproxy-na.dupont.com' doesn't match either of 'www.python.org', 'docs.python.org', 'bugs.python.org', 'wiki.python.org', 'hg.python.org', 'mail.python.org', 'pypi.python.org', 'packaging.python.org', 'login.python.org', 'discuss.python.org', 'us.pycon.org', 'pypi.io', 'docs.pypi.io', 'pypi.org', 'docs.pypi.org', 'donate.pypi.org', 'devguide.python.org', 'www.bugs.python.org', 'python.org' -- Some packages may not be found!
    Download error on https://pypi.python.org/simple/setuptools-scm/: hostname 'webproxy-na.dupont.com' doesn't match either of 'www.python.org', 'docs.python.org', 'bugs.python.org', 'wiki.python.org', 'hg.python.org', 'mail.python.org', 'pypi.python.org', 'packaging.python.org', 'login.python.org', 'discuss.python.org', 'us.pycon.org', 'pypi.io', 'docs.pypi.io', 'pypi.org', 'docs.pypi.org', 'donate.pypi.org', 'devguide.python.org', 'www.bugs.python.org', 'python.org' -- Some packages may not be found!
    Couldn't find index page for 'setuptools_scm' (maybe misspelled?)
    Download error on https://pypi.python.org/simple/: hostname 'webproxy-na.dupont.com' doesn't match either of 'www.python.org', 'docs.python.org', 'bugs.python.org', 'wiki.python.org', 'hg.python.org', 'mail.python.org', 'pypi.python.org', 'packaging.python.org', 'login.python.org', 'discuss.python.org', 'us.pycon.org', 'pypi.io', 'docs.pypi.io', 'pypi.org', 'docs.pypi.org', 'donate.pypi.org', 'devguide.python.org', 'www.bugs.python.org', 'python.org' -- 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/setup.py", line 78, in <module>
        "Programming Language :: Python :: 3.6",
      File "/usr/local/lib/python3.5/distutils/core.py", line 108, in setup
        _setup_distribution = dist = klass(attrs)
      File "/disk2/Users/FLIR/Galaxy/galaxy/.venv/lib/python3.5/site-packages/setuptools/dist.py", line 239, in __init__
        self.fetch_build_eggs(attrs.pop('setup_requires'))
      File "/disk2/Users/FLIR/Galaxy/galaxy/.venv/lib/python3.5/site-packages/setuptools/dist.py", line 264, in fetch_build_eggs
        replace_conflicting=True
      File "/disk2/Users/FLIR/Galaxy/galaxy/.venv/lib/python3.5/site-packages/pkg_resources.py", 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/pkg_resources.py", 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/pkg_resources.py", line 830, in obtain
        return installer(requirement)
      File "/disk2/Users/FLIR/Galaxy/galaxy/.venv/lib/python3.5/site-packages/setuptools/dist.py", 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/easy_install.py", 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 setup.py 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