-
Notifications
You must be signed in to change notification settings - Fork 54
ImportError: No module named xmlrpc_client #55
Comments
Hey, @andjonno. I haven't been able to reproduce this with these Python modules (the latest available):
Could you ensure that you have the latest versions of both? Try this:
|
@major I am running OS X Yosemite, so maybe something to do with that. Thanks for getting back to me. |
First off, I'd highly recommend installing python via Homebrew and using that python installation for your daily work. Using OS X's built in python and python modules will eventually lead to peculiar situations like these. It seems like the
|
Reinstalling python-novaclient via pip did not help but uninstall and install via easy_install workded for me. It seems the issue is related to xcode upgrades. |
@haoquanwang How did you solved by uninstalling and installing via easy_install ? I uninstalled and reinstalled setuptools in PyCharm, it can not solved the problem. |
@xiaolonginfo It was a problem with Yosemite and Xcode I believe. I updated both and it now works. |
I'm using the latest Yosemite and xcode (installed Sunday) and still having this issue, even with a fresh brew install of python. Is there more to your fix? |
I'm not on Yosemite yet but let me know if there's anything I can do to help. ;) |
Well I solved it but it took a large hammer. First I removed most of the pip packages and then reinstalled xcode. I then fixed the permissions on some of the stuff like pbr and installed python with brew (root had previously owned the pbr lib). Then I got a "golden" list of openstack client libs from a colleague since the latest copies of neutron had new errors. The bottom line here is that using brew to install python and then making sure that installs clean and works and then installing the libraries with -U seems to be the right fix. The xcode reinstall was due to my own negligence on removing things most likely. |
@andjonno @major @matthewfischer By the way, after the above problem I am still troubled with Yosemite and Xcode 6.0.1 because of some similar problems like "pip install cffi", I finally solved by set environment variable PKG_CONFIG_PATH including the software paths from brew install. Help it useful for you. |
@xiaolonginfo I had similar problem when I upgraded OS X from 10.7.5 to 10.9, so does upgrading from 10.9 to 10.10. I believe the problem is related to system env variables which were override during the upgrade. I uninstalled the whole python-novaclient stack: pip uninstall python-novaclient requests iso8601 python-keystoneclient Babel six simplejson pbr PrettyTable oslo.utils argparse netaddr oslo.config stevedore pytz pip oslo.i18n And then I reinstalled them back via easy_install: easy_install python-novaclient requests iso8601 python-keystoneclient Babel six simplejson pbr PrettyTable oslo.utils argparse netaddr oslo.config stevedore pytz pip oslo.i18n |
I tried the above solutions still not getting this to work, i did an upgrade to yosemite and it was working before that. I have not done anything with xcode only installed the latest but anything i should do there? Should i uninstall and reinstall? I tried to uninstall python-novaclient with pip and reinstall with pip in a virtualenv and still saw the same issue. |
I found out that my PyCharm was pointing to the system python. After i made pycharm point to the virtualenv python it is working fine. |
Looks like y'all might have it under control. Let me know if we need to patch supernova. |
Same problem; I've tried several of these solutions to no avail on Yosemite.
|
@smashhuevo Are you using Yosemite's built in python (bad idea) or a version of python from homebrew? If you really really want to use Yosemite's built in python, I'd highly recommend setting up a virtualenv for use with supernova. |
I'm using the latest homebrew version of Python--yeah, the built-in python does seem like a not-so-good idea. |
I ran into this problem as well using Yosemite's system python. The actual issue is that the six.py that comes with the system python doesn't define the six.moves.xmlrpc_client alias, but the version installed via pip into site-packages does. To fix it, we just need to get site-packages in the python path (i.e., sys.path) before the path to the system-provided version. Interestingly, using 'easy_install' to install six works, because easy_install will add the /Library/Python/2.7/site-packages path to ../site-packages/easy-install.pth file, which has a bit of code in it to force those paths to the front. |
@dblacka thanks. and
so success. |
worked for me too, looks like /Library/Python/2.7/site-packages now contains all six packages, and |
I'm currently using |
I had to reinstall XCODE and run : It solved the "ImportError: No module named xmlrpc_client" for yosemite os for me |
I had the same module missing issue but uninstalling modules and installing them using easy_install fixed the issue, thanks @haoquanwang for the suggestion. it works. |
I was facing this issue on Yosemite and I followed the instructions that @haoquanwang gave. That has helped. Thanks @haoquanwang! |
Btw, virtualenv is an epiphany for me. If you have not tried it, give it a go for openstack clients, and avoiding a repeat of the xmlrpc error (which keeps occurring after an easy_install update) for me. |
thanks @dblacka. easy_install six works! |
thanks, it works!@dblacka |
when i start create my project , the terminal tell me: |
This has a pretty good description of the issue and a possible workaround, although perhaps the PYTHONPATH environment variable workaround is better: http://stackoverflow.com/questions/27668081/how-to-install-six-moves-xmlrpc-client |
Did you try this? It worked for me. sudo rm -rf /Library/Python/2.7/site-packages/six* |
I'm not sure removing files from a system framework is a good idea. |
Removing and installing six worked for me as well... On Tue, Aug 18, 2015 at 12:12 AM, Ratanaksamrith You <
|
The workaround noted by @yrsamrith can work, but I don't think it is a good idea to permanently remove files from a system framework. Perhaps other applications are dependent on those files. How do you get them back? What if you need to use both nova and the other application simultaneously? It's not a good solution. |
You removed the package from /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six* which is part of the Python framework on OS X. When you run pip install, it will then be installed, I expect, to /Library/Python/2.7/site-packages/six. The six that is part of Python.framework is gone. Maybe some application is dependent on that specific version and now you can't get it back. |
Ty @superdump, your solution with PYTHONPATH works!
Guys, if you don't want, you don't need to remove old six version, you can just backup it to the somethig like six.py.bak It works also. |
The solution of @dblacka dated Jan 13 works for me (thank you!) |
another plug for @haoquanwang. worked like a charm! |
only doing below works for me. |
I solved this issue by reinstall the package via easy_install |
Traceback (most recent call last):
File "/usr/local/bin/supernova", line 9, in
load_entry_point('supernova==1.0.2', 'console_scripts', 'supernova')()
File "/Library/Python/2.7/site-packages/distribute-0.6.28-py2.7.egg/pkg_resources.py", line 337, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/Library/Python/2.7/site-packages/distribute-0.6.28-py2.7.egg/pkg_resources.py", line 2311, in load_entry_point
return ep.load()
File "/Library/Python/2.7/site-packages/distribute-0.6.28-py2.7.egg/pkg_resources.py", line 2017, in load
entry = import(self.module_name, globals(),globals(), ['name'])
File "/Library/Python/2.7/site-packages/supernova/executable.py", line 31, in
from . import supernova
File "/Library/Python/2.7/site-packages/supernova/supernova.py", line 24, in
from novaclient import client as novaclient
File "/Library/Python/2.7/site-packages/novaclient/client.py", line 45, in
from novaclient import utils
File "/Library/Python/2.7/site-packages/novaclient/utils.py", line 27, in
from novaclient.openstack.common import jsonutils
File "/Library/Python/2.7/site-packages/novaclient/openstack/common/jsonutils.py", line 52, in
import six.moves.xmlrpc_client as xmlrpclib
ImportError: No module named xmlrpc_client
The text was updated successfully, but these errors were encountered: