Forums

ImportError: ~/anaconda/envs/myenv/lib/python2.7/lib-dynload/_ssl.so: undefined symbol: SSLv2_method

I am deploying a python app which uses visualizes data with Bokeh + Flask + Tornedo. The app works fine locally, but when I deploy it on PE, I get the following error. Can you please help what this error mean?

*

2015-05-05 11:16:58,937 :Traceback (most recent call last):
2015-05-05 11:16:58,937 :  File "/bin/user_wsgi_wrapper.py", line 130, in __call__
2015-05-05 11:16:58,937 :    self.error_log_file.logger.exception("Error running WSGI application")
2015-05-05 11:16:58,937 :  File "/home/yabebal/anaconda/envs/sdmenv/lib/python2.7/logging/__init__.py", line 1193, in exception
2015-05-05 11:16:58,938 :    self.error(msg, *args, **kwargs)
2015-05-05 11:16:58,938 :  File "/home/yabebal/anaconda/envs/sdmenv/lib/python2.7/logging/__init__.py", line 1186, in error
2015-05-05 11:16:58,938 :    self._log(ERROR, msg, args, **kwargs)
2015-05-05 11:16:58,938 :  File "/home/yabebal/anaconda/envs/sdmenv/lib/python2.7/logging/__init__.py", line 1278, in _log
2015-05-05 11:16:58,939 :    record = self.makeRecord(self.name, level, fn, lno, msg, args, exc_info, func, extra)
2015-05-05 11:16:58,939 :  File "/home/yabebal/anaconda/envs/sdmenv/lib/python2.7/logging/__init__.py", line 1252, in makeRecord
2015-05-05 11:16:58,939 :    rv = LogRecord(name, level, fn, lno, msg, args, exc_info, func)
2015-05-05 11:16:58,940 :  File "/home/yabebal/anaconda/envs/sdmenv/lib/python2.7/logging/__init__.py", line 291, in __init__
2015-05-05 11:16:58,940 :    self.threadName = threading.current_thread().name
2015-05-05 11:16:58,940 :  File "/home/yabebal/anaconda/envs/sdmenv/lib/python2.7/threading.py", line 1160, in currentThread
2015-05-05 11:16:58,941 :    return _active[_get_ident()]
2015-05-05 11:16:58,941 :  File "/bin/user_wsgi_wrapper.py", line 122, in __call__
2015-05-05 11:16:58,941 :    app_iterator = self.app(environ, start_response)
2015-05-05 11:16:58,941 :  File "/bin/user_wsgi_wrapper.py", line 136, in import_error_application
2015-05-05 11:16:58,942 :    raise e
2015-05-05 11:16:58,942 :ImportError: /home/yabebal/anaconda/envs/sdmenv/lib/python2.7/lib-dynload/_ssl.so: undefined symbol: SSLv2_method

Did you upload that "anaconda/envs" folder from your own PC? I don't think an anaconda environment is going to work if you transfer it from a local PC to a server, because the operating systems are going to be different.

You could re-create a virtualenv for your project. There's some tips here: https://www.pythonanywhere.com/wiki/Virtualenvs

Another question -- when you said "tornedo", did you mean "tornado"? If you're trying to use websockets, I'm afraid we don't support them -- it's wsgi apps only for now...

Thank you so much harry for the quick reply!

> Did you upload that "anaconda/envs" folder from your own PC? I don't think an anaconda environment is going to work if you transfer it from a local PC to a server, because the operating systems are going to be different.

I installed anaconda from the binary in the PE machine.

> If you're trying to use websockets, I'm afraid we don't support them -- it's wsgi apps only for now

Yes I mean tornado, sorry for the misspelling. Yes the app I am trying to run uses websockets. It is bad that the websockets are not supported, I will try to modify my app to run without websockets then.

I have same problem

I see that your virtualenv is called "anaconda". Are you using the Anaconda Python distribution to create the virtualenv? If you are, I don't think it will work. It's unlikely that a virtualenv with a random Python binary in it will work with the web infrastructure on PythonAnywhere.