pycontribs / pyrax

The Python SDK for the Rackspace Cloud
developer.rackspace.com
Apache License 2.0
237 stars 209 forks source link

Fresh ubuntu 12.04 install pyrax.set_credentials() failure #289

Closed gringo2150 closed 10 years ago

gringo2150 commented 10 years ago

Upon trying out pyrax I have fallen down on the first hurdle.

pyrax.set_credentials("username", "token")
  File "/usr/local/lib/python2.7/dist-packages/pyrax/__init__.py", line 372, in _wrapped
    return fnc(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/pyrax/__init__.py", line 430, in set_credentials
    _auth_and_connect(region=region)
  File "/usr/local/lib/python2.7/dist-packages/pyrax/__init__.py", line 504, in _auth_and_connect
    connect_to_services(region=region)
  File "/usr/local/lib/python2.7/dist-packages/pyrax/__init__.py", line 572, in connect_to_services
    cloudservers = connect_to_cloudservers(region=region)
  File "/usr/local/lib/python2.7/dist-packages/pyrax/__init__.py", line 372, in _wrapped
    return fnc(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/pyrax/__init__.py", line 384, in _wrapped
    return fnc(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/pyrax/__init__.py", line 602, in connect_to_cloudservers
    _cs_auth_plugin.discover_auth_systems()
  File "/usr/local/lib/python2.7/dist-packages/novaclient/auth_plugin.py", line 40, in discover_auth_systems
    auth_plugin = ep.load()
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1988, in load
    if require: self.require(env, installer)
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2001, in require
    working_set.resolve(self.dist.requires(self.extras),env,installer))
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 584, in resolve
    raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: six

six is installed in my python packages, upon trying to install an update of novaclient I get the following error.

File "/usr/local/lib/python2.7/dist-packages/pyrax/__init__.py", line 372, in _wrapped
    return fnc(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/pyrax/__init__.py", line 430, in set_credentials
    _auth_and_connect(region=region)
  File "/usr/local/lib/python2.7/dist-packages/pyrax/__init__.py", line 504, in _auth_and_connect
    connect_to_services(region=region)
  File "/usr/local/lib/python2.7/dist-packages/pyrax/__init__.py", line 572, in connect_to_services
    cloudservers = connect_to_cloudservers(region=region)
  File "/usr/local/lib/python2.7/dist-packages/pyrax/__init__.py", line 372, in _wrapped
    return fnc(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/pyrax/__init__.py", line 384, in _wrapped
    return fnc(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/pyrax/__init__.py", line 602, in connect_to_cloudservers
    _cs_auth_plugin.discover_auth_systems()
  File "/usr/local/lib/python2.7/dist-packages/novaclient/auth_plugin.py", line 40, in discover_auth_systems
    auth_plugin = ep.load()
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1988, in load
    if require: self.require(env, installer)
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2001, in require
    working_set.resolve(self.dist.requires(self.extras),env,installer))
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 584, in resolve
    raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: six >=1.4.1

When using the latest novaclient six was upgraded to 1.5.2 how can I resolve this?

EdLeafe commented 10 years ago

Are you installing into a virtualenv, or into your system Python?

When updating novaclient, are you running pip install --update python-novaclient?

What happens if you try running pip install --update six?

gringo2150 commented 10 years ago

Wow, thank you for the super quick response.

Installing to my system python.

Have updated both already but just to be sure I have done a pip upgrade again same problem I'm afraid.

File "/usr/local/lib/python2.7/dist-packages/pyrax/__init__.py", line 372, in _wrapped
    return fnc(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/pyrax/__init__.py", line 430, in set_credentials
    _auth_and_connect(region=region)
  File "/usr/local/lib/python2.7/dist-packages/pyrax/__init__.py", line 504, in _auth_and_connect
    connect_to_services(region=region)
  File "/usr/local/lib/python2.7/dist-packages/pyrax/__init__.py", line 572, in connect_to_services
    cloudservers = connect_to_cloudservers(region=region)
  File "/usr/local/lib/python2.7/dist-packages/pyrax/__init__.py", line 372, in _wrapped
    return fnc(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/pyrax/__init__.py", line 384, in _wrapped
    return fnc(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/pyrax/__init__.py", line 602, in connect_to_cloudservers
    _cs_auth_plugin.discover_auth_systems()
  File "/usr/local/lib/python2.7/dist-packages/novaclient/auth_plugin.py", line 40, in discover_auth_systems
    auth_plugin = ep.load()
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1988, in load
    if require: self.require(env, installer)
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2001, in require
    working_set.resolve(self.dist.requires(self.extras),env,installer))
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 584, in resolve
    raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: six
gringo2150 commented 10 years ago

virtualenv isnt installed on my system.

EdLeafe commented 10 years ago

Can you show me the command and output for the following?

pip freeze

pip install --upgrade six

gringo2150 commented 10 years ago

pip freeze

Babel==1.3 BeautifulSoup==3.2.0 Brlapi==0.5.6 BzrTools==2.5.0 CherryPy==3.2.2 CouchDB==0.8 Cython==0.20 GnuPGInterface==0.3.2 Magic-file-extensions==0.2 Mako==0.5.0 MarkupSafe==0.15 MySQL-python==1.2.3 PAM==0.4.2 PIL==1.1.7 PyICU==1.3 PyOpenGL==3.0.1b2 Rabbyt==0.8.1 Routes==1.12.3 SQLAlchemy==0.9.1 SimpleCV==1.2 Twisted==11.1.0 Twisted-Conch==11.1.0 Twisted-Core==11.1.0 Twisted-Lore==11.1.0 Twisted-Mail==11.1.0 Twisted-Names==11.1.0 Twisted-News==11.1.0 Twisted-Runner==11.1.0 Twisted-Web==11.1.0 Twisted-Words==11.1.0 UniConvertor==1.1.4 Unidecode==0.04.14 WebOb==1.1.1 adium-theme-ubuntu==0.3.2 apparmor==2.7.102 apt-clone==0.2.1 apt-xapian-index==0.44 apturl==0.5.1ubuntu3 argparse==1.2.1 backports.ssl-match-hostname==3.4.0.2 bzr==2.5.1 ccsm==0.9.5.92 chardet==2.0.1 command-not-found==0.2.44 compizconfig-python==0.9.5.94 configglue==1.0 configobj==4.7.2 cssutils==0.9.8 debtagshw==0.1 decorator==3.3.2 defer==1.0.2 devscripts==2.11.6ubuntu1.6 dirspec==3.0.0 dnspython==1.9.4 feedparser==5.1 fuse-python==0.2.1 fusion-icon==0.1.0 getmail==4.24.0 httplib2==0.8 ipython==0.12.1 iso8601==0.1.8 jnius==1.1-dev jockey==0.9.7 keyring==3.4 language-selector==0.1 launchpadlib==1.9.12 lazr.restfulclient==0.12.0 lazr.uri==1.0.3 louis==2.3.0 lxml==2.3.2 matplotlib==1.1.1rc mechanize==0.2.5 mercurial==2.0.2 mock==1.0.1 nose==1.1.2 numpy==1.6.1 nvidia-common==0.0.0 oauth==1.0.1 onboard==0.97.1 oneconf==0.2.8.1 openpyxl==1.8.2 os-diskconfig-python-novaclient-ext==0.1.1 os-networksv2-python-novaclient-ext==0.21 os-virtual-interfacesv2-python-novaclient-ext==0.14 paramiko==1.7.7.1 pbr==0.6 pexpect==2.3 piston-mini-client==0.7.2 prettytable==0.7.2 protobuf==2.4.1 pyOpenSSL==0.12 pyasn1==0.0.11a pychecker==0.8.19 pycrypto==2.4.1 pycups==1.9.61 pycurl==7.19.0 pyenchant==1.6.5 pygame==1.9.1release pyinotify==0.9.2 pyparsing==1.5.2 pyrax==1.6.3 pysane==2.0 pyserial==2.5 pysmbc==1.0.13 pysqlite==2.6.3 python-apt==0.8.3ubuntu7.1 python-dateutil==1.5 python-debian==0.1.21ubuntu1 python-distutils-extra==2.34 python-novaclient==2.15.0 python-swiftclient==1.8.0 python-twitter==0.6 python-virtkey==0.60.0 python-xlib==0.14 pytz==2013.9 pyxdg==0.19 rackspace-auth-openstack==1.3 rackspace-novaclient==1.4 rax-default-network-flags-python-novaclient-ext==0.1.3 rax-scheduled-images-python-novaclient-ext==0.2.1 rdflib==2.4.2 reportlab==2.5 requests==2.2.1 rhythmbox-ubuntuone==4.2.0 scapy==2.2.0 scipy==0.9.0 screen-resolution-extra==0.0.0 screenlets==0.1.6 screenlets-pack-basic==0.1.6 sessioninstaller==0.0.0 simplegeneric==0.7 simplejson==3.3.2 six==1.5.2 software-center-aptd-plugins==0.0.0 stdeb==0.6.0-git system-service==0.1.6 tornado==3.2 uTidylib==0.2 ubuntuone-installer==3.0.2 ubuntuone-storage-protocol==3.0.2 ufw==0.31.1-1 unattended-upgrades==0.1 unity-lens-video==0.3.5 unity-scope-video-remote==0.3.5 usb-creator==0.2.23 wadllib==1.3.0 winpdb==1.4.8 wsgiref==0.1.2 wxPython==2.6.3.2 wxPython-common==2.6.3.2 xdiagnose==2.5.3 xkit==0.0.0 xlrd==0.9.2 xlwt==0.7.5 xsHirePy==0.1 zinnia-python==0.0.0 zope.interface==3.6.1

pip install --upgrade six

Requirement already up-to-date: six in /usr/local/lib/python2.7/dist-packages Cleaning up...

bazzilic commented 10 years ago

I am having same or similar problem.

Here's a traceback:

Traceback (most recent call last):
  File ".../main.py", line 359, in <module>
    main()
  File ".../main.py", line 350, in main
    pyrax.set_credentials(api_login, api_key)
  File "/usr/local/lib/python2.7/dist-packages/pyrax/__init__.py", line 372, in _wrapped
    return fnc(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/pyrax/__init__.py", line 430, in set_credentials
    _auth_and_connect(region=region)
  File "/usr/local/lib/python2.7/dist-packages/pyrax/__init__.py", line 504, in _auth_and_connect
    connect_to_services(region=region)
  File "/usr/local/lib/python2.7/dist-packages/pyrax/__init__.py", line 572, in connect_to_services
    cloudservers = connect_to_cloudservers(region=region)
  File "/usr/local/lib/python2.7/dist-packages/pyrax/__init__.py", line 372, in _wrapped
    return fnc(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/pyrax/__init__.py", line 384, in _wrapped
    return fnc(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/pyrax/__init__.py", line 602, in connect_to_cloudservers
    _cs_auth_plugin.discover_auth_systems()
  File "/usr/local/lib/python2.7/dist-packages/novaclient/auth_plugin.py", line 40, in discover_auth_systems
    auth_plugin = ep.load()
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1988, in load
    if require: self.require(env, installer)
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2001, in require
    working_set.resolve(self.dist.requires(self.extras),env,installer))
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 584, in resolve
    raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: six

Here's pip freeze output:

Babel==1.3
GnuPGInterface==0.3.2
Landscape-Client==13.07.3
MySQL-python==1.2.5
PAM==0.4.2
Twisted-Core==11.1.0
apt-xapian-index==0.44
argparse==1.2.1
backports.ssl-match-hostname==3.4.0.2
chardet==2.0.1
command-not-found==0.2.44
httplib2==0.7.2
iso8601==0.1.8
keyring==0.9.2
language-selector==0.1
launchpadlib==1.9.12
lazr.restfulclient==0.12.0
lazr.uri==1.0.3
medusa==0.5.4
meld3==0.6.5
mock==1.0.1
oauth==1.0.1
os-diskconfig-python-novaclient-ext==0.1.1
os-networksv2-python-novaclient-ext==0.21
os-virtual-interfacesv2-python-novaclient-ext==0.14
pbr==0.6
prettytable==0.7.2
pyOpenSSL==0.12
pycrypto==2.4.1
pyrax==1.6.3
pyserial==2.5
python-apt==0.8.3ubuntu7.2
python-debian==0.1.21ubuntu1
python-novaclient==2.15.0
python-swiftclient==2.0.2
pytz==2013.9
rackspace-auth-openstack==1.3
rackspace-novaclient==1.4
rax-default-network-flags-python-novaclient-ext==0.1.3
rax-scheduled-images-python-novaclient-ext==0.2.1
requests==2.2.1
simplejson==3.3.3
six==1.5.2
supervisor==3.0a8
tornado==3.2
torndb==0.2
ufw==0.31.1-1
wadllib==1.3.0
wsgiref==0.1.2
zope.interface==3.6.1

I am not using virtualenv either. System is Ubuntu 12.04 (Rackspace version if it is any different from the vanilla one) with all the updates installed.

EdLeafe commented 10 years ago

I have seen some comments about similar issues with Novaclient and the latest six library. If I find an answer I'll post it here.

bazzilic commented 10 years ago

Seems like latest update to pyrax fixes the problem.

EdLeafe commented 10 years ago

Odd, since it didn't contain any changes to the setup.py script.

@gringo2150: can you confirm this?

gringo2150 commented 10 years ago

After seeing @bazzilic's comment pop into my email I was overjoyed to finally be able to give this a whirl. Alas after updating pyrax from pip and then the github sources and also trying to update novaclient the issue still persists for me.

I'm going to have a look at novaclient's requirements later this afternoon as I suspect something is screwed up in there.

bazzilic commented 10 years ago

I am not sure what exactly happened. I found out about pip-tools and decided to give it a try. After running pip-review --interactive I noticed that among others pyrax was updated. Then I tried to start the script and it worked.

Now I switched to using virtualenv, where everything also works fine.

gringo2150 commented 10 years ago

Perhaps virtualenv is the way to go I will give it a try later today.

danngrant commented 10 years ago

Ed, I'm having the same issue after an OS update to my MAC. Tried to update all the pieces with no luck. pip install six Requirement already satisfied (use --upgrade to upgrade): six in /Library/Python/2.7/site-packages Cleaning up... sudo pip install --upgrade python-novaclient Requirement already up-to-date: python-novaclient in /Library/Python/2.7/site-packages Requirement already up-to-date: pbr>=0.6,<1.0 in /Library/Python/2.7/site-packages (from python-novaclient) Requirement already up-to-date: iso8601>=0.1.8 in /Library/Python/2.7/site-packages (from python-novaclient) Requirement already up-to-date: PrettyTable>=0.7,<0.8 in /Library/Python/2.7/site-packages (from python-novaclient) Requirement already up-to-date: requests>=1.1 in /Library/Python/2.7/site-packages (from python-novaclient) Requirement already up-to-date: simplejson>=2.0.9 in /Library/Python/2.7/site-packages (from python-novaclient) Requirement already up-to-date: six>=1.4.1 in /Library/Python/2.7/site-packages (from python-novaclient) Requirement already up-to-date: Babel>=1.3 in /Library/Python/2.7/site-packages (from python-novaclient) Requirement already up-to-date: pip>=1.0 in /Library/Python/2.7/site-packages/pip-1.5.4-py2.7.egg (from pbr>=0.6,<1.0->python-novaclient) Requirement already up-to-date: pytz>=0a in /Library/Python/2.7/site-packages (from Babel>=1.3->python-novaclient) sudo pip install --upgrade pyrax Downloading/unpacking pyrax Downloading pyrax-1.6.4-py2.py3-none-any.whl (284kB): 284kB downloaded Downloading/unpacking python-swiftclient>=1.5.0 (from pyrax) Downloading python-swiftclient-2.0.2.tar.gz (54kB): 54kB downloaded Running setup.py (path:/private/tmp/pip_build_root/python-swiftclient/setup.py) egg_info for package python-swiftclient [pbr] Processing SOURCES.txt warning: LocalManifestMaker: standard file '-c' not found

warning: no previously-included files found matching '.gitignore'
warning: no previously-included files found matching '.gitreview'
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no files found matching '*' under directory 'tools'

Requirement already up-to-date: requests>=1.0.0 in /Library/Python/2.7/site-packages (from pyrax) Requirement already up-to-date: keyring in /Library/Python/2.7/site-packages/keyring-3.5-py2.7.egg (from pyrax) Requirement already up-to-date: python-novaclient>=2.13.0 in /Library/Python/2.7/site-packages (from pyrax) Downloading/unpacking mock (from pyrax) Downloading mock-1.0.1.tar.gz (818kB): 818kB downloaded Running setup.py (path:/private/tmp/pip_build_root/mock/setup.py) egg_info for package mock

warning: no files found matching '*.png' under directory 'docs'
warning: no files found matching '*.css' under directory 'docs'
warning: no files found matching '*.html' under directory 'docs'
warning: no files found matching '*.js' under directory 'docs'

Downloading/unpacking httplib2 (from pyrax) Downloading httplib2-0.8.tar.gz (110kB): 110kB downloaded Running setup.py (path:/private/tmp/pip_build_root/httplib2/setup.py) egg_info for package httplib2

Requirement already up-to-date: rackspace-novaclient in /Library/Python/2.7/site-packages (from pyrax) Requirement already up-to-date: simplejson>=2.0.9 in /Library/Python/2.7/site-packages (from python-swiftclient>=1.5.0->pyrax) Requirement already up-to-date: pbr>=0.6,<1.0 in /Library/Python/2.7/site-packages (from python-novaclient>=2.13.0->pyrax) Requirement already up-to-date: iso8601>=0.1.8 in /Library/Python/2.7/site-packages (from python-novaclient>=2.13.0->pyrax) Requirement already up-to-date: PrettyTable>=0.7,<0.8 in /Library/Python/2.7/site-packages (from python-novaclient>=2.13.0->pyrax) Requirement already up-to-date: six>=1.4.1 in /Library/Python/2.7/site-packages (from python-novaclient>=2.13.0->pyrax) Requirement already up-to-date: Babel>=1.3 in /Library/Python/2.7/site-packages (from python-novaclient>=2.13.0->pyrax) Requirement already up-to-date: rackspace-auth-openstack in /Library/Python/2.7/site-packages (from rackspace-novaclient->pyrax) Downloading/unpacking os-diskconfig-python-novaclient-ext from https://pypi.python.org/packages/source/o/os_diskconfig_python_novaclient_ext/os_diskconfig_python_novaclient_ext-0.1.2.tar.gz#md5=e52dc0e8459402fa4f493715d26b5dd7 (from rackspace-novaclient->pyrax) Downloading os_diskconfig_python_novaclient_ext-0.1.2.tar.gz Running setup.py (path:/private/tmp/pip_build_root/os-diskconfig-python-novaclient-ext/setup.py) egg_info for package os-diskconfig-python-novaclient-ext

Requirement already up-to-date: rax-scheduled-images-python-novaclient-ext in /Library/Python/2.7/site-packages (from rackspace-novaclient->pyrax) Requirement already up-to-date: os-networksv2-python-novaclient-ext in /Library/Python/2.7/site-packages (from rackspace-novaclient->pyrax) Requirement already up-to-date: os-virtual-interfacesv2-python-novaclient-ext in /Library/Python/2.7/site-packages (from rackspace-novaclient->pyrax) Requirement already up-to-date: rax-default-network-flags-python-novaclient-ext in /Library/Python/2.7/site-packages (from rackspace-novaclient->pyrax) Requirement already up-to-date: pip>=1.0 in /Library/Python/2.7/site-packages/pip-1.5.4-py2.7.egg (from pbr>=0.6,<1.0->python-novaclient>=2.13.0->pyrax) Requirement already up-to-date: pytz>=0a in /Library/Python/2.7/site-packages (from Babel>=1.3->python-novaclient>=2.13.0->pyrax) Installing collected packages: pyrax, python-swiftclient, mock, httplib2, os-diskconfig-python-novaclient-ext Running setup.py install for python-swiftclient [pbr] Reusing existing SOURCES.txt changing mode of build/scripts-2.7/swift from 644 to 755 changing mode of /usr/local/bin/swift to 755 Running setup.py install for mock

warning: no files found matching '*.png' under directory 'docs'
warning: no files found matching '*.css' under directory 'docs'
warning: no files found matching '*.html' under directory 'docs'
warning: no files found matching '*.js' under directory 'docs'

Running setup.py install for httplib2

Found existing installation: os-diskconfig-python-novaclient-ext 0.1.1 Uninstalling os-diskconfig-python-novaclient-ext: Successfully uninstalled os-diskconfig-python-novaclient-ext Running setup.py install for os-diskconfig-python-novaclient-ext

Successfully installed pyrax python-swiftclient mock httplib2 os-diskconfig-python-novaclient-ext Cleaning up...

pip freeze Babel==1.3 PyRSS2Gen==1.0.0 Twisted==12.2.0 altgraph==0.10.1 bdist-mpkg==0.4.4 bonjour-py==0.3 iso8601==0.1.10 keyring==3.5 macholib==1.5 matplotlib==1.1.1 modulegraph==0.10.1 numpy==1.6.2 os-diskconfig-python-novaclient-ext==0.1.1 os-networksv2-python-novaclient-ext==0.21 os-virtual-interfacesv2-python-novaclient-ext==0.15 pbr==0.6 prettytable==0.7.2 py2app==0.7.1 pyOpenSSL==0.13 pyobjc-core==2.3.2a0 pyobjc-framework-AddressBook==2.3.2a0 pyobjc-framework-AppleScriptKit==2.3.2a0 pyobjc-framework-AppleScriptObjC==2.3.2a0 pyobjc-framework-Automator==2.3.2a0 pyobjc-framework-CFNetwork==2.3.2a0 pyobjc-framework-Cocoa==2.3.2a0 pyobjc-framework-Collaboration==2.3.2a0 pyobjc-framework-CoreData==2.3.2a0 pyobjc-framework-CoreLocation==2.3.2a0 pyobjc-framework-CoreText==2.3.2a0 pyobjc-framework-DictionaryServices==2.3.2a0 pyobjc-framework-ExceptionHandling==2.3.2a0 pyobjc-framework-FSEvents==2.3.2a0 pyobjc-framework-InputMethodKit==2.3.2a0 pyobjc-framework-InstallerPlugins==2.3.2a0 pyobjc-framework-InstantMessage==2.3.2a0 pyobjc-framework-InterfaceBuilderKit==2.3.2a0 pyobjc-framework-LatentSemanticMapping==2.3.2a0 pyobjc-framework-LaunchServices==2.3.2a0 pyobjc-framework-Message==2.3.2a0 pyobjc-framework-OpenDirectory==2.3.2a0 pyobjc-framework-PreferencePanes==2.3.2a0 pyobjc-framework-PubSub==2.3.2a0 pyobjc-framework-QTKit==2.3.2a0 pyobjc-framework-Quartz==2.3.2a0 pyobjc-framework-ScreenSaver==2.3.2a0 pyobjc-framework-ScriptingBridge==2.3.2a0 pyobjc-framework-SearchKit==2.3.2a0 pyobjc-framework-ServiceManagement==2.3.2a0 pyobjc-framework-SyncServices==2.3.2a0 pyobjc-framework-SystemConfiguration==2.3.2a0 pyobjc-framework-WebKit==2.3.2a0 pyobjc-framework-XgridFoundation==2.3.2a0 python-dateutil==1.5 python-novaclient==2.16.0 pytz==2013.9 rackspace-auth-openstack==1.3 rackspace-novaclient==1.4 rax-default-network-flags-python-novaclient-ext==0.2.3 rax-scheduled-images-python-novaclient-ext==0.2.1 requests==2.2.1 scipy==0.11.0 simplejson==3.3.3 six==1.5.2 supernova==0.9.0 wsgiref==0.1.2 xattr==0.6.4 zope.interface==3.8.0

ERROR: six>=1.4.1

Thanks, Dann Grant

alanboyce commented 10 years ago

This is happening to a few of our macs now too.

$ ansible -i production localhost -m rax -a "name=alan-test flavor=performance1-8 image=f70ed7c7-b42e-4d77-83d8-40fa29825b85 wait=yes" -c local
localhost | FAILED >> {
    "failed": true,
    "msg": "six>=1.5.2"
}
$ pip show six
---
Name: six
Version: 1.5.2
Location: /Library/Python/2.7/site-packages
Requires:
EdLeafe commented 10 years ago

I'm stumped. The problem seems to be with the novaclient dependency, but it looks like there are odd things going on with pip, too.

If anyone gets more information on this problem, please share it here.

DavidWittman commented 10 years ago

I think this is just an issue with the packaging for six. I was able to fix it on my Mac by running pip install --upgrade distribute.

gringo2150 commented 10 years ago

I can confirm the above is working for me, which is odd because I did a pip-review --interactive previously and upgraded everything. Any how this issue now appears to be resolved for me.

EdLeafe commented 10 years ago

@DavidWittman @gringo2150 Thanks for the feedback.

I'm going to mark this closed, but please, if anyone else finds a problem with this approach, please post it here.

maxlinc commented 10 years ago

I tried to use it from working. Didn't work for me.

$ pip install -U git+git://github.com/rackspace/pyrax@working
Downloading/unpacking git+git://github.com/rackspace/pyrax@working
  Cloning git://github.com/rackspace/pyrax (to working) to /var/folders/3p/p2c_7fv14tb21zgsqnp0c8h80000gp/T/pip-DrLOjW-build
  Running setup.py (path:/var/folders/3p/p2c_7fv14tb21zgsqnp0c8h80000gp/T/pip-DrLOjW-build/setup.py) egg_info for package from git+git://github.com/rackspace/pyrax@working

Requirement already up-to-date: python-novaclient>=2.13.0 in ./pyrax_env/lib/python2.7/site-packages (from pyrax==1.7.0)
Requirement already up-to-date: rackspace-novaclient in ./pyrax_env/lib/python2.7/site-packages (from pyrax==1.7.0)
Requirement already up-to-date: python-swiftclient>=1.5.0 in ./pyrax_env/lib/python2.7/site-packages (from pyrax==1.7.0)
Requirement already up-to-date: httplib2 in ./pyrax_env/lib/python2.7/site-packages (from pyrax==1.7.0)
Requirement already up-to-date: keyring in ./pyrax_env/lib/python2.7/site-packages (from pyrax==1.7.0)
Requirement already up-to-date: requests>=2.2.1 in ./pyrax_env/lib/python2.7/site-packages (from pyrax==1.7.0)
Requirement already up-to-date: six>=1.5.2 in ./pyrax_env/lib/python2.7/site-packages (from pyrax==1.7.0)
Requirement already up-to-date: mock in ./pyrax_env/lib/python2.7/site-packages (from pyrax==1.7.0)
Requirement already up-to-date: pbr>=0.6,<1.0 in ./pyrax_env/lib/python2.7/site-packages (from python-novaclient>=2.13.0->pyrax==1.7.0)
Requirement already up-to-date: iso8601>=0.1.8 in ./pyrax_env/lib/python2.7/site-packages (from python-novaclient>=2.13.0->pyrax==1.7.0)
Requirement already up-to-date: PrettyTable>=0.7,<0.8 in ./pyrax_env/lib/python2.7/site-packages (from python-novaclient>=2.13.0->pyrax==1.7.0)
Requirement already up-to-date: simplejson>=2.0.9 in ./pyrax_env/lib/python2.7/site-packages (from python-novaclient>=2.13.0->pyrax==1.7.0)
Requirement already up-to-date: Babel>=1.3 in ./pyrax_env/lib/python2.7/site-packages (from python-novaclient>=2.13.0->pyrax==1.7.0)
Requirement already up-to-date: rackspace-auth-openstack in ./pyrax_env/lib/python2.7/site-packages (from rackspace-novaclient->pyrax==1.7.0)
Requirement already up-to-date: os-diskconfig-python-novaclient-ext in ./pyrax_env/lib/python2.7/site-packages (from rackspace-novaclient->pyrax==1.7.0)
Requirement already up-to-date: rax-scheduled-images-python-novaclient-ext in ./pyrax_env/lib/python2.7/site-packages (from rackspace-novaclient->pyrax==1.7.0)
Requirement already up-to-date: os-networksv2-python-novaclient-ext in ./pyrax_env/lib/python2.7/site-packages (from rackspace-novaclient->pyrax==1.7.0)
Requirement already up-to-date: os-virtual-interfacesv2-python-novaclient-ext in ./pyrax_env/lib/python2.7/site-packages (from rackspace-novaclient->pyrax==1.7.0)
Requirement already up-to-date: rax-default-network-flags-python-novaclient-ext in ./pyrax_env/lib/python2.7/site-packages (from rackspace-novaclient->pyrax==1.7.0)
Downloading/unpacking pip>=1.0 from https://pypi.python.org/packages/py2.py3/p/pip/pip-1.5.4-py2.py3-none-any.whl#md5=f20bc8f31e322375ce06b26d73ce7b4f (from pbr>=0.6,<1.0->python-novaclient>=2.13.0->pyrax==1.7.0)
  Downloading pip-1.5.4-py2.py3-none-any.whl (1.2MB): 1.2MB downloaded
Requirement already up-to-date: pytz>=0a in ./pyrax_env/lib/python2.7/site-packages (from Babel>=1.3->python-novaclient>=2.13.0->pyrax==1.7.0)
Installing collected packages: pyrax, pip
  Found existing installation: pyrax 1.7.0
    Uninstalling pyrax:
      Successfully uninstalled pyrax
  Running setup.py install for pyrax
    /Users/Thoughtworker/repos/rackspace/polytrix/sdks/pyrax/pyrax_env/bin/python -O /var/folders/3p/p2c_7fv14tb21zgsqnp0c8h80000gp/T/tmp9izTeT.py
    removing /var/folders/3p/p2c_7fv14tb21zgsqnp0c8h80000gp/T/tmp9izTeT.py

  Found existing installation: pip 1.4.1
    Uninstalling pip:
      Successfully uninstalled pip
Successfully installed pyrax pip
Cleaning up...
$ pip freeze
Babel==1.3
httplib2==0.8
iso8601==0.1.10
keyring==3.6
mock==1.0.1
os-diskconfig-python-novaclient-ext==0.1.2
os-networksv2-python-novaclient-ext==0.21
os-virtual-interfacesv2-python-novaclient-ext==0.15
pbr==0.6
prettytable==0.7.2
pyrax==1.7.0
python-novaclient==2.17.0
python-swiftclient==2.0.3
pytz==2014.1
rackspace-auth-openstack==1.3
rackspace-novaclient==1.4
rax-default-network-flags-python-novaclient-ext==0.2.3
rax-scheduled-images-python-novaclient-ext==0.2.1
requests==2.2.1
simplejson==3.3.3
wsgiref==0.1.2

When I run a sample:

$ python challenges/authenticate_token.py
Traceback (most recent call last):
  File "challenges/authenticate_token.py", line 15, in <module>
    pyrax.set_credentials(os.getenv('RAX_USERNAME'), os.getenv('RAX_API_KEY'))
  File "/Users/Thoughtworker/repos/rackspace/polytrix/sdks/pyrax/pyrax_env/lib/python2.7/site-packages/pyrax/__init__.py", line 398, in _wrapped
    return fnc(*args, **kwargs)
  File "/Users/Thoughtworker/repos/rackspace/polytrix/sdks/pyrax/pyrax_env/lib/python2.7/site-packages/pyrax/__init__.py", line 456, in set_credentials
    _auth_and_connect(region=region)
  File "/Users/Thoughtworker/repos/rackspace/polytrix/sdks/pyrax/pyrax_env/lib/python2.7/site-packages/pyrax/__init__.py", line 530, in _auth_and_connect
    connect_to_services(region=region)
  File "/Users/Thoughtworker/repos/rackspace/polytrix/sdks/pyrax/pyrax_env/lib/python2.7/site-packages/pyrax/__init__.py", line 599, in connect_to_services
    cloudservers = connect_to_cloudservers(region=region)
  File "/Users/Thoughtworker/repos/rackspace/polytrix/sdks/pyrax/pyrax_env/lib/python2.7/site-packages/pyrax/__init__.py", line 398, in _wrapped
    return fnc(*args, **kwargs)
  File "/Users/Thoughtworker/repos/rackspace/polytrix/sdks/pyrax/pyrax_env/lib/python2.7/site-packages/pyrax/__init__.py", line 410, in _wrapped
    return fnc(*args, **kwargs)
  File "/Users/Thoughtworker/repos/rackspace/polytrix/sdks/pyrax/pyrax_env/lib/python2.7/site-packages/pyrax/__init__.py", line 630, in connect_to_cloudservers
    _cs_auth_plugin.discover_auth_systems()
  File "/Users/Thoughtworker/repos/rackspace/polytrix/sdks/pyrax/pyrax_env/lib/python2.7/site-packages/novaclient/auth_plugin.py", line 41, in discover_auth_systems
    auth_plugin = ep.load()
  File "build/bdist.linux-i686/egg/pkg_resources.py", line 1953, in load
    _distribution_finders[importer_type] = distribution_finder
  File "build/bdist.linux-i686/egg/pkg_resources.py", line 1966, in require
    if only:
  File "build/bdist.linux-i686/egg/pkg_resources.py", line 565, in resolve
    On exit from this routine, `entry` is added to the end of the working
pkg_resources.DistributionNotFound: six>=1.5.2

I'm not pip expert, so maybe I got the install from git wrong. But there's some unusual things in this output.

rkrzr commented 10 years ago

I'm still having problems to get it installed. It seems that pyrax does not install any of its dependencies automatically for me. I had to add all of them to my requirements.txt to get it to work.

requirements.txt:

pyrax
six
requests
python-novaclient
rackspace-novaclient
python-swiftclient
httplib2
EdLeafe commented 10 years ago

@rkrzr How are you installing pyrax? What sort of output do you see when you install it?

rkrzr commented 10 years ago

@EdLeafe It seems it was something specific to my environment. When I re-clone the repo, create a new virtualenv and do pip install -r requirements.txt it actually does install all dependencies. Sorry for the false alert.

EdLeafe commented 10 years ago

@rkrzr No worries - I can't possibly test in all environments, so every data point helps. Glad you got it working.

fcpimenta commented 10 years ago

Thanks to @DavidWittman , I resolved my six problem after execute:

pip install --upgrade distribute

marioplumbarius commented 10 years ago

+1 to @DavidWittman

nickkaranatsios commented 10 years ago

Thanks DavidWittman I spent hours trying to solve a similar problem with openstack.