0

I attempted to put push message to apple push notification server via python ssl socket. but fail to do this on python 3.3.1.

Python 3.3.1 (default, Apr  9 2013, 14:40:22) 
[GCC 4.4.5] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 
>>> import ssl
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "./ssl.py", line 60, in <module>
    import _ssl             # if we can't import it, let the error propagate
ImportError: No module named '_ssl'
>>>
Luke Woodward
  • 63,336
  • 16
  • 89
  • 104
user2130310
  • 13
  • 1
  • 3

1 Answers1

0

this happens when you not install python3 properly (missing dependencies), for more information, click here

basicallyyou have to sudo apt-get install <package_name>, <package_name> is missing module name with leading dash that you'll find when install python with make test from source and it fails unexpected. <package_name> is normally ends with -dev suffix. and more often it with lib prefix too. so you can search it with apt-cache search <package_name>.*-dev$.

then you can test with make test under python source directory. At the end, reinstall your python with ./configure make and make insall

as to your question, issue sudo apt-get install libssl-dev. then reinsall python.

Community
  • 1
  • 1
Interaction
  • 147
  • 1
  • 5