donnemartin / saws

A supercharged AWS command line interface (CLI).
Other
5.24k stars 281 forks source link

Cannot install on OSX 10.9.5 #34

Closed inkel closed 8 years ago

inkel commented 8 years ago

Hi, first of all, amazing idea, I hope I could try it soon!

I'm getting an error when trying to install saws:

$ pip install saws
Collecting saws
  Using cached saws-0.2.1.tar.gz
Collecting awscli>=1.7.46 (from saws)
  Using cached awscli-1.8.6-py2.py3-none-any.whl
Collecting click>=4.0 (from saws)
  Using cached click-5.1-py2.py3-none-any.whl
Collecting configobj>=5.0.6 (from saws)
  Using cached configobj-5.0.6.tar.gz
Collecting enum34>=1.0.4 (from saws)
  Using cached enum34-1.0.4.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "/private/var/folders/f4/_lb074qs3f3cqgl3jnhsc1840000gn/T/pip-build-losha7bj/enum34/enum/__init__.py", line 371, in __getattr__
        return cls._member_map_[name]
    KeyError: '_convert'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "<string>", line 3, in <module>
      File "/usr/local/lib/python3.5/site-packages/setuptools/__init__.py", line 12, in <module>
        from setuptools.extension import Extension
      File "/usr/local/lib/python3.5/site-packages/setuptools/extension.py", line 8, in <module>
        from .dist import _get_unpatched
      File "/usr/local/lib/python3.5/site-packages/setuptools/dist.py", line 16, in <module>
        from setuptools.depends import Require
      File "/usr/local/lib/python3.5/site-packages/setuptools/depends.py", line 6, in <module>
        from setuptools import compat
      File "/usr/local/lib/python3.5/site-packages/setuptools/compat.py", line 45, in <module>
        import http.client as httplib
      File "/usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/lib/python3.5/http/client.py", line 71, in <module>
        import email.parser
      File "/usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/lib/python3.5/email/parser.py", line 12, in <module>
        from email.feedparser import FeedParser, BytesFeedParser
      File "/usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/lib/python3.5/email/feedparser.py", line 27, in <module>
        from email import message
      File "/usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/lib/python3.5/email/message.py", line 16, in <module>
        from email import utils
      File "/usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/lib/python3.5/email/utils.py", line 29, in <module>
        import socket
      File "/usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/lib/python3.5/socket.py", line 73, in <module>
        IntEnum._convert(
      File "/private/var/folders/f4/_lb074qs3f3cqgl3jnhsc1840000gn/T/pip-build-losha7bj/enum34/enum/__init__.py", line 373, in __getattr__
        raise AttributeError(name)
    AttributeError: _convert

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/f4/_lb074qs3f3cqgl3jnhsc1840000gn/T/pip-build-losha7bj/enum34

I'm running OSX 10.9.5, and I've tried with Python 2.7.5 and Python 3.5.0. Thanks.

donnemartin commented 8 years ago

@inkel thanks for the feedback! I'll try to get you up and running.

Are you installing in a virtualenv? This looks very similar to https://github.com/donnemartin/saws/issues/26, where the submitter says it was caused by a 'dirty' environment.

I updated the Pip Installation section recently with a recommendation to use virtualenv to avoid potential issues with dependencies or permissions.

On a somewhat related note, the traceback shows issues with enum34. 59e2b60 changes installation so thatenum34 will only be installed for Python < 3.4. I plan to push this to PyPI later today.

inkel commented 8 years ago

No, I'm doing pip install directly on my console. I'm not a real Python user, so I've no idea how to use virtualenv :disappointed:

donnemartin commented 8 years ago

@inkel: Here are the command lines to run...

Install virtualenv and virtualenvwrapper:

pip install virtualenv
pip install virtualenvwrapper
export WORKON_HOME=~/.virtualenvs
source /usr/local/bin/virtualenvwrapper.sh

Create a SAWS virtualenv and install SAWS:

mkvirtualenv saws
pip install saws

For more details (and for instructions on how to install on Windows using virtualenvwrapper-win), check out this link.

donnemartin commented 8 years ago

@inkel: Please let me know if you continue to have problems with this, closing the issue. Thanks!

inkel commented 8 years ago

I am AFK now, but I'll try later when I'm back home.

Leandro (inkel)

donnemartin commented 8 years ago

No rush :)

confiq commented 8 years ago

On my machine (10.10) I've just use sudo with python 2.7. Its working nice!

inkel commented 8 years ago

I've tried with sudo, but got the same error :(

Leandro (inkel)

inkel commented 8 years ago

@donnemartin I've followed the steps outlined before, and I'm sad to report that I'm still getting the same issue using virtualenv. @confiq using sudo and sudo -H gives me the same error, with or without virtualenv.

donnemartin commented 8 years ago

@inkel odd, not sure why you're still having trouble installing enum34 in a fresh virtualenv.

Based on your logs it seems you're using Python 3.5. Commit f109bc8f534905797ee44239cb766ea3de4ceb5d should help. It removes the enum34 dependency for Python 3.4 and above. I haven't pushed that to PyPI yet so you can't do the following yet:

$ pip install saws

But you can get that fix from the repo:

$ git clone https://github.com/donnemartin/saws.git && cd saws
$ pip install -e .
$ saws