Python 和 pip 版本不同,可能会导致问题 [英] Python and pip versions are different and potentially causing problem

查看:82
本文介绍了Python 和 pip 版本不同,可能会导致问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的驱动器中同时安装了 3.6 和 3.8 python 版本,并且我正在使用 Anaconda 作为带有 Python 3.6 的虚拟环境.当我在 cmd 提示符下说:

I have both 3.6 and 3.8 python versions installed in my drive and I am using Anaconda for virtual environment with Python 3.6. When I say in cmd prompt:

  >python -V
Python 3.6.10 :: Anaconda, Inc.

但是,当我查找 pip 版本时,它会显示

However when I look for pip versions it shows

  >pip3 -V
pip 20.1.1 from c:python38libsite-packagespip (python 3.8)

当我使用 pip install -e 时,我认为这是问题的原因.当我的虚拟环境处于活动状态时:

I'm thinking this the cause of the problem when I use pip install -e . while my virtual environment is active:

ERROR: Could not find a version that satisfies the requirement torch==1.3.1 (from spinup==0.2.0) (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2)
ERROR: No matching distribution found for torch==1.3.1 (from spinup==0.2.0)

我该如何解决这个问题?

How can I solve this ?

推荐答案

由于@FlyingTeller 建议删除任何单独的 python 版本,然后 Anaconda 解决了 pip 和 python 之间的混淆.然而并没有解决实际问题.我会关闭这个问题并打开另一个问题,谢谢.

As @FlyingTeller suggests removing any seperate python version then Anaconda solve the confusion between pip and python. However didn't solve the actual problem. I will close this question and open another one, thanks.

这篇关于Python 和 pip 版本不同,可能会导致问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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