Anaconda3 infinite solving environment problem - python

I have downloaded the anaconda3 a complete newer version from official site.. I tried to create an environment but the 'solving environment' keeps on running..
I tried turning off windows defender but it didn't work.. someone plz help.. I am using windows 11 pro, and I have downloaded and installed Anaconda3-2022.10-Windows-x86_64 on 23/12/2022

The actively available Anaconda builds for Python 3.6 all use 3.6.10, so you would have a possibly easier solve with:
conda create -n ssd_env python=3.6 anaconda
However, there is the custom build, anaconda=custom=py36_1 that should be generally compatible with python>=3.6,<3.7. That is what I get when simulating the solve from OP:
CONDA_SUBDIR=win-64 mamba create -n ssd_env --override-channels -c anaconda python=3.6.8 anaconda
which solves almost instantly with Mamba.
Using conda also takes unreasonably long for me, even when explicitly identifying the anaconda=custom=py36_1. The reason this takes so long is that this anaconda package has no version constraints on the 100+ packages it specifies, which means a huge search space. This is aggravated by the fact that the solvers work from latest to oldest package versions, and the versions that are expected to be identified are ~3 years down the stack.
I recommend:
Use Mamba as the solver.
Don't use the anaconda package unless absolutely needed. Most users do not ever need all those packages - instead just specify the packages actually required.

Related

Multiple tensorflow-gpu Versions with Conda

I am using Windows 10 with the latest pip and Conda versions.
I am trying to set up two different Conda environments with different versions of tensorflow-gpu, CUDA and cuDNN. But I am not sure if it's even possible. Any reply is greatly appreciated.
I am currently perfectly running a tf-gpu=2.1 with python=3.7, cuda=10.1 and cudnn=7.6.5. But I would like to create a new environment of tf-gpu=1.13.1 with python=3.6, cuda=10.0 and cudnn=7.4.2. I am having trouble with it, and wondering if it's doable. For the second environment, the Cuda and cuDNN versions are matched from a post I have seen a few days ago. Thank you.
p.s. if you're wondering, the second environment is for stable-baselines which is only compatible with 1.8.0 < tf < 1.14.0.
It is normal to do that, normally virtual environments are handled (if you are doing it this way there is no problem) each environment will work differently as you configure it.either way you can check the information in the official documentation in https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html

Pip installed packages don't show up in Anaconda Navigator

Many Python packages don't have pre-built conda packages, so Anaconda users are frequently forced to use pip to install packages. I have to do this routinely, since so many packages don't have conda packages, not even in the most common alternate channel(s) like conda-forge or bio-conda.
This open issue was already reported in the Anaconda github support repo https://github.com/ContinuumIO/anaconda-issues/issues/10634. However, no answers have been forthcoming in almost 1 year. I am asking here because responses are typically faster and shared more widely than in support forums for individual products.
I hate the productivity loss of re-installing Anaconda, particularly a long-standing installation, because it can take 3-4 hours to backup and export existing environment build files as requirements.txt, remove an existing Anaconda installation, clean out the Windows Registry, search the Windows file system for leftover detritus, and then rebuild all of my environments one at a time.
Does anyone know a trick, or have a Python script or some other workaround(s) to refresh the Package Index within a conda environment or for ALL environments created and managed by the Anaconda Navigator GUI. It would be awesome if there was an updater widget within the Anaconda Navigator GUI to allow users to select for which virtual environment(s) they want the package index to be updated.
What I have tried
In the Anaconda Navigator GUI "Environments" tab, clicking on the "Update Index..." button does not get updated with the list of packages installed "behind the scenes" from a Anaconda Command Prompt.
The result I get
pip-installed packages are NOT included in the Anaconda Package Index update process. It does not find packages in environments installed inside and outside of the Anaconda3 root directory. It doesn't even find all packages underneath the \envs folder. This makes me think packages are not installed into the currently selected environments, so it takes time to verify their location in C:\ProgramData\Anaconda3\envs, C:\Users\username\AppData\Local, or elsewhere.
What else I have tried: after having a corrupted Anaconda and Spyder installation that would not start at all, I posted requests for help on various support forums. I got answers that were not much help, like "Just don't mix pip and conda packages, use one or the other". That is not practical since so many Python packages are not available in the conda package format. I have gotten that impractical advice from Anaconda and Spyder developers in the past.
Severity and impact
This is an important issue, since it is possible to use / misuse conda and pip and inadvertently corrupt Anaconda so badly that it requires a painful and time-consuming removal and re-installation of the entire Anaconda distribution.
A possible solution beyond my current cable-tow... If someone can build an intelligent and transparent converter built into the PyPi, Anaconda Cloud, Conda-forge, and other channels that made this conversion automatic and validated, then this conversation might not be needed.

