WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: ImportError: No module named _ssl  (Read 8220 times)

Offline Arslan S.

  • Hero Member
  • *****
  • Posts: 825
ImportError: No module named _ssl
« on: March 07, 2010, 03:04:32 PM »
Code: [Select]
tc@box:~$ python
Python 2.6.4 (r264:75706, Nov  1 2009, 20:51:29)
[GCC 4.2.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import ssl
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.6/ssl.py", line 60, in <module>
    import _ssl             # if we can't import it, let the error propagate
ImportError: No module named _ssl
>>>


Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: ImportError: No module named _ssl
« Reply #1 on: March 07, 2010, 03:24:05 PM »
I thought the latest package had ssl support.  I will check into it tonight and rebuild if needed.

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: ImportError: No module named _ssl
« Reply #2 on: March 07, 2010, 04:12:52 PM »
A quick rebuild with --with-ssl does the trick.  Wouldn't hurt to have rebuilt against the new openssl anyway.

I will test and make sure I didn't leave out any other support (sqlite, tcl-tk) and submit a rebuilt version.  Thanks for the find.

Offline Arslan S.

  • Hero Member
  • *****
  • Posts: 825
Re: ImportError: No module named _ssl
« Reply #3 on: March 08, 2010, 02:28:53 PM »
after python update i can't load any python modules except ssl i hope rebuilding python packages is not compulsory :(

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: ImportError: No module named _ssl
« Reply #4 on: March 08, 2010, 02:37:34 PM »
I know what it is, I forgot to include in the startup script to copy over the /usr/local/bin binaries as real files otherwise the extension would not work.  I will fix it tonight.

As a temporary workaround, one can use this command to put the python binaries in their right place:

cp -af /tmp/tcloop/python/usr/local/bin/* /usr/local/bin/
« Last Edit: March 08, 2010, 02:46:35 PM by Jason W »

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: ImportError: No module named _ssl
« Reply #5 on: March 08, 2010, 07:55:50 PM »
Uploading fixed version as I speak.