我以前安装了tensorflow,但我也想要GPU版本。我不明白为什么我不能在conda中安装tensorflow-gpu,但是我可以在pip中完成它?我使用conda install遇到了很多依赖问题:
(base) cs_u@dual2080:~/Desktop/foo$ conda install tensorflow-gpu
WARNING conda.base.context:use_only_tar_bz2(632): Conda is constrained to only using the old .tar.bz2 file format because you have conda-build installed, and it is <3.18.3. Update or remove conda-build to get smaller downloads and faster extractions.
Collecting package metadata (repodata.json): done
Solving environment: failed
UnsatisfiableError: The following specifications were found to be incompatible with each other:
- pkgs/main/linux-64::_ipyw_jlab_nb_ext_conf==0.1.0=py27_0 -> widgetsnbextension -> notebook[version='>=4.4.1'] -> nbconvert -> bleach
- pkgs/main/linux-64::anaconda==2019.03=py27_0 -> bleach==3.1.0=py27_0
- pkgs/main/linux-64::anaconda==2019.03=py27_0 -> html5lib==1.0.1=py27_0
- pkgs/main/linux-64::anaconda==2019.03=py27_0 -> path.py==11.5.0=py27_0 -> importlib_metadata[version='>=0.5']
- pkgs/main/linux-64::anaconda==2019.03=py27_0 -> zipp==0.3.3=py27_1
- pkgs/main/linux-64::bleach==3.1.0=py27_0
- pkgs/main/linux-64::html5lib==1.0.1=py27_0
- pkgs/main/linux-64::importlib_metadata==0.8=py27_0 -> zipp[version='>=0.3.2']
- pkgs/main/linux-64::ipywidgets==7.4.2=py27_0 -> widgetsnbextension[version='>=3.4.0,<3.5.0'] -> notebook[version='>=4.4.1'] -> nbconvert -> bleach
- pkgs/main/linux-64::jupyter==1.0.0=py27_7 -> notebook -> nbconvert -> bleach
- pkgs/main/linux-64::jupyterlab==0.33.11=py27_0 -> notebook[version='>=4.3.1'] -> nbconvert -> bleach
- pkgs/main/linux-64::jupyterlab_launcher==0.11.2=py27h28b3542_0 -> notebook -> nbconvert -> bleach
- pkgs/main/linux-64::nbconvert==5.4.1=py27_3 -> bleach
- pkgs/main/linux-64::notebook==5.7.8=py27_0 -> nbconvert -> bleach
- pkgs/main/linux-64::path.py==11.5.0=py27_0 -> importlib_metadata[version='>=0.5']
- pkgs/main/linux-64::spyder==3.3.3=py27_0 -> nbconvert -> bleach
- pkgs/main/linux-64::widgetsnbextension==3.4.2=py27_0 -> notebook[version='>=4.4.1'] -> nbconvert -> bleach
- pkgs/main/linux-64::zipp==0.3.3=py27_1
不过,点子很好:
(base) cs_u@dual2080:~/Desktop/3DAdversarial/neural_renderer-master$ pip install tensorflow-gpu
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
Collecting tensorflow-gpu
Downloading https://files.pythonhosted.org/packages/41/6d/2348df00a34baaabdef0fdb4f46f962f7a8a6720362c26c3a44a249767ea/tensorflow_gpu-1.14.0-cp27-cp27mu-manylinux1_x86_64.whl (377.0MB)
100% |████████████████████████████████| 377.0MB 159kB/s
Requirement already satisfied: keras-preprocessing>=1.0.5 in /home/cs_u/anaconda2/lib/python2.7/site-packages (from tensorflow-gpu) (1.1.0)
Requirement already satisfied: wrapt>=1.11.1 in /home/cs_u/anaconda2/lib/python2.7/site-packages (from tensorflow-gpu) (1.11.1)
Requirement already satisfied: astor>=0.6.0 in /home/cs_u/anaconda2/lib/python2.7/site-packages (from tensorflow-gpu) (0.7.1)
Requirement already satisfied: numpy<2.0,>=1.14.5 in /home/cs_u/anaconda2/lib/python2.7/site-packages (from tensorflow-gpu) (1.16.2)
Requirement already satisfied: wheel in /home/cs_u/anaconda2/lib/python2.7/site-packages (from tensorflow-gpu) (0.33.1)
Requirement already satisfied: mock>=2.0.0 in /home/cs_u/anaconda2/lib/python2.7/site-packages (from tensorflow-gpu) (3.0.5)
Requirement already satisfied: termcolor>=1.1.0 in /home/cs_u/anaconda2/lib/python2.7/site-packages (from tensorflow-gpu) (1.1.0)
Requirement already satisfied: google-pasta>=0.1.6 in /home/cs_u/anaconda2/lib/python2.7/site-packages (from tensorflow-gpu) (0.1.7)
Requirement already satisfied: gast>=0.2.0 in /home/cs_u/anaconda2/lib/python2.7/site-packages (from tensorflow-gpu) (0.2.2)
Requirement already satisfied: tensorflow-estimator<1.15.0rc0,>=1.14.0rc0 in /home/cs_u/anaconda2/lib/python2.7/site-packages (from tensorflow-gpu) (1.14.0)
Requirement already satisfied: protobuf>=3.6.1 in /home/cs_u/anaconda2/lib/python2.7/site-packages (from tensorflow-gpu) (3.8.0)
Requirement already satisfied: absl-py>=0.7.0 in /home/cs_u/anaconda2/lib/python2.7/site-packages (from tensorflow-gpu) (0.7.1)
Requirement already satisfied: enum34>=1.1.6 in /home/cs_u/anaconda2/lib/python2.7/site-packages (from tensorflow-gpu) (1.1.6)
Requirement already satisfied: six>=1.10.0 in /home/cs_u/anaconda2/lib/python2.7/site-packages (from tensorflow-gpu) (1.12.0)
Requirement already satisfied: keras-applications>=1.0.6 in /home/cs_u/anaconda2/lib/python2.7/site-packages (from tensorflow-gpu) (1.0.8)
Requirement already satisfied: tensorboard<1.15.0,>=1.14.0 in /home/cs_u/anaconda2/lib/python2.7/site-packages (from tensorflow-gpu) (1.14.0)
Requirement already satisfied: grpcio>=1.8.6 in /home/cs_u/anaconda2/lib/python2.7/site-packages (from tensorflow-gpu) (1.16.1)
Requirement already satisfied: backports.weakref>=1.0rc1 in /home/cs_u/anaconda2/lib/python2.7/site-packages (from tensorflow-gpu) (1.0.post1)
Requirement already satisfied: funcsigs>=1; python_version < "3.3" in /home/cs_u/anaconda2/lib/python2.7/site-packages (from mock>=2.0.0->tensorflow-gpu) (1.0.2)
Requirement already satisfied: setuptools in /home/cs_u/anaconda2/lib/python2.7/site-packages (from protobuf>=3.6.1->tensorflow-gpu) (40.8.0)
Requirement already satisfied: h5py in /home/cs_u/anaconda2/lib/python2.7/site-packages (from keras-applications>=1.0.6->tensorflow-gpu) (2.9.0)
Requirement already satisfied: futures>=3.1.1; python_version < "3" in /home/cs_u/anaconda2/lib/python2.7/site-packages (from tensorboard<1.15.0,>=1.14.0->tensorflow-gpu) (3.2.0)
Requirement already satisfied: werkzeug>=0.11.15 in /home/cs_u/anaconda2/lib/python2.7/site-packages (from tensorboard<1.15.0,>=1.14.0->tensorflow-gpu) (0.14.1)
Requirement already satisfied: markdown>=2.6.8 in /home/cs_u/anaconda2/lib/python2.7/site-packages (from tensorboard<1.15.0,>=1.14.0->tensorflow-gpu) (3.1.1)
Installing collected packages: tensorflow-gpu
Successfully installed tensorflow-gpu-1.14.0
有人可以澄清我是否可以通过安装在pip中来绕过Conda中的依赖问题吗?