Skip to main content

calamari initialize on ubuntu 14.04: ImportError: No module named _io

After installing calamari on Ubuntu 14.04 trusty I run initialize script but got the following error:

#calamari-ctl initialize
Traceback (most recent call last):
File "/usr/bin/calamari-ctl", line 9, in 
load_entry_point('calamari-cthulhu==0.1', 'console_scripts', 'calamari-ctl')()
File "/opt/calamari/venv/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/pkg_resources.py", line 337, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/opt/calamari/venv/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/pkg_resources.py", line 2279, in load_entry_point
return ep.load()
File "/opt/calamari/venv/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/pkg_resources.py", line 1989, in load
entry = __import__(self.module_name, globals(),globals(), ['__name__'])
File "/opt/calamari/venv/local/lib/python2.7/site-packages/calamari_cthulhu-0.1-py2.7.egg/cthulhu/calamari_ctl.py", line 6, in 
import tempfile
File "/usr/lib/python2.7/tempfile.py", line 32, in 
import io as _io
File "/usr/lib/python2.7/io.py", line 51, in 
import _io
ImportError: No module named _io

To fix:

# mv /opt/calamari/venv/local/bin/python /opt/calamari/venv/local/bin/pythonOLD
# cp /usr/bin/python2.7 /opt/calamari/venv/local/bin/python

And then:

# calamari-ctl initialize
[INFO] Loading configuration..
[INFO] Starting/enabling salt...
[INFO] Starting/enabling postgres...
[INFO] Initializing database...
[INFO] Initializing web interface...
[INFO] You will now be prompted for login details for the administrative user account. This is the account you will use to log into the web interface once setup is complete.
Username (leave blank to use 'root'):
Email address: user@domain
Password:
Password (again):
Superuser created successfully.
[INFO] Starting/enabling services...
[INFO] Restarting services...
[INFO] Complete.

3 thoughts to “calamari initialize on ubuntu 14.04: ImportError: No module named _io”

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.