trailofbits / algo

Set up a personal VPN in the cloud
https://blog.trailofbits.com/2016/12/12/meet-algo-the-vpn-that-works/
GNU Affero General Public License v3.0
28.65k stars 2.31k forks source link

ImportError: No module named six.moves #315

Closed yogsototh closed 7 years ago

yogsototh commented 7 years ago

OS / Environment

uname -a
Linux scw-cb223f 4.5.1-std-1 #1 SMP Mon Apr 18 19:58:58 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

Ansible version

ansible wasn't installed first. And I still have the same problem after installing it.

ansible --version
ansible 1.5.4

Version of components from requirements.txt

can't install ansible, and also by default six is not installed. While apparently required for setuptools which appear to be already installed.

> pip show setuptools
---
Name: setuptools
Version: 34.3.3
Location: /root/algo/algo-master/env/lib/python2.7/site-packages
Requires: appdirs, six, packaging
> pip show ansible
>
 pip install ansible
Downloading/unpacking ansible
  Downloading ansible-2.2.2.0.tar.gz (2.5MB): 2.5MB downloaded
Cleaning up...
setuptools must be installed to install from a source distribution
Storing debug log for failure in /root/.pip/pip.log
(env)root@scw-cb223f:~/algo/algo-master# pip install setuptools
Requirement already satisfied (use --upgrade to upgrade): setuptools in ./env/lib/python2.7/site-packages
Cleaning up...

Summary of the problem

While following the install instructions the build fail. (See logs)

Steps to reproduce the behavior

follow the instruction on README on a scaleway machine.

The way of deployment (cloud or local)

cloud

Expected behavior

Should have built algo

Actual behavior

Build failed

Full log

The error log (sorry I couldn't get the full one)

Downloading/unpacking pycparser (from cffi>=1.4.1->cryptography>=1.3.4->pyopenssl->-r requirements.txt (line 10))
  Downloading pycparser-2.17.tar.gz (231kB): 231kB downloaded
  Running setup.py (path:/root/algo/algo-master/env/build/pycparser/setup.py) egg_info for package pycparser

    warning: no previously-included files matching 'yacctab.*' found under directory 'tests'
    warning: no previously-included files matching 'lextab.*' found under directory 'tests'
    warning: no previously-included files matching 'yacctab.*' found under directory 'examples'
    warning: no previously-included files matching 'lextab.*' found under directory 'examples'
Installing collected packages: setuptools, ansible, dopy, boto, boto3, azure, msrest, apache-libcloud, six, pyopenssl, jinja2, appdirs, packaging, paramiko, PyYAML, pycrypto, requests, botocore, jmespath, s3transfer, azure-mgmt, azure-servicebus, azure-graphrbac, azure-storage, azure-servicemanagement-legacy, azure-batch, requests-oauthlib, keyring, chardet, enum34, certifi, isodate, cryptography, MarkupSafe, pyparsing, pyasn1, docutils, python-dateutil, futures, azure-mgmt-logic, azure-mgmt-powerbiembedded, azure-mgmt-commerce, azure-mgmt-web, azure-mgmt-storage, azure-mgmt-authorization, azure-mgmt-network, azure-mgmt-compute, azure-mgmt-batch, azure-mgmt-notificationhubs, azure-mgmt-resource, azure-mgmt-cognitiveservices, azure-mgmt-redis, azure-mgmt-scheduler, azure-mgmt-cdn, azure-mgmt-keyvault, azure-common, azure-nspkg, oauthlib, secretstorage, idna, asn1crypto, ipaddress, cffi, azure-mgmt-nspkg, pycparser
  Found existing installation: setuptools 2.2
    Uninstalling setuptools:
      Successfully uninstalled setuptools
  Running setup.py install for ansible
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/root/algo/algo-master/env/local/lib/python2.7/site-packages/setuptools/__init__.py", line 10, in <module>
        from six.moves import filter, map
    ImportError: No module named six.moves
    Complete output from command /root/algo/algo-master/env/bin/python -c "import setuptools, tokenize;__file__='/root/algo/algo-master/env/build/ansible/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-ip7N7t-record/install-record.txt --single-version-externally-managed --compile --install-headers /root/algo/algo-master/env/include/site/python2.7:
    Traceback (most recent call last):

  File "<string>", line 1, in <module>

  File "/root/algo/algo-master/env/local/lib/python2.7/site-packages/setuptools/__init__.py", line 10, in <module>

    from six.moves import filter, map

ImportError: No module named six.moves

----------------------------------------
Cleaning up...
Command /root/algo/algo-master/env/bin/python -c "import setuptools, tokenize;__file__='/root/algo/algo-master/env/build/ansible/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-ip7N7t-record/install-record.txt --single-version-externally-managed --compile --install-headers /root/algo/algo-master/env/include/site/python2.7 failed with error code 1 in /root/algo/algo-master/env/build/ansible
Storing debug log for failure in /root/.pip/pip.log
dguido commented 7 years ago

Potentially related to #290

dguido commented 7 years ago

What is scaleway?

dguido commented 7 years ago

Ah I see, yet another cloud hosting provider. What version of Ubuntu are you using?

jackivanov commented 7 years ago

@yogsototh Did you follow the exact steps from the readme?

yogsototh commented 7 years ago

@gunph1ld yes it failed on step 4. @dguido I don't really know. I just have the uname: Linux scw-cb223f 4.5.1-std-1 #1 SMP Mon Apr 18 19:58:58 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

mxi1 commented 7 years ago

For this specific issue, you need to install the "six" package by running "pip install six" manually.

jackivanov commented 7 years ago

@yogsototh Did the workaround above help?