【发布时间】:2020-01-15 04:36:00
【问题描述】:
这里是python的新手,我需要几个用于anaconda的TensorFlow环境(一个是tf,另一个是旧版本)。
人们通常如何做这样的事情?
编辑:遇到一个障碍。删除环境时遇到问题。找到了fix 这个的方法。得到:
PackagesNotFoundError: The following packages are missing from the target environment:
-
现在尝试@B200011011 建议:conda create -n myenv python=3.7 ... got 3.8.1
但我无法安装 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
编辑结束。
编辑 2:
今天有效:
(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 结束。
以下是我尝试过的。
我有:
(base) ...>conda env list
conda environments:
base D:\Anaconda3
* d:\Anaconda3
为什么我有两个?
尝试:conda update --all 获取:
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 update anaconda
我应该继续吗?
当我尝试更新 python 时,我得到:
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。
如果我尝试克隆基地,我会得到:
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有影响吗?
【问题讨论】:
-
我建议使用 pyenv 和 pyenv-virtualenv 来管理不同的 python 环境
-
一个好的起点是使用 conda,如下所述:docs.anaconda.com/anaconda/user-guide/tasks/tensorflow 用于在流行的 IDE 中使用 (ana)conda,例如PyCharm,可以访问此页面:jetbrains.com/help/pycharm/… 我确信,其他主要 IDE 也存在类似的支持页面。
-
你是通过什么方式安装你的python版本和anaconda的?因为 Windows 上同时存在用户模式和系统模式,这可能会产生干扰。要找出答案,您可以在 cmd 中键入以下命令:
where anaconda和where python。这应该会输出安装中找到的位置列表。如果缺少某些内容,您还可以查看PATH以查看添加到那里的天气。
标签: python-3.x windows tensorflow anaconda