如何在Anaconda中为Tensorflow创建一些环境? [英] How to create some environments for tensorflow in anaconda?

查看:424
本文介绍了如何在Anaconda中为Tensorflow创建一些环境?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这里是python的新手,我需要几个TensorFlow环境用于anaconda(一个是tf,另一个是旧版本).

Fairly new to python here, I need a couple of TensorFlow environments for anaconda (one is tf, while the other is an older version).

人们通常如何做这样的事情?

How do people usually do stuff like this?

遇到一个障碍.在删除环境时遇到问题.找到了修复的方法.正在获取:

got by one obstacle. Was having problems removing environments. Found way to fix this. Was getting:

    PackagesNotFoundError: The following packages are missing from the target environment:

  -

现在要尝试@ B200011011建议:conda create -n myenv python = 3.7 ...得到了3.8.1

Now going to try @B200011011 suggestion: conda create -n myenv python=3.7 ... got 3.8.1

但我无法安装tensorflow:

but I can not install tensorflow:

...>pip install tensorflow
ERROR: Could not find a version that satisfies the requirement tensorflow (from versions: none)
ERROR: No matching distribution found for tensorflow

编辑结束.

今天有效:

(base) D:\ray\dev\ml\DC to Edge Course>conda update conda
Collecting package metadata (current_repodata.json): done
Solving environment: done

# All requested packages already installed.

编辑结束2.

以下是我尝试过的内容.

Below is what I have tried.

我有:

(base) ...>conda env list

  conda environments:

base                     D:\Anaconda3
                      *  d:\Anaconda3

为什么我有两个?

尝试:conda更新-全部获取:

Trying: conda update --all gets:

The following packages will be DOWNGRADED:

  anaconda                                   2019.10-py37_0 --> custom-py37_1
  pycosat                              0.6.3-py37hfa6e2cd_0 --> 0.6.3-py37he774522_0

当我执行以下操作时也会发生同样的事情:conda更新anaconda

Same thing happens when i do a: conda update anaconda

我应该继续吗?

当我尝试更新python时,我得到了:

When i try to update python, i get:

Updating python is constricted by

anaconda -> requires python==3.7.4=h5263a28_0

If you are sure you want an update of your package either try `conda update --all` or install a specific version of the package you want using `conda install <pkg>=<version>`

done

# All requested packages already installed.

我应该继续吗?

当我创建一个新环境时,其中没有python.

When I create a new environment, it has no python in it.

如果我尝试克隆碱基,我会得到:

if i try to clone the base, I get:

The following packages cannot be cloned out of the root environment:
 - defaults/win-64::conda-4.8.1-py37_0
 - defaults/win-64::conda-build-3.18.9-py37_3
 - defaults/win-64::conda-env-2.6.0-1

这是做什么的?会对tensoflow产生影响吗?

What did this do? Will it have any effect on tensoflow?

推荐答案

出现错误,

我们更喜欢使用conda install <package>代替pip install <package>

这篇关于如何在Anaconda中为Tensorflow创建一些环境?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