简体   繁体   中英

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.

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

I need a Python 3.5, Numpy 1.10 and scikit-learn 0.17 but I don't know how. Anyone knows how to do it?

Python 3.5, Numpy 1.10 and 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.

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. 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 :

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. For example, $ which python will show the newly installed interpreter, and $ 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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