Not working if installed from pip in ubuntu 15.10
fisadev opened this issue · comments
This is what I get after installing it with pip under ubuntu 15.10, and trying to run it:
Traceback (most recent call last):
File "/usr/local/bin/psdash", line 9, in <module>
load_entry_point('psdash==0.6.1', 'console_scripts', 'psdash')()
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 558, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2682, in load_entry_point
return ep.load()
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2355, in load
return self.resolve()
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2361, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/usr/local/lib/python2.7/dist-packages/psdash/run.py", line 3, in <module>
patch_all()
File "/usr/local/lib/python2.7/dist-packages/gevent/monkey.py", line 185, in patch_all
patch_socket(dns=dns, aggressive=aggressive)
File "/usr/local/lib/python2.7/dist-packages/gevent/monkey.py", line 124, in patch_socket
from gevent import socket
File "/usr/local/lib/python2.7/dist-packages/gevent/socket.py", line 659, in <module>
from gevent.ssl import sslwrap_simple as ssl, SSLError as sslerror, SSLSocket as SSLType
File "/usr/local/lib/python2.7/dist-packages/gevent/ssl.py", line 386, in <module>
def get_server_certificate(addr, ssl_version=PROTOCOL_SSLv3, ca_certs=None):
NameError: name 'PROTOCOL_SSLv3' is not defined
This is a relatively easy fix.
sudo nano /usr/local/lib/python2.7/dist-packages/gevent/ssl.py
Search for (CTRL-W
) the line that includes SSLv3
. Change it to SSLv23
, as such
def get_server_certificate(addr, ssl_version=PROTOCOL_SSLv23, ca_certs=None):
Save the file and run psdash
. It should work fine now.
I git this error just runing pip command
Traceback (most recent call last):
File "/usr/local/bin/pip", line 9, in <module>
load_entry_point('pip==7.0.3', 'console_scripts', 'pip')()
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 552, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2672, in load_entry_point
return ep.load()
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2345, in load
return self.resolve()
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2351, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/usr/local/lib/python2.7/dist-packages/pip-7.0.3-py2.7.egg/pip/__init__.py", line 15, in <module>
from pip.vcs import git, mercurial, subversion, bazaar # noqa
File "/usr/local/lib/python2.7/dist-packages/pip-7.0.3-py2.7.egg/pip/vcs/subversion.py", line 9, in <module>
from pip.index import Link
File "/usr/local/lib/python2.7/dist-packages/pip-7.0.3-py2.7.egg/pip/index.py", line 30, in <module>
from pip.wheel import Wheel, wheel_ext
File "/usr/local/lib/python2.7/dist-packages/pip-7.0.3-py2.7.egg/pip/wheel.py", line 35, in <module>
from pip._vendor.distlib.scripts import ScriptMaker
File "/usr/local/lib/python2.7/dist-packages/pip-7.0.3-py2.7.egg/pip/_vendor/__init__.py", line 92, in load_module
raise ImportError("No module named '%s'" % (name,))
ImportError: No module named 'pip._vendor.distlib.scripts'
This will be fixed in the next release (v0.6.2). I'll try to get it out soon. Meanwhile you can install the latest from git and it should work.
@paradoxally, allready tried it, installed, still same error
I've released v0.6.2 now. You should be able to upgrade using pip install -U psdash
.