Sinar / sinar.digimon

Digital Rights Incident Reporting
0 stars 1 forks source link

Error running bootstrap buildout - "'NoneType' object has no attribute 'modules'" #10

Open leowmjw opened 8 years ago

leowmjw commented 8 years ago

Now hitting below error; are there any pre-reqs needed?:

(virtualenv) vagrant@precise64:/vagrant$ python ./bootstrap-buildout.py

Downloading https://pypi.python.org/packages/source/s/setuptools/setuptools-20.3.1.zip
Extracting in /tmp/tmp6i8ClD
Now working in /tmp/tmp6i8ClD/setuptools-20.3.1
Building a Setuptools egg in /tmp/bootstrap-poZvdL
warning: no files found matching '*.py' under directory '_markerlib'
warning: no files found matching '*' under directory 'setuptools/_vendor'
/tmp/bootstrap-poZvdL/setuptools-20.3.1-py2.7.egg
Traceback (most recent call last):
  File "./bootstrap-buildout.py", line 117, in <module>
    ez['use_setuptools'](**setup_args)
  File "<string>", line 173, in use_setuptools
  File "<string>", line 132, in _do_download
  File "build/bdist.linux-x86_64/egg/setuptools/__init__.py", line 11, in <module>
  File "build/bdist.linux-x86_64/egg/setuptools/extern/__init__.py", line 1, in <module>
  File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 48, in <module>
  File "/home/vagrant/virtualenv/local/lib/python2.7/site-packages/pkg_resources/extern/__init__.py", line 43, in load_module
    mod = sys.modules[extant]
AttributeError: 'NoneType' object has no attribute 'modules'
kaerumy commented 8 years ago

You will need build tools and some python dev deps.

These are Ubuntu deps.

curl build-essential libbz2-dev libsqlite3-dev zlib1g-dev libxml2-dev libxslt1-dev libreadline-dev libgdbm-dev libxml2 libssl-dev tk-dev libssl-dev tk-dev libncursesw5-dev libjpeg8-dev libpng12-dev zlib1g-dev libsasl2-dev git

leowmjw commented 8 years ago

The root cause remains after applying above suggestion. Apparently it is a fairly recent broken buildout problem as per issues below:

Work around is to peg the setuptools version to match virtualenv setup as per below:

(virtualenv) vagrant@precise64:/vagrant$ pip list | grep setuptools
setuptools (19.6.1)
(virtualenv) vagrant@precise64:/vagrant$ python bootstrap-buildout.py --setuptools-version=19.6.1

To put as note; when using with Python 2.7.