質問

Update: I tried @user2258766 suggestion on miniconda. It was initially very promising. But, when I have installed scipy numpy matplotlib sympy, the miniconda folder size quickly grows to 1G.

enter image description here

Does this mean that the minimal size of the installation is 1G if I want to use the 4 packages I mentioned. Why they are so large? Is it still possible to shrink the installation size further?

enter image description here

--

The Scipy website recommended Anaconda.

But it installs so many un-relevant packages for me.

Is there a smallest distribution I can use?

I only want Scipy, Sympy, Numpy, and Maplotlib, not others.

Another relevant questions is, why there are so many dependencies between these Python packages?

I was programming in Java, and now feel a little bit uncomfortable to see these Python packages (Scipy e.g.) are so tightly relatively to so many other packages. Why is that the case? A reasonable explanation could possible make more comfortable to start coding in Python.

Thanks.

I am using Windows. Thanks. I was using Java and am new to Python.

役に立ちましたか?

解決

I'd suggest downloading miniconda: http://conda.pydata.org/miniconda.html#miniconda. Miniconda has a small footprint -- only python and conda are installed. Conda is a universal package manager for Python available on all OSes. You can now run the following:

conda create -n dev_env scipy numpy matplotlib sympy

The above will create a contained environment (named dev_env) with only the packages listed in the command. For more information on conda: http://conda.pydata.org/

他のヒント

Use these commands to reduce the install size of Python libraries, by removing unnecessary downloaded package files:

# Remove about 100-300 MB of unused tar.bz2 archive files
# https://stackoverflow.com/questions/40241133
conda clean --all

# Manually delete about 1-2GB of downloaded packages, after install. See:
# https://groups.google.com/a/continuum.io/d/msg/anaconda/CZjcQKVmIgo/Xx3tYBYzCgAJ
du -sh /path/to/Miniconda/pkgs/  # Just display the folder size
rm -rf /path/to/Miniconda/pkgs/

# Manually delete the useless Pip cache of downloaded files. See:
# https://stackoverflow.com/questions/9510474/removing-pips-cache
rm -rf ~/.cache/pip           # Linux
rm -rf ~/Library/Caches/pip/  # Mac OS X
del %LocalAppData%\pip\Cache  # Windows

Direct links for info:

Just install python and individually install each library.

This site has windows installers for all the packages you mentioned:

http://www.lfd.uci.edu/~gohlke/pythonlibs/

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top