当前位置: 动力学知识库 > 问答 > 编程问答 >

conda - Anaconda environment for CPU and GPU versions of TensorFlow

问题描述:

I want to create two separate environments with TensorFlow in anaconda, one with CPU only support, which is compiled from sources, and one with GPU support using official Tensorflow binaries.

I have set up two environments with conda, using conda create -n gpu --clone root. I activate my new environment using source activate gpu. However, whenever I install a TensorFlow version using pip, the old environment is affected as well.

What am I doing wrong?

网友答案:

Conda uses hard links extensively. It's likely that pip is overwriting files that conda has already created, without removing the file first, and thereby affecting files in your other conda environments.

Try adding the --copy flag to your create --clone command.

分享给朋友:
您可能感兴趣的文章:
随机阅读: