我已经在conda环境(fastai_07)中将numpy从1.16.1降级到1.15.1,但是我仍然得到numpy 1.16.1:
(fastai_07) robin@xps:~/github/fastai$ python
Python 3.6.8 |Anaconda, Inc.| (default, Dec 30 2018, 01:22:34)
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>> numpy.version.version
'1.16.1'
这就是我所做的:
(fastai_07) robin@xps:~/github/fastai$ conda install numpy=1.15.1
WARNING: The conda.compat module is deprecated and will be removed in a future release.
Collecting package metadata: done
Solving environment: done
## Package Plan ##
environment location: /home/robin/anaconda3/envs/fastai_07
added / updated specs:
- numpy=1.15.1
The following packages will be downloaded:
package | build
---------------------------|-----------------
numpy-1.15.1 | py36h3b04361_0 37 KB
numpy-base-1.15.1 | py36h81de0dd_0 4.2 MB
------------------------------------------------------------
Total: 4.2 MB
The following packages will be SUPERSEDED by a higher-priority channel:
spacy fastai::spacy-2.0.18-py36hf484d3e_1000 --> pkgs/main::spacy-2.0.16-py36h962f231_0
The following packages will be DOWNGRADED:
mkl 2019.3-199 --> 2018.0.3-1
mkl_fft 1.0.10-py36ha843d7b_0 --> 1.0.6-py36h7dd41cf_0
mkl_random 1.0.2-py36hd81dba3_0 --> 1.0.1-py36h4414c95_1
numexpr 2.6.9-py36h9e4a6bb_0 --> 2.6.8-py36hd89afb7_0
numpy 1.16.2-py36h7e9f1db_0 --> 1.15.1-py36h3b04361_0
numpy-base 1.16.2-py36hde5b4d6_0 --> 1.15.1-py36h81de0dd_0
scipy 1.2.1-py36h7c811a0_0 --> 1.1.0-py36hfa4b5c9_1
Proceed ([y]/n)? y
Downloading and Extracting Packages
numpy-base-1.15.1 | 4.2 MB | ################################################################################################################################################################# | 100%
numpy-1.15.1 | 37 KB | ################################################################################################################################################################# | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
哪个python给出了
(fastai_07) robin@xps:~/github/fastai$ which python
/home/robin/anaconda3/envs/fastai_07/bin/python
和conda列表:
(fastai_07) robin@xps:~/github/fastai$ conda list
WARNING: The conda.compat module is deprecated and will be removed in a future release.
# packages in environment at /home/robin/anaconda3/envs/fastai_07:
#
# Name Version Build Channel
asn1crypto 0.24.0 py36_0
attrs 19.1.0 py36_1
backcall 0.1.0 py36_0
backports 1.0 py36_1
backports.os 0.1.1 py36_0
bcolz 1.2.1 py36h04863e7_0
beautifulsoup4 4.6.3 pypi_0 pypi
blas 1.0 mkl
bleach 3.1.0 py36_0
blosc 1.15.0 hd408876_0
bokeh 1.0.4 py36_0
bzip2 1.0.6 h14c3975_5
ca-certificates 2019.1.23 0
certifi 2019.3.9 py36_0
cffi 1.12.2 py36h2e261b9_1
chardet 3.0.4 py36_1
click 7.0 py36_0
cliff 2.8.2 pypi_0 pypi
cloudpickle 0.8.0 py36_0
cmd2 0.9.11 pypi_0 pypi
colorama 0.4.1 pypi_0 pypi
configparser 3.7.4 pypi_0 pypi
cryptography 2.6.1 py36h1ba5d50_0
cssselect 1.0.3 pypi_0 pypi
cuda90 1.0 h6433d27_0 pytorch
cudatoolkit 10.0.130 0
cudnn 7.3.1 cuda10.0_0
cycler 0.10.0 py36_0
cymem 2.0.2 py36hfd86e86_0
cython 0.29.6 py36he6710b0_0
cytoolz 0.9.0.1 py36h14c3975_1
dask 1.1.4 py36_1
dask-core 1.1.4 py36_1
dbus 1.13.6 h746ee38_0
decorator 4.4.0 py36_1
defusedxml 0.5.0 py36_1
descartes 1.1.0 pypi_0 pypi
dill 0.2.9 py36_0
distributed 1.26.0 py36_0
entrypoints 0.3 py36_0
expat 2.2.6 he6710b0_0
feather-format 0.4.0 pypi_0 pypi
fontconfig 2.13.0 h9420a91_0
freetype 2.9.1 h8a8886c_1
glib 2.56.2 hd408876_0
gmp 6.1.2 h6c8ec71_1
gst-plugins-base 1.14.0 hbbd80ab_1
gstreamer 1.14.0 hb453b48_1
hdf5 1.10.4 hb1b8bf9_0
heapdict 1.0.0 py36_2
html5lib 1.0.1 py36_0
icu 58.2 h9c2bf20_1
idna 2.8 py36_0
importlib_metadata 0.8 py36_0
intel-openmp 2019.3 199
ipykernel 5.1.0 py36h39e3cac_0
ipython 7.4.0 py36h39e3cac_0
ipython_genutils 0.2.0 py36_0
ipywidgets 7.4.2 py36_0
isoweek 1.3.3 pypi_0 pypi
jedi 0.13.3 py36_0
jinja2 2.10 py36_0
jpeg 9b h024ee3a_2
jsonschema 3.0.1 py36_0
jupyter 1.0.0 py36_7
jupyter_client 5.2.4 py36_0
jupyter_console 6.0.0 py36_0
jupyter_core 4.4.0 py36_0
kaggle-cli 0.12.13 pypi_0 pypi
kiwisolver 1.0.1 py36hf484d3e_0
libedit 3.1.20181209 hc058e9b_0
libffi 3.2.1 hd88cf55_4
libgcc-ng 8.2.0 hdf63c60_1
libgfortran-ng 7.3.0 hdf63c60_0
libiconv 1.15 h63c8f33_5
libpng 1.6.36 hbc83047_0
libsodium 1.0.16 h1bed415_0
libstdcxx-ng 8.2.0 hdf63c60_1
libtiff 4.0.10 h2733197_2
libuuid 1.0.3 h1bed415_2
libxcb 1.13 h1bed415_1
libxml2 2.9.9 he19cac6_0
locket 0.2.0 py36_1
lxml 4.0.0 pypi_0 pypi
lzo 2.10 h49e0be7_2
markupsafe 1.1.1 py36h7b6447c_0
matplotlib 3.0.3 pypi_0 pypi
mechanicalsoup 0.8.0 pypi_0 pypi
mistune 0.8.4 py36h7b6447c_0
mizani 0.5.4 pypi_0 pypi
mkl 2018.0.3 1
mkl_fft 1.0.6 py36h7dd41cf_0
mkl_random 1.0.1 py36h4414c95_1
msgpack-numpy 0.4.3.2 py36_0
msgpack-python 0.6.1 py36hfd86e86_1
murmurhash 1.0.2 py36he6710b0_0
nbconvert 5.4.1 py36_3
nbformat 4.4.0 py36_0
ncurses 6.1 he6710b0_1
notebook 5.7.8 py36_0
numexpr 2.6.8 py36hd89afb7_0
numpy 1.15.1 py36h3b04361_0
numpy-base 1.15.1 py36h81de0dd_0
olefile 0.46 py36_0
openssl 1.1.1b h7b6447c_1
packaging 19.0 py36_0
palettable 3.1.1 pypi_0 pypi
pandas 0.24.2 py36he6710b0_0
pandas-summary 0.0.5 pypi_0 pypi
pandoc 2.2.3.2 0
pandocfilters 1.4.2 py36_1
parso 0.3.4 py36_0
partd 0.3.10 py36_1
path.py 11.5.0 py36_0
patsy 0.5.1 py36_0
pbr 5.1.3 pypi_0 pypi
pcre 8.43 he6710b0_0
pdpbox 0.1 pypi_0 pypi
pexpect 4.6.0 py36_0
pickleshare 0.7.5 py36_0
pillow 5.4.1 py36h34e0f95_0
pip 19.0.3 py36_0
plac 0.9.6 py36_0
plotnine 0.5.1 pypi_0 pypi
preshed 2.0.1 py36he6710b0_0
prettytable 0.7.2 pypi_0 pypi
progressbar2 3.34.3 pypi_0 pypi
prometheus_client 0.6.0 py36_0
prompt_toolkit 2.0.9 py36_0
psutil 5.6.1 py36h7b6447c_0
ptyprocess 0.6.0 py36_0
pyarrow 0.13.0 pypi_0 pypi
pycparser 2.19 py36_0
pygments 2.3.1 py36_0
pyhamcrest 1.9.0 pypi_0 pypi
pyopenssl 19.0.0 py36_0
pyparsing 2.3.1 py36_0
pyperclip 1.7.0 pypi_0 pypi
pyqt 5.9.2 py36h05f1152_2
pyrsistent 0.14.11 py36h7b6447c_0
pysocks 1.6.8 py36_0
pytables 3.5.1 py36h71ec239_0
python 3.6.8 h0371630_0
python-dateutil 2.8.0 py36_0
python-graphviz 0.10.1 pypi_0 pypi
python-utils 2.3.0 pypi_0 pypi
pytorch 0.3.1 py36_cuda9.0.176_cudnn7.0.5_2 [cuda90] pytorch
pytz 2018.9 py36_0
pyyaml 5.1 py36h7b6447c_0
pyzmq 18.0.0 py36he6710b0_0
qt 5.9.7 h5867ecd_1
qtconsole 4.4.3 py36_0
readline 7.0 h7b6447c_5
regex 2018.01.10 py36h14c3975_1000 fastai
requests 2.21.0 py36_0
scikit-learn 0.20.3 pypi_0 pypi
scikit-misc 0.1.1 pypi_0 pypi
scipy 1.1.0 py36hd20e5f9_0
seaborn 0.9.0 py36_0
send2trash 1.5.0 py36_0
setuptools 40.8.0 py36_0
simplegeneric 0.8.1 py36_2
sip 4.19.8 py36hf484d3e_0
six 1.12.0 py36_0
sklearn-pandas 1.8.0 pypi_0 pypi
snappy 1.1.7 hbae5bb6_3
sortedcontainers 2.1.0 py36_0
spacy 2.0.16 py36h962f231_0
sqlite 3.27.2 h7b6447c_0
statsmodels 0.9.0 py36h035aef0_0
stevedore 1.30.1 pypi_0 pypi
tblib 1.3.2 py36_0
terminado 0.8.1 py36_1
testfixtures 6.6.0 py_0
testpath 0.4.2 py36_0
thinc 6.12.1 py36h637b7d7_1000 fastai
tk 8.6.8 hbc83047_0
toolz 0.9.0 py36_0
torchtext 0.2.3 pypi_0 pypi
torchvision 0.1.9 pypi_0 pypi
tornado 4.5.3 py36_0
tqdm 4.31.1 py36_1
traitlets 4.3.2 py36_0
ujson 1.35 py36h14c3975_0
urllib3 1.24.1 py36_0
wcwidth 0.1.7 py36_0
webencodings 0.5.1 py36_1
wheel 0.33.1 py36_0
widgetsnbextension 3.4.2 py36_0
wrapt 1.10.11 py36h14c3975_2
xz 5.2.4 h14c3975_4
yaml 0.1.7 had09818_2
zeromq 4.3.1 he6710b0_3
zict 0.1.4 py36_0
zipp 0.3.3 py36_1
zlib 1.2.11 h7b6447c_3
zstd 1.3.7 h0b5b093_0
您能帮我使numpy 1.15.1在这种环境下工作吗? *请告诉我所提供的信息是否足够。
编辑:@merv:
在pip install numpy=1.15.1
(base) robin@xps:~$ conda activate fastai07
(fastai07) robin@xps:~$ python
Python 3.6.8 |Anaconda, Inc.| (default, Dec 30 2018, 01:22:34)
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>> numpy.__spec__
ModuleSpec(name='numpy', loader=<_frozen_importlib_external.SourceFileLoader object at 0x7fb3a68cefd0>, origin='/home/robin/anaconda3/envs/fastai07/lib/python3.6/site-packages/numpy/__init__.py', submodule_search_locations=['/home/robin/anaconda3/envs/fastai07/lib/python3.6/site-packages/numpy'])
我很高兴它现在可以工作。谢谢!