Pinning a specific python version in conda recipe

I'm looking for a way to build a conda package which would use a specific python version.
According to the issue submitted a while ago conda treats python in a special way, so simply putting
run:
- python ==2.7.13 <build>
into meta.yaml won't work: conda will create a dependency on the latest release of 2.7 (>=2.7,<2.8) ignoring the minor version and build.
Why?
The aforementioned issue suggests that pinning the python version is the wrong thing to do, but I really like the idea of my builds and deployments being reproducible. Running conda create -n prod_env my_application=1.0.0 today should produce exactly the same environment as it did yesterday, including all dependencies and python version.

Is there any way to make anaconda smaller?

I'm using Ubuntu 16.04 LTS with Anaconda 2, which takes over 5 gb disk space. Is it normal to take such large space, or I can make it smaller by removing some unnecessary folders?
P.S. Some commands such as "conda clean" have been used, I just wonder if there are some repeated modules installed...
I have seen anaconda accumulate lots of garbage package caches and tarballs. To delete caches, tarballs and lock files which are not used and reduce a little bit the space used, you can try:
conda clean -a
It depends what do you really want to use.
Install miniconda instead of Anaconda and then install required packages 1 by 1 using
conda install
this will definitely reduce the size. :)
Important to note that conda is a package/environment manager, which can build an anaconda environment.
More often than not, they are considered as one and the same which is untrue.
If you want to simply use conda, the package/environment manager and not have the entire anaconda environment packaged with it, you can install miniconda -
https://conda.io/miniconda.html- which gives you the conda application, without the bloat* of the entire scientific stack of anaconda.
miniconda will have a far smaller footprint, and then using conda to create specific (streamline/smaller) environments for usage will also be more storage-efficient.
Make the separation between conda and anaconda in your thinking, and it should make things easier to understand.
*not quite fair, it is not that it is bloat, it is just overkill for 99% of users

What is the advantage of Pip over Anaconda?

So, I have seen What is the difference between pip and conda?. However, all of the answers there appear to be from Anaconda supporters. So, that made me wonder: why is pip still the standard? why hasn't everyone just moved to anaconda?
I understand that anaconda only works with its own python, but is that the only disadvantage?
Based on my limited experience, I would guess that the main advantage of pip over conda is the ability to still install packages that are not available from conda or Anaconda.org.
https://conda.io/docs/using/pkgs.html#install-non-conda-packages - says basically the same.
I have been using conda for a while now, mostly studying Machine Learning and related subjects. I am a happy user 99.99% of the time. But when one faces challenges like building and installing tensorflow with GPU support for Mac that would support his or her rather specific/outdated GPU, one can't really rely on conda.
One huge advantage of pip is the built-in ability to install packages system-wide via f.ex.
sudo -H pip install ipython
It actually is smart enough to do this by default if run as the root user, installing to some directory in the global execution path. (/usr/local/bin?)
What can actually be considered an advantage for some things is that pip compiles packages (by default). So some packages like f.ex. theano which are actually optimized upon installation should not be installed via conda, or you are possibly missing out on this.
Finally, as mentioned, pip is directly linked to Python's package archive, whereas conda assumedly needs to be told when a new package was uploaded via a new configuation.

Categories