0

我的linux中默认的PyThon环境是:Python 3.6.2 :: Anaconda custom (64-bit),我创建了虚拟环境:Python 2.7.14 :: Anaconda custom (64-bit)

首先,我进入 Aanconda 虚拟环境:source activate python27

然后,我安装了caffe2,出现错误:ImportError:No module named google.protobuf.internal

所以,我用conda安装protobuf:,conda install protobuf但是错误依旧存在。我用pip install protobuf的时候,错误消失了。

有什么不同:

conda install package_name
pip install package_name
/opt/anaconda3/envs/python27/bin/pip install package_name
apt install package_name

pip install package_name一样的/opt/anaconda3/envs/python27/bin/pip install package_name吗?当 I 时which pip,它显示:/opt/anaconda3/envs/python27/bin/pip

谢谢!

4

0 回答 0