Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
517 views
in Technique[技术] by (71.8m points)

python - Trying to use conda install to get anaconda-clean but environment fails to solve and a very slow analysis of conflicts starts

I have been having a lot of issues with anaconda recently. It began with me not being able to install packages using conda install, each time resulting the following error:

CondaHTTPError: HTTP 000 CONNECTION FAILED for url

I tried uninstalling and reinstalling anaconda numerous times and the issue persisted.

I then figured out that if I get off my VPN (this is on a work computer running Windows 7), I can install packages but would get the following error message:

ERROR: Registry editing has been disabled by your administrator. 
 if "" == "" (set "VSINSTALLDIR=" ) 
 if "" == "" ( ECHO "WARNING: Did not find VS in registry or in VS140COMNTOOLS env var - your compiler 
 may not work" GOTO End ) "WARNING: Did not find VS in registry or in VS140COMNTOOLS env var - your compiler may not work" The system cannot find the batch label specified - End

This occurred both within the default anaconda environment as well as one I created. I noticed in the one I created the packages seemed to work as expected.

Because I've had so many issues and have uninstalled and reinstalled anaconda, I'm concerned there were things I missed during one these uninstall/reinstall cycles and it's causing issues. I am currently trying to uninstall anaconda from my computer completely using anaconda-clean, but when I run the command

conda install anaconda-clean

I get that the initial frozen solve and the flexible solve both fail and that there are conflicts.

Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible so
lve.
Solving environment: failed with repodata from current_repodata.json, will retry
 with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible so
lve.
Solving environment: /
Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.
Examining pip:  24%|█████?                  | 87/359 [00:00<00:00, 3624.97it/s]
Comparing specs that have this dependency:   0%|       | 0/232 [00:00<?, ?it/-
Comparing specs that have this dependency:   0%| | 1/232 [00:04<18:36,  4.83s t
Comparing specs that have this dependency:   1%| | 2/232 [00:05<09:36,  2.50s- t
Comparing specs that have this dependency:   1%| | 3/232 [00:05<06:44,  1.77s/ t
Comparing specs that have this dependency:   2%| | 4/232 [00:05<05:21,  1.41s| t
Comparing specs that have this dependency:   2%| | 5/232 [00:05<04:30,  1.19s- t
Comparing specs that have this dependency:   3%| | 6/232 [00:06<03:55,  1.04s/ t
Comparing specs that have this dependency:   3%| | 7/232 [00:06<03:31,  1.07i| s
Comparing specs that have this dependency:   3%| | 8/232 [00:06<03:15,  1.15i s
]
Comparing specs that have this dependency:   4%| | 9/232 [00:07<03:01,  1.23i/ s
Comparing specs that have this dependency:   4%| | 10/232 [00:14<05:18,  1.43- i
Comparing specs that have this dependency:   5%| | 11/232 [00:14<05:00,  1.36/ i
t]
Comparing specs that have this dependency:   5%| | 12/232 [00:15<04:40,  1.27- i
Comparing specs that have this dependency:   6%| | 13/232 [00:27<07:39,  2.10s/i
t]                                                                           /
Comparing specs that have this dependency:   6%| | 15/232 [00:27<06:39,  1.84- i
Comparing specs that have this dependency:   7%| | 16/232 [00:28<06:24,  1.78/ i

I have not been able to fully get through the analysis of conflicts as it has been running for hours and is still only partially completed. Can anyone advise on what may be causing the analysis of conflicts to run so slowly and how I can more efficiently completely clean anaconda off my computer?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

You can run anaconda-clean anywhere, i.e., you don't have to install it to your base env.

conda create -n cleaner anaconda-clean
conda activate cleaner
anaconda-clean

Also, it's simply a glorified file remover. It detects and prompts you to delete the following files/directories:

FILES = [
    '.anaconda', '.astropy', '.continuum',
    '.conda', '.condamanager', '.condarc',
    '.enthought', '.idlerc', '.glue', '.ipynb_checkpoints', '.ipython',
    '.jupyter', '.matplotlib', '.python-eggs',
    '.spyder2', '.spyder2-py3', '.theano',
]

listed in the source code. You can probably do this manually much faster. I think the utility of anaconda-clean lands more for sys admins.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...