Skip to content

Instantly share code, notes, and snippets.

@void-elf
Created January 27, 2017 17:35
Show Gist options
  • Select an option

  • Save void-elf/a4be79d656e08e5066ee24d78df2c0cb to your computer and use it in GitHub Desktop.

Select an option

Save void-elf/a4be79d656e08e5066ee24d78df2c0cb to your computer and use it in GitHub Desktop.
No module `six.moves` & other problems on CentOS 6.6

pip's -U option is causing some problems when setting up the certbot developer environment on CentOS 6.8.

Here's what happened (edited to be less text):

[demo@yom-centos-512mb-sfo2-01 test]$ git clone git@github.com:ynasser/certbot.git
[demo@yom-centos-512mb-sfo2-01 test]$ cd certbot/
[demo@yom-centos-512mb-sfo2-01 certbot]$ ./letsencrypt-auto-source/letsencrypt-auto --os-packages-only
OS packages installed.
[demo@yom-centos-512mb-sfo2-01 certbot]$ ./tools/venv.sh
+ command -v python2
/usr/bin/python2
+ export 'VENV_ARGS=--python python2'
+ VENV_ARGS='--python python2'
+ ./tools/_venv_common.sh -e 'acme[dev]' -e '.[dev,docs]' -e certbot-apache -e certbot-nginx -e letshelp-certbot -e certbot-compatibility-test
+ VENV_NAME=venv
+ rm -rf '*.egg-info'
++ date +%s
+ mv venv venv.1485537029.bak
mv: cannot stat `venv': No such file or directory
+ true
+ virtualenv --no-site-packages venv --python python2
Running virtualenv with interpreter /usr/bin/python2
New python executable in venv/bin/python2
Also creating executable in venv/bin/python
Installing Setuptools..............................................................................................................................................................................................................................done.
Installing Pip.....................................................................................................................................................................................................................................................................................................................................done.
+ . ./venv/bin/activate
++ deactivate nondestructive
++ unset pydoc
++ '[' -n '' ']'
++ '[' -n '' ']'
++ '[' -n /bin/sh -o -n '' ']'
++ hash -r
++ '[' -n '' ']'
++ unset VIRTUAL_ENV
++ '[' '!' nondestructive = nondestructive ']'
++ VIRTUAL_ENV=/home/demo/test/certbot/venv
++ export VIRTUAL_ENV
++ _OLD_VIRTUAL_PATH=/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/demo/bin
++ PATH=/home/demo/test/certbot/venv/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/demo/bin
++ export PATH
++ '[' -n '' ']'
++ '[' -z '' ']'
++ _OLD_VIRTUAL_PS1=
++ '[' x '!=' x ']'
+++ basename /home/demo/test/certbot/venv
++ '[' venv = __ ']'
+++ basename /home/demo/test/certbot/venv
++ PS1='(venv)'
++ export PS1
++ alias 'pydoc=python -m pydoc'
++ '[' -n /bin/sh -o -n '' ']'
++ hash -r
+ pip install -U setuptools
Downloading/unpacking setuptools from https://pypi.python.org/packages/e3/6b/bb793ca610f364d1888b9bd7b83dccd0c27d779e4fd91a953ce8bae74996/setuptools-34.0.2.zip#md5=8e33d59407b6714e4e97274da538d08f
  Downloading setuptools-34.0.2.zip (617kB): 617kB downloaded
  Running setup.py egg_info for package setuptools
    Traceback (most recent call last):
      File "<string>", line 3, in <module>
      File "setuptools/__init__.py", line 10, in <module>
        from six.moves import filter, map
    ImportError: No module named six.moves
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

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

  File "setuptools/__init__.py", line 10, in <module>

    from six.moves import filter, map

ImportError: No module named six.moves

----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /home/demo/test/certbot/venv/build/setuptools
Storing complete log in /home/demo/.pip/pip.log

I then modified tools/_venv_common.sh to use pip install setuptools instead of pip install -U setuptools, and everything worked. Before removing the -U, I tried manually adding pip install six, but that just resulted in:

+ pip install -U setuptools
Downloading/unpacking setuptools from https://pypi.python.org/packages/e3/6b/bb793ca610f364d1888b9bd7b83dccd0c27d779e4fd91a953ce8bae74996/setuptools-34.0.2.zip#md5=8e33d59407b6714e4e97274da538d08f
  Downloading setuptools-34.0.2.zip (617kB): 617kB downloaded
  Running setup.py egg_info for package setuptools
    Traceback (most recent call last):
      File "<string>", line 3, in <module>
      File "setuptools/__init__.py", line 12, in <module>
        import setuptools.version
      File "setuptools/version.py", line 1, in <module>
        import pkg_resources
      File "pkg_resources/__init__.py", line 70, in <module>
        import packaging.version
    ImportError: No module named packaging.version
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

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

  File "setuptools/__init__.py", line 12, in <module>

    import setuptools.version

  File "setuptools/version.py", line 1, in <module>

    import pkg_resources

  File "pkg_resources/__init__.py", line 70, in <module>

    import packaging.version

ImportError: No module named packaging.version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment