error: Pip package install meet RequestsDependencyWarningfirst when update by:
!pip install --quiet lucid==0.2.3
the warning is relavent to old crypto:
~/isic/local/lib/python2.7/site-packages/pip/_vendor/requests/__init__.py:83: RequestsDependencyWarning: Old version of cryptography ([1, 2, 3]) may cause slowdown.
warnings.warn(warning, RequestsDependencyWarning)
therefore update:
sudo pip install --upgrade cryptography
the version is upgraded, But something broken, cause:
$pip list
Traceback (most recent call last):
File "/isic/bin/pip", line 7, in <module>
from pip._internal import main
File "/isic/local/lib/python2.7/site-packages/pip/_internal/__init__.py", line 40, in <module>
from pip._internal.cli.autocompletion import autocomplete
File "/isic/local/lib/python2.7/site-packages/pip/_internal/cli/autocompletion.py", line 8, in <module>
from pip._internal.cli.main_parser import create_main_parser
File "/isic/local/lib/python2.7/site-packages/pip/_internal/cli/main_parser.py", line 12, in <module>
from pip._internal.commands import (
File "/isic/local/lib/python2.7/site-packages/pip/_internal/commands/__init__.py", line 6, in <module>
from pip._internal.commands.completion import CompletionCommand
File "/isic/local/lib/python2.7/site-packages/pip/_internal/commands/completion.py", line 6, in <module>
from pip._internal.cli.base_command import Command
File "/isic/local/lib/python2.7/site-packages/pip/_internal/cli/base_command.py", line 18, in <module>
from pip._internal.download import PipSession
File "/isic/local/lib/python2.7/site-packages/pip/_internal/download.py", line 15, in <module>
from pip._vendor import requests, six, urllib3
File "/isic/local/lib/python2.7/site-packages/pip/_vendor/requests/__init__.py", line 97, in <module>
from pip._vendor.urllib3.contrib import pyopenssl
File "/isic/local/lib/python2.7/site-packages/pip/_vendor/urllib3/contrib/pyopenssl.py", line 46, in <module>
import OpenSSL.SSL
File "/usr/lib/python2.7/dist-packages/OpenSSL/__init__.py", line 8, in <module>
from OpenSSL import rand, crypto, SSL
File "/usr/lib/python2.7/dist-packages/OpenSSL/SSL.py", line 118, in <module>
SSL_ST_INIT = _lib.SSL_ST_INIT
AttributeError: 'module' object has no attribute 'SSL_ST_INIT'
Resolved this by resintalling PyOpenSSL() and pip will automatically upgrade:
sudo python -m easy_install --upgrade pyOpenSSL
pip --version
pip 18.1 from ~/isic/local/lib/python2.7/site-packages/pip (python 2.7)
The added layer must be an instance of class Layer. Found:
change
from tensorflow.python.keras.models import load_model
to
from keras.models import load_model