简体   繁体   English

当我尝试安装NUMPY 1.10时,conda降级了Python 3.5

[英]Python 3.5 Downgraded by conda when I try to install NUMPY 1.10

This is getting really frustrating. 这真令人沮丧。 Whenever I try to install Numpy on the prompt, Python will be downgraded to 2.7 and I can't do anything about it. 每当我尝试在提示符下安装Numpy时,Python都将降级到2.7,而我对此无能为力。

Here's the ss: 这是ss: 在此处输入图片说明

I need a Python 3.5, Numpy 1.10 and scikit-learn 0.17 but I don't know how. 我需要Python 3.5,Numpy 1.10和scikit-learn 0.17,但我不知道如何。 Anyone knows how to do it? 有人知道该怎么做吗?

Python 3.5, Numpy 1.10 and scikit-learn 0.17 Python 3.5,Numpy 1.10和scikit-learn 0.17

Those versions are on the old side. 这些版本偏旧。 I imagine you are trying to get as close as possible to the environment used by the author of some tutorial that was written a while ago. 我想您正在尝试尽可能接近前一段时间编写的某些教程的作者所使用的环境。 A fresh install might give you 1.16 and 0.20. 全新安装可能会给您1.16和0.20。

The conda solver was having trouble finding a compatible set of package versions using your python 3.5, which apparently led it to rewind back in time to a fairly early set of versions. conda求解器在使用python 3.5查找兼容的软件包版本时遇到了麻烦,这显然导致其及时退回到相当早的一组版本。 I recommend relaxing the constraint, from "equal" to "greater-or-equal": 我建议放宽约束,从“相等”到“大于或等于”:

conda install numpy>=1.10

If you get a somewhat more recent version, the tutorial likely will still work fine. 如果您获得的版本较新,则该教程可能仍会正常工作。

If you want to use multiple constraints, you may find it convenient to put them in an environment.yml file, and use conda env update : 如果要使用多个约束,可能会发现将它们放置在environment.yml文件中并使用conda env update很方便:

name: tutorial
channels:
  - defaults
  - conda-forge
dependencies:
  - python >= 3.5
  - numpy >= 1.10
  - scikit-learn >= 0.17

Remember to use conda activate tutorial so your PATH will use that environment. 请记住使用conda activate tutorial以便您的PATH将使用该环境。 For example, $ which python will show the newly installed interpreter, and $ python -c 'import pprint, sys; pprint.pprint(sys.path)' 例如, $ which python将显示新安装的解释器,以及$ python -c 'import pprint, sys; pprint.pprint(sys.path)' $ python -c 'import pprint, sys; pprint.pprint(sys.path)' will mention a directory containing the new numpy library plus a bunch of transitive deps. $ python -c 'import pprint, sys; pprint.pprint(sys.path)'将提到一个目录,其中包含新的numpy库以及一堆可传递的deps。

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

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