Tiny Core Linux

Tiny Core Extensions => TCE Bugs => Topic started by: Arslan S. on March 07, 2010, 03:04:32 PM

Title: ImportError: No module named _ssl
Post by: Arslan S. 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
>>>

Title: Re: ImportError: No module named _ssl
Post by: Jason W 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.
Title: Re: ImportError: No module named _ssl
Post by: Jason W 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.
Title: Re: ImportError: No module named _ssl
Post by: Arslan S. 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 :(
Title: Re: ImportError: No module named _ssl
Post by: Jason W 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/
Title: Re: ImportError: No module named _ssl
Post by: Jason W on March 08, 2010, 07:55:50 PM
Uploading fixed version as I speak.