2

I'm trying to run this notebook on Google Cloud Datalab: https://github.com/GoogleCloudPlatform/training-data-analyst/blob/master/courses/machine_learning/feateng/feateng.ipynb

While it was perfectly working yesterday, today running the first block results in cffi.error.VerificationError (undefined symbol: SSLv2_client_method).

Can you advise on how I can fix this?

I've tried to do the same from a different GC profile and the problem remains. I've also tried to fix 'pip install' as described here: pip install fails with "connection error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:598)". Doing this in Datalab causes the same error; doing this in Cloud shell outside Datalab doesn't change anything.

Daria
  • 53
  • 6
  • Looks like "too new" version of SSL or "too old" version of an Python cffi extension. SSLv2_client_method was removed as deprecated from version 1.1.0 – Timur Samkharadze Oct 24 '18 at 12:19
  • I have the following installed in Datalab: Python 2.7.15 :: Anaconda, Inc., OpenSSL 1.0.2p 14 Aug 2018, pip 18.0 from /usr/local/envs/py2env/lib/python2.7/site-packages/pip (python 2.7) Error occurs on running "pip uninstall -y google-cloud-dataflow" – Daria Oct 24 '18 at 13:07
  • Might you try to uninstall this manually? sudo rm -rf /usr/local/lib/python2.7/dist-packages/google-cloud-dataflow or something like that – Timur Samkharadze Oct 24 '18 at 13:21
  • Subsequent install will cause the same error.. – Daria Oct 25 '18 at 09:48

1 Answers1

0

This has been answered on github by @ekuuni:

https://github.com/GoogleCloudPlatform/training-data-analyst/issues/313

%%bash
source activate py2env
conda install -y pytz
conda update -y pyopenssl
pip uninstall -y google-cloud-dataflow
pip install --upgrade apache-beam[gcp]

I needed these 2 more lines for it to work.

pip install tensorflow_transform
pip install tensorflow==1.9.0

A good workaround is using virtual environments rather than Datalab so you don't have to deal with version updates:

https://cloud.google.com/dataflow/docs/quickstarts/quickstart-python

I have successfully installed the following on python 2.7

apache-beam==2.7.0
tensorflow==1.11.0
tensorflow-transform==0.8.0
Salma R
  • 194
  • 1
  • 12