在合作式上安装Cleverhans



我正在尝试安装cleverhans(https://github.com/tensorflow/cleverhans)

我正在运行以下命令

!pip install -q -e git+http://github.com/tensorflow/cleverhans.git#egg=cleverhans

但是,当我尝试做import cleverhans时,我会发现一个错误,说没有这样的模块。

ps如果我尝试在本地计算机上安装模块,则源存储在~/.src/cleverhans中。

看起来安装无法正确更新Python路径。这是一个对我有用的片段:

!pip install -qq -e git+http://github.com/tensorflow/cleverhans.git#egg=cleverhans
import sys
sys.path.append('/content/src/cleverhans')
import cleverhans

最新更新