On my desktop PC I have anaconda installed, and on my laptop - to save space - I thought i'd install miniconda and be selective about the modules I install. So I installed a handful, numpy, scipy etc. I didn't install anything which isn't part of the default anaconda install, but I just realized my miniconda install is taking up more space than the anaconda install! (1.8GB vs 2.2GB). (no environments in either)
The bulk of the difference comes from the pkgs folder. The miniconda install seems to have the tar.bz2 of all of the installed packages as well as the exploded versions. Are these safe to delete? Will they be deleted automatically after a while? Is there an option to not cache these?
P.S. I'm developing on both windows and mac (i've tried installed anaconda and miniconda on both mac and windows to see, and I get very similar results).
You can safely delete the tar.bz2 files. They are only used as a cache. The command conda clean -t will clean them automatically.
Related
I just realized that pip was somehow uninstalled and all my packages are missing. My Apps have stopped running on local environment.
I was attempting to upgrade pandas using pip3 and conda. I had the environment up and running fine until then.
Is there a way to recover installed packages or restore the environment?
When I run pip3 list, I get:
Package Version
---------- -------
pip 10.0.1
setuptools 39.0.1
Probably there isn't any easy way to restore the packages. You could inspect your console output because pip shows which packages are uninstalled and just install them again.
Good practice for next time is to store packages needed for each script in requirements.txt file and also separating environments so that each script has its own virtual environment with packages in required version. You can read more about venv here.
It seems like, your Python (manually or by your IDE) has been updated. One who encounters this problem maybe give a chance to change the environment paths order. Search for the "environment variables" on Windows. And check if you have already installed two different Python version. If you have so; you may change your older Python version's order to an upper position of newly installed version. This may help, but as mentioned at the first answer, using virtual environment for further projects is the best-practice.
After installing Anaconda. I created several new virtual environments and all of them had packages preinstalled that come with Anaconda. Is this normal and how can I prevent this?
Installing Anaconda causes an error while importing sklearn that is removed as soon as Anaconda is uninstalled. I want to take advantage of Anaconda(use spyder) but also create a virtual env which only installs packages by pip and does not look for those packages through anaconda when I import them(to solve the sklearn problem). In other words I want a virtual env that has nothing to do with Anaconda while having Anaconda installed on my System(windows). Is this possible?
I created a conda environment and started installing anaconda, but quickly noticed the size of the library was too big and stopped the install, after having used up around 2 GB of space.
I removed the environment with all installed packages using
conda env remove -n myenv
and then ran
conda clean --all
but my system is still running out of space. I could not free the ~2GB that got used during the anaconda install.
How can I proceed to restore that space?
You need to completely uninstall Anaconda if you want to free up that space. Follow the instructions on the Anaconda documentation
here to uninstall it.
I had a working deep learning library on CPU Linux Mint ubuntu verion 18.3 with Anaconda 3.6 but something got hosed when I was tinkering around in Theano.
https://machinelearningmastery.com/setup-python-environment-machine-learning-deep-learning-anaconda/
Everything was working just fine until I wanted to tinker around with a few .py files with KERAS_BACKEND=theano python program.py and in an attempt to fix something not working in Theano, I did this command from the theano website
http://deeplearning.net/software/theano_versions/dev/requirements.html
conda install numpy scipy mkl <nose> <sphinx> <pydot-ng>
Not knowing what I am doing it almost seemed to pooch everything... And install Python 2.7 dependencies. Would anyone be able to give me a tip on how reset my deep learning library in anaconda 3.6 build???
If I do a conda list anaconda$ its a custom build 2.7 which was not intentional! Time to start learning how to do virtual sessions :)
Read the docs for uninstalling Anaconda
https://docs.anaconda.com/anaconda/install/uninstall
Do a conda install anaconda-clean
Then a anaconda-clean --yes
Then re-download the Anaconda 5.2 For Linux Installer and run thru
the steps. https://www.anaconda.com/download/#linux
I had a similar problem and just did:
conda install --revision 0
this gives me a fresh Anaconda installation, with the drawback of needing to install every package again. Hovewer, all environments created remain intact.
More on Anaconda revisions here: https://medium.com/#wilpat456/fix-broken-anaconda-environment-due-to-recent-package-download-9094fb0f3a04
The Anaconda website mentions that the installer has 100 of pre-built packages. Even the installer size of 500mb hints that there should be some pre-built packages.
Yet when we want to use any of the packages we have to install them through the command eg. conda install nltk
Which basically downloads the package from internet and then installs it. Which seems counterintuitive since it is already mentioned on website that nltk is present in the installer.
Can anybody throw some light on this?
There are two parts:
Conda - Package & environment management system. This gives you the
conda command and serves a similar function as pip and
virtualenv.
Anaconda - Python package distribution containing 100's of scientific
packages that are tests and verified to work together.
If you install Miniconda, you will just get conda without the full Anaconda distribution. If you install Anaconda, you will get both the conda management system and the Python distribution. You can also get Anaconda after only having installed conda by running conda install Anaconda.