question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot import pylxd from terminal

See original GitHub issue

I installed pylxd using pip install pylxd and when I try to load it in the terminal I get…

>>> import pylxd
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/akahan/Work/containers_js/env/lib/python2.7/site-packages/pylxd/__init__.py", line 19, in <module>
    from pylxd.deprecated import api  # NOQA
  File "/Users/akahan/Work/containers_js/env/lib/python2.7/site-packages/pylxd/deprecated/api.py", line 17, in <module>
    from pylxd.deprecated import certificate
  File "/Users/akahan/Work/containers_js/env/lib/python2.7/site-packages/pylxd/deprecated/certificate.py", line 17, in <module>
    from pylxd.deprecated import base
  File "/Users/akahan/Work/containers_js/env/lib/python2.7/site-packages/pylxd/deprecated/base.py", line 16, in <module>
    from pylxd.deprecated import connection
  File "/Users/akahan/Work/containers_js/env/lib/python2.7/site-packages/pylxd/deprecated/connection.py", line 46, in <module>
    DEFAULT_TLS_VERSION = OpenSSL.SSL.TLSv1_2_METHOD
NameError: name 'OpenSSL' is not defined
>>> import OpenSSL
>>> OpenSSL.SSL.TLSv1_2_METHOD
6

Not sure what’s going on here and why it’s trying to import code from a path with deprecated in it? Are there other deps that are needed to install this?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
jpiccommented, May 23, 2016

Did you try installing pbr ?

0reactions
jpiccommented, May 23, 2016

Yeah pbr powers setup.py so you need pbr prior to using setup.py. pbr is a bit hard to get started with, but it’s really good, all openstack python packages use it, it does a lot of awesome stuff ootb such as hash-based version numbers.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Migration using Python and pylxd - Linux Containers Forum
Here is the code : try to migrate a container ## (myport = 8443) from pylxd import Client lxd = Client() ret_ex =...
Read more >
Cannot import PIL into Python Shell, but can into Terminal
I have installed Pillow on may Macintosh using sudo pip install Pillow in Terminal. I know it is installed because whenever I run...
Read more >
pylxd Documentation - Read the Docs
from pylxd import Client. >>> client = Client() ... Because name is the key, it cannot be renamed by simply changing the name....
Read more >
[lxc-users] Python (pylxd) execute isn't working
I've tried running it in the python command line to see if I can figure out. from pylxd import client lxdClient = client.Client()...
Read more >
pylxd Documentation Canonical Ltd Dec 11, 2020
from pylxd import Client >>> client = Client(... endpoint=' ... Because name is the key, it cannot be renamed by simply changing the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found