Installation problem: module SourceDistribution

I am trying to install ironwood.master on an ubuntu 16.04 ec2 instance (t2.large and 100Gb of storage has been set)

I am using these instructions and they have always worked in the past

For step 3

wget https://raw.githubusercontent.com/edx/configuration/$OPENEDX_RELEASE/util/install/ansible-bootstrap.sh -O - | sudo bash`

I keep getting this error:

xenial-common
Traceback (most recent call last):
File "util/balancecontainers.py", line 7, in <module>
from six.moves import range
ImportError: No module named six.moves
pip install -qr pre-requirements.txt --exists-action w
Traceback (most recent call last):
File "/tmp/bootstrap/bin/pip", line 11, in <module>
sys.exit(main())
File "/tmp/bootstrap/local/lib/python2.7/site-packages/pip/_internal/cli/main.py", line 73, in main
command = create_command(cmd_name, isolated=("--isolated" in cmd_args))
File "/tmp/bootstrap/local/lib/python2.7/site-packages/pip/_internal/commands/__init__.py", line 96, in create_command
module = importlib.import_module(module_path)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/tmp/bootstrap/local/lib/python2.7/site-packages/pip/_internal/commands/install.py", line 24, in <module>
from pip._internal.cli.req_command import RequirementCommand
File "/tmp/bootstrap/local/lib/python2.7/site-packages/pip/_internal/cli/req_command.py", line 20, in <module>
from pip._internal.operations.prepare import RequirementPreparer
File "/tmp/bootstrap/local/lib/python2.7/site-packages/pip/_internal/operations/prepare.py", line 16, in <module>
from pip._internal.distributions import (
File "/tmp/bootstrap/local/lib/python2.7/site-packages/pip/_internal/distributions/__init__.py", line 1, in <module>
from pip._internal.distributions.source import SourceDistribution
ImportError: cannot import name SourceDistribution
Makefile:20: recipe for target 'requirements' failed
make: *** [requirements] Error 1

Any idea whats going on?

This looks like somehow your pip has been twisted up somehow. Install the version of pip that Ironwood wants (9.0.3).

Looks like pip 20.0 (just released) has this issue: https://github.com/pypa/pip/issues/7217#issuecomment-576649933

This seems to have sorted this issue - not 100% sure though

here are the commands used for reference:

sudo apt-get install python-pip

sudo pip install pip==9.0.3

You may need to add the pip repo

This has since been fixed in pip 20.0.1, released a couple of hours after the 20.0 release.

1 Like