为什么我的 evrionment.yaml 有这么多依赖项?
Why does my evrionment.yaml have so many dependencies?
我是 Anaconda 的新手,我有一个项目需要 numpy
matplotlib
和 pandas
。所以我卸载了所有以前版本的 python,安装了 anaconda,并为我的项目创建了一个新的虚拟环境(并激活了它)。在那里我 运行 以下命令:
conda install numpy -y
conda install matplotlib -y
conda install pandas -y
当我 运行 conda list
时,我能够找到所有这些。问题是它们还附带了大量其他依赖项。
我的 environment.yaml
文件中的依赖项如下所示:
dependencies:
- blas=1.0=mkl
- ca-certificates=2020.7.22=0
- certifi=2020.6.20=py37_0
- cycler=0.10.0=py37_0
- freetype=2.10.3=hd328e21_0
- icu=58.2=ha925a31_3
- intel-openmp=2020.2=254
- jpeg=9b=hb83a4c4_2
- kiwisolver=1.2.0=py37h74a9793_0
- libpng=1.6.37=h2a8f88b_0
- libtiff=4.1.0=h56a325e_1
- lz4-c=1.9.2=hf4a77e7_3
- matplotlib=3.3.1=0
- matplotlib-base=3.3.1=py37hba9282a_0
- mkl=2020.2=256
- mkl-service=2.3.0=py37hb782905_0
- mkl_fft=1.2.0=py37h45dec08_0
- mkl_random=1.1.1=py37h47e9c7a_0
- numpy=1.19.1=py37h5510c5b_0
- numpy-base=1.19.1=py37ha3acd2a_0
- olefile=0.46=py37_0
- openssl=1.1.1h=he774522_0
- pandas=1.1.3=py37ha925a31_0
- pillow=7.2.0=py37hcc1f983_0
- pip=20.2.3=py37_0
- pyparsing=2.4.7=py_0
- pyqt=5.9.2=py37h6538335_2
- python=3.7.9=h60c2a47_0
- python-dateutil=2.8.1=py_0
- pytz=2020.1=py_0
- qt=5.9.7=vc14h73c81de_0
- setuptools=50.3.0=py37h9490d1a_1
- sip=4.19.8=py37h6538335_0
- six=1.15.0=py_0
- sqlite=3.33.0=h2a8f88b_0
- tk=8.6.10=he774522_0
- tornado=6.0.4=py37he774522_1
- vc=14.1=h0510ff6_4
- vs2015_runtime=14.16.27012=hf0eaf9b_3
- wheel=0.35.1=py_0
- wincertstore=0.2=py37_0
- xz=5.2.5=h62dcd97_0
- zlib=1.2.11=h62dcd97_4
- zstd=1.4.5=h04227a9_0
这些都是必要的吗?当我查看其他人的 environment.yaml 文件时,他们总是看起来很干净并且没有所有这些包,尽管仍然有 numpy
、matplotlib
和 pandas
我将在这个回答中引用@Charles Duffy 和@OneCricketeer:
@查尔斯·达菲:
That's normal. numpy, matplotlib and pandas have enormous dependency chains. If you're looking at other peoples' files and they don't have them, those people presumably aren't pinning transitive dependencies, but instead letting conda decide at installation time what versions to use. There are defensible reasons to do that, but there are also defensible reasons not to.
@OneCricketeer:
The only one that stands out to me is as not needed is tornado ... blas, intel-openmp, and mkl are "optional" in numpy, but they make it run faster
我是 Anaconda 的新手,我有一个项目需要 numpy
matplotlib
和 pandas
。所以我卸载了所有以前版本的 python,安装了 anaconda,并为我的项目创建了一个新的虚拟环境(并激活了它)。在那里我 运行 以下命令:
conda install numpy -y
conda install matplotlib -y
conda install pandas -y
当我 运行 conda list
时,我能够找到所有这些。问题是它们还附带了大量其他依赖项。
我的 environment.yaml
文件中的依赖项如下所示:
dependencies:
- blas=1.0=mkl
- ca-certificates=2020.7.22=0
- certifi=2020.6.20=py37_0
- cycler=0.10.0=py37_0
- freetype=2.10.3=hd328e21_0
- icu=58.2=ha925a31_3
- intel-openmp=2020.2=254
- jpeg=9b=hb83a4c4_2
- kiwisolver=1.2.0=py37h74a9793_0
- libpng=1.6.37=h2a8f88b_0
- libtiff=4.1.0=h56a325e_1
- lz4-c=1.9.2=hf4a77e7_3
- matplotlib=3.3.1=0
- matplotlib-base=3.3.1=py37hba9282a_0
- mkl=2020.2=256
- mkl-service=2.3.0=py37hb782905_0
- mkl_fft=1.2.0=py37h45dec08_0
- mkl_random=1.1.1=py37h47e9c7a_0
- numpy=1.19.1=py37h5510c5b_0
- numpy-base=1.19.1=py37ha3acd2a_0
- olefile=0.46=py37_0
- openssl=1.1.1h=he774522_0
- pandas=1.1.3=py37ha925a31_0
- pillow=7.2.0=py37hcc1f983_0
- pip=20.2.3=py37_0
- pyparsing=2.4.7=py_0
- pyqt=5.9.2=py37h6538335_2
- python=3.7.9=h60c2a47_0
- python-dateutil=2.8.1=py_0
- pytz=2020.1=py_0
- qt=5.9.7=vc14h73c81de_0
- setuptools=50.3.0=py37h9490d1a_1
- sip=4.19.8=py37h6538335_0
- six=1.15.0=py_0
- sqlite=3.33.0=h2a8f88b_0
- tk=8.6.10=he774522_0
- tornado=6.0.4=py37he774522_1
- vc=14.1=h0510ff6_4
- vs2015_runtime=14.16.27012=hf0eaf9b_3
- wheel=0.35.1=py_0
- wincertstore=0.2=py37_0
- xz=5.2.5=h62dcd97_0
- zlib=1.2.11=h62dcd97_4
- zstd=1.4.5=h04227a9_0
这些都是必要的吗?当我查看其他人的 environment.yaml 文件时,他们总是看起来很干净并且没有所有这些包,尽管仍然有 numpy
、matplotlib
和 pandas
我将在这个回答中引用@Charles Duffy 和@OneCricketeer:
@查尔斯·达菲:
That's normal. numpy, matplotlib and pandas have enormous dependency chains. If you're looking at other peoples' files and they don't have them, those people presumably aren't pinning transitive dependencies, but instead letting conda decide at installation time what versions to use. There are defensible reasons to do that, but there are also defensible reasons not to.
@OneCricketeer:
The only one that stands out to me is as not needed is tornado ... blas, intel-openmp, and mkl are "optional" in numpy, but they make it run faster