简体   繁体   English

降级Python破坏了Conda

[英]Downgrading Python Breaks Conda

I have Python 3.7 installed, which apparently doesn't support Keras. 我安装了Python 3.7,它显然不支持Keras。 When I try to download Keras using conda, Python gets downgraded to 3.6.8 and Conda stops working. 当我尝试使用conda下载Keras时,Python降级为3.6.8,Conda停止工作。

When I try to run Conda, I get the following error, 当我尝试运行Conda时,出现以下错误,

    from conda.cli import main
ModuleNotFoundError: No module named 'conda'

I also tried to downgrade Python directly by running, 我还尝试通过运行直接降级Python,

conda install python==3.6

and I got the same behaviour. 和我有相同的行为。

Could anyone please help in solving this frustrating issue? 有人可以帮助解决这个令人沮丧的问题吗?

Anaconda is not stable in python 3.7 but you need to create environment for installing keras using conda Anaconda在python 3.7中不稳定,但是您需要使用conda创建用于安装keras的环境

conda create -n yourEnvName python

Now activate that environment using following command 现在使用以下命令激活该环境

activate yourEnvName

Next install tensorflow and keras for it using pip command 接下来使用pip命令为其安装tensorflow和keras

pip install tensorflow
pip install keras

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM