Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion: Add an option to reset environments #1032

Closed
cel4 opened this issue Dec 5, 2014 · 6 comments
Closed

Suggestion: Add an option to reset environments #1032

cel4 opened this issue Dec 5, 2014 · 6 comments
Labels
locked [bot] locked due to inactivity

Comments

@cel4
Copy link

cel4 commented Dec 5, 2014

I think it may be a nice idea to add a conda command which resets an environment as a shortcut to deleting it and creating a new environment with the same name.

Why would someone need that? Well, I have testing environments which I use to test new packages or reproducing issues. After testing I usually want to clear all installed packages. Some command like conda reset -n testenv or conda clear -n testenv would be very convenient.

@cel4
Copy link
Author

cel4 commented Mar 28, 2015

Any feedback on this?

@asmeurer
Copy link
Contributor

I've done this before as well (I ended up just smashing the whole thing into one bash command and rerunning it).

@kalefranz
Copy link
Contributor

This has been implemented as conda list --revisions and conda install --rev REV_NUM.

@NumesSanguis
Copy link

NumesSanguis commented Dec 6, 2017

conda install --rev 1 with a custom anaconda version doesn't reset anaconda, but only deletes it.
In my case I had anaconda: custom-py36hbbc8b67_0 and now I have to reinstall Anaconda.

By accident I had installed packages in my main Anaconda environment, instead of an environment, and I wanted to reset it...

Outside any environment:

    $ conda list
bash: /home/*user*/anaconda3/bin/conda: /home/*user*/anaconda3/bin/python: bad interpreter: No such file or directory

@jennirinker
Copy link

In case anyone else find this thread, the issue that NumesSanguis points out above is resolved in conda versions from 4.3.33 and later. See Issue #6316.

But it's extremely important that you check your conda version before trying conda install --rev 1. Otherwise, you're going to lose all environments when you have to uninstall/reinstall conda.

@Aurora-Rong
Copy link

这已实现为conda list --revisionsconda install --rev REV_NUM

这已实现为conda list --revisionsconda install --rev REV_NUM

it doest work.....
conda will install other version's package!!

(base) C:\Users\徐来>conda install --rev 1

Package Plan

environment location: V:\anconda

added / updated specs:
- _ipyw_jlab_nb_ext_conf
- anaconda
- anaconda-navigator
- conda
- conda-build
- conda-env
- conda-verify
- console_shortcut
- cudatoolkit=11.0
- git
- menuinst
- navigator-updater
- powershell_shortcut
- python=3.8
- pytorch
- torchaudio
- torchvision

The following packages will be downloaded:

package                    |            build
---------------------------|-----------------
anaconda-project-0.8.4     |             py_0         210 KB  defaults
babel-2.8.1                |     pyhd3eb1b0_0         5.3 MB  defaults
backports-1.0              |             py_2         160 KB  defaults
backports.shutil_get_terminal_size-1.0.0|           py38_2           9 KB  defaults
backports.tempfile-1.0     |             py_1          15 KB  defaults
beautifulsoup4-4.9.3       |     pyhb0f4dca_0          91 KB  defaults
brotlipy-0.7.0             |py38he774522_1000         338 KB  defaults
certifi-2020.6.20          |     pyhd3eb1b0_3         155 KB  defaults
cffi-1.14.3                |   py38h7a1dbc1_0         223 KB  defaults
chardet-3.0.4              |        py38_1003         189 KB  defaults
click-7.1.2                |             py_0          71 KB  defaults
colorama-0.4.4             |             py_0          18 KB  defaults
cython-0.29.21             |   py38ha925a31_0         1.8 MB  defaults
dask-2.30.0                |             py_0           5 KB  defaults
dask-core-2.30.0           |             py_0         605 KB  defaults
distributed-2.30.1         |   py38haa95532_0         1.0 MB  defaults
gevent-20.9.0              |   py38he774522_0         1.3 MB  defaults
idna-2.10                  |             py_0          50 KB  defaults
ipython-7.19.0             |   py38hd4e2768_0         998 KB  defaults
ipython_genutils-0.2.0     |           py38_0          40 KB  defaults
ipywidgets-7.5.1           |             py_1          98 KB  defaults
jedi-0.17.1                |           py38_0         923 KB  defaults
jinja2-2.11.2              |             py_0         103 KB  defaults
jupyter_client-6.1.7       |             py_0          77 KB  defaults
keyring-21.4.0             |           py38_1          69 KB  defaults
locket-0.2.0               |           py38_1           9 KB  defaults
lxml-4.6.1                 |   py38h1350720_0         978 KB  defaults
lz4-c-1.9.2                |       hf4a77e7_3         106 KB  defaults
matplotlib-3.3.2           |                0          25 KB  defaults
msgpack-python-1.0.0       |   py38h74a9793_1          82 KB  defaults
nbconvert-6.0.7            |           py38_0         500 KB  defaults
nbformat-5.0.8             |             py_0          88 KB  defaults
nose-1.3.7                 |           py38_2         235 KB  defaults
notebook-6.1.4             |           py38_0         4.3 MB  defaults
numexpr-2.7.1              |   py38h25d0782_0         127 KB  defaults
openpyxl-3.0.5             |             py_0         158 KB  defaults
openssl-1.1.1h             |       he774522_0         4.8 MB  defaults
pandas-1.1.3               |   py38ha925a31_0         7.5 MB  defaults
parso-0.7.0                |             py_0          72 KB  defaults
pathlib2-2.3.5             |           py38_0          36 KB  defaults
pexpect-4.8.0              |           py38_0          83 KB  defaults
pillow-8.0.1               |   py38h4fa10fc_0         690 KB  defaults
pip-20.2.4                 |   py38haa95532_0         1.8 MB  defaults
pkginfo-1.6.1              |   py38haa95532_0          60 KB  defaults
prompt-toolkit-3.0.8       |             py_0         248 KB  defaults
py-1.9.0                   |             py_0          79 KB  defaults
pygments-2.7.2             |     pyhd3eb1b0_0         674 KB  defaults
pyopenssl-19.1.0           |             py_1          48 KB  defaults
pyparsing-2.4.7            |             py_0          65 KB  defaults
python-libarchive-c-2.9    |             py_0          46 KB  defaults
pytz-2020.1                |             py_0         184 KB  defaults
requests-2.24.0            |             py_0          56 KB  defaults
seaborn-0.11.0             |             py_0         210 KB  defaults
setuptools-50.3.1          |   py38haa95532_1         730 KB  defaults
sortedcollections-1.2.1    |             py_0          13 KB  defaults
sortedcontainers-2.2.2     |             py_0          29 KB  defaults
sympy-1.6.2                |   py38haa95532_1         8.7 MB  defaults
terminado-0.9.1            |           py38_0          27 KB  defaults
toolz-0.11.1               |             py_0          48 KB  defaults
tornado-6.0.4              |   py38he774522_1         610 KB  defaults
tqdm-4.50.2                |             py_0          56 KB  defaults
urllib3-1.25.11            |             py_0          99 KB  defaults
vc-14.1                    |       h0510ff6_4           6 KB  defaults
vs2015_runtime-14.16.27012 |       hf0eaf9b_3         1.2 MB  defaults
wheel-0.35.1               |             py_0          37 KB  defaults
xlwings-0.20.8             |           py38_0         735 KB  defaults
zeromq-4.3.2               |       ha925a31_3         4.1 MB  defaults
------------------------------------------------------------
                                       Total:        53.2 MB

The following NEW packages will be INSTALLED:

jedi pkgs/main/win-64::jedi-0.17.1-py38_0
jinja2 pkgs/main/noarch::jinja2-2.11.2-py_0
jupyter_client pkgs/main/noarch::jupyter_client-6.1.7-py_0
jupyter_core pkgs/main/win-64::jupyter_core-4.6.3-py38_0
nbconvert pkgs/main/win-64::nbconvert-6.0.7-py38_0
nest-asyncio pkgs/main/noarch::nest-asyncio-1.4.2-pyhd3eb1b0_0
notebook pkgs/main/win-64::notebook-6.1.4-py38_0
packaging pkgs/main/noarch::packaging-20.4-py_0
parso pkgs/main/noarch::parso-0.7.0-py_0
prompt-toolkit pkgs/main/noarch::prompt-toolkit-3.0.8-py_0
pytest pkgs/main/win-64::pytest-6.1.1-py38_0
pywin32 pkgs/main/win-64::pywin32-227-py38he774522_1
pyzmq pkgs/main/win-64::pyzmq-19.0.2-py38ha925a31_1
setuptools pkgs/main/win-64::setuptools-50.3.1-py38haa95532_1
webencodings pkgs/main/win-64::webencodings-0.5.1-py38_1

The following packages will be REMOVED:

_anaconda_depends-2020.07-py38_0
git-2.23.0-h6bb4b03_0
gmpy2-2.0.8-py38h7edee0f_3
jupyterlab_widgets-1.0.0-pyhd3eb1b0_1
libllvm9-9.0.1-h21ff451_0
mpc-1.1.0-h7edee0f_1
mpfr-4.0.2-h62dcd97_1
mpir-3.0.0-hec2e145_1
ptyprocess-0.7.0-pyhd3eb1b0_2
pyerfa-1.7.1.1-py38h2bbff1b_1
snappy-1.1.8-h33f27b4_0
tbb-2020.3-h74a9793_0

The following packages will be UPDATED:

anaconda custom-py38_1 --> 2020.11-py38_0

The following packages will be SUPERSEDED by a higher-priority channel:

backports.shutil_~ pkgs/main/noarch::backports.shutil_ge~ --> pkgs/main/win-64::backports.shutil_get_terminal_size-1.0.0-py38_2
certifi pkgs/main/win-64::certifi-2020.12.5-p~ --> pkgs/main/noarch::certifi-2020.6.20-pyhd3eb1b0_3
ipython_genutils pkgs/main/noarch::ipython_genutils-0.~ --> pkgs/main/win-64::ipython_genutils-0.2.0-py38_0
nose pkgs/main/noarch::nose-1.3.7-pyhd3eb1~ --> pkgs/main/win-64::nose-1.3.7-py38_2
pexpect pkgs/main/noarch::pexpect-4.8.0-pyhd3~ --> pkgs/main/win-64::pexpect-4.8.0-py38_0
pickleshare pkgs/main/noarch::pickleshare-0.7.5-p~ --> pkgs/main/win-64::pickleshare-0.7.5-py38_1000
send2trash pkgs/main/noarch::send2trash-1.5.0-py~ --> pkgs/main/win-64::send2trash-1.5.0-py38_0

The following packages will be DOWNGRADED:

anaconda-project 0.9.1-pyhd3eb1b0_1 --> 0.8.4-py_0
astropy 4.2-py38h2bbff1b_0 --> 4.0.2-py38he774522_0
babel 2.9.0-pyhd3eb1b0_0 --> 2.8.1-pyhd3eb1b0_0
backports 1.0-pyhd3eb1b0_2 --> 1.0-py_2
backports.functoo~ 1.6.1-pyhd3eb1b0_0 --> 1.6.1-py_0
backports.tempfile 1.0-pyhd3eb1b0_1 --> 1.0-py_1
beautifulsoup4 4.9.3-pyha847dfd_0 --> 4.9.3-pyhb0f4dca_0
bitarray 1.6.3-py38h2bbff1b_1 --> 1.6.1-py38h2bbff1b_0
bleach 3.2.2-pyhd3eb1b0_0 --> 3.2.1-py_0
brotlipy 0.7.0-py38h2bbff1b_1003 --> 0.7.0-py38he774522_1000
ca-certificates 2021.1.19-haa95532_0 --> 2020.10.14-0
cffi 1.14.4-py38hcd4344a_0 --> 1.14.3-py38h7a1dbc1_0
chardet 4.0.0-py38haa95532_1003 --> 3.0.4-py38_1003
click 7.1.2-pyhd3eb1b0_0 --> 7.1.2-py_0
colorama 0.4.4-pyhd3eb1b0_0 --> 0.4.4-py_0
comtypes 1.1.8-py38haa95532_1002 --> 1.1.7-py38_1001
cryptography 3.3.1-py38hcd4344a_0 --> 3.1.1-py38h7a1dbc1_0
cython 0.29.21-py38hd77b12b_0 --> 0.29.21-py38ha925a31_0
dask 2020.12.0-pyhd3eb1b0_0 --> 2.30.0-py_0
dask-core 2020.12.0-pyhd3eb1b0_0 --> 2.30.0-py_0
distributed 2021.1.0-py38haa95532_0 --> 2.30.1-py38haa95532_0
filelock 3.0.12-pyhd3eb1b0_1 --> 3.0.12-py_0
gevent 21.1.1-py38h2bbff1b_1 --> 20.9.0-py38he774522_0
glob2 0.7-pyhd3eb1b0_0 --> 0.7-py_0
idna 2.10-pyhd3eb1b0_0 --> 2.10-py_0
iniconfig 1.1.1-pyhd3eb1b0_0 --> 1.1.1-py_0
ipython 7.19.0-py38hd4e2768_1 --> 7.19.0-py38hd4e2768_0
ipywidgets 7.6.3-pyhd3eb1b0_1 --> 7.5.1-py_1
joblib 1.0.0-pyhd3eb1b0_0 --> 0.17.0-py_0
keyring 21.8.0-py38haa95532_0 --> 21.4.0-py38_1
lazy-object-proxy 1.4.3-py38h2bbff1b_2 --> 1.4.3-py38he774522_0
locket 0.2.1-py38haa95532_1 --> 0.2.0-py38_1
lxml 4.6.2-py38h9b66d53_0 --> 4.6.1-py38h1350720_0
lz4-c 1.9.3-h2bbff1b_0 --> 1.9.2-hf4a77e7_3
matplotlib 3.3.2-haa95532_0 --> 3.3.2-0
mkl-service 2.3.0-py38h196d8e1_0 --> 2.3.0-py38hb782905_0
mock 4.0.3-pyhd3eb1b0_0 --> 4.0.2-py_0
msgpack-python 1.0.1-py38h59b6b97_0 --> 1.0.0-py38h74a9793_1
nbformat 5.1.2-pyhd3eb1b0_1 --> 5.0.8-py_0
numexpr 2.7.2-py38hcbcaa1e_0 --> 2.7.1-py38h25d0782_0
openpyxl 3.0.6-pyhd3eb1b0_0 --> 3.0.5-py_0
openssl 1.1.1i-h2bbff1b_0 --> 1.1.1h-he774522_0
pandas 1.2.1-py38hf11a4ad_0 --> 1.1.3-py38ha925a31_0
path 15.0.1-py38haa95532_0 --> 15.0.0-py38_0
pathlib2 2.3.5-py38haa95532_2 --> 2.3.5-py38_0
pillow 8.1.0-py38h4fa10fc_0 --> 8.0.1-py38h4fa10fc_0
pip 20.3.3-py38haa95532_0 --> 20.2.4-py38haa95532_0
pkginfo 1.7.0-py38haa95532_0 --> 1.6.1-py38haa95532_0
prometheus_client 0.9.0-pyhd3eb1b0_0 --> 0.8.0-py_0
py 1.10.0-pyhd3eb1b0_0 --> 1.9.0-py_0
pycosat 0.6.3-py38h2bbff1b_0 --> 0.6.3-py38he774522_0
pygments 2.7.4-pyhd3eb1b0_0 --> 2.7.2-pyhd3eb1b0_0
pyopenssl 20.0.1-pyhd3eb1b0_1 --> 19.1.0-py_1
pyparsing 2.4.7-pyhd3eb1b0_0 --> 2.4.7-py_0
pysocks 1.7.1-py38haa95532_0 --> 1.7.1-py38_0
python-libarchive~ 2.9-pyhd3eb1b0_0 --> 2.9-py_0
pytz 2020.5-pyhd3eb1b0_0 --> 2020.1-py_0
pyyaml 5.4.1-py38h2bbff1b_1 --> 5.3.1-py38he774522_1
regex 2020.11.13-py38h2bbff1b_0 --> 2020.10.15-py38he774522_0
requests 2.25.1-pyhd3eb1b0_0 --> 2.24.0-py_0
seaborn 0.11.1-pyhd3eb1b0_0 --> 0.11.0-py_0
snowballstemmer 2.1.0-pyhd3eb1b0_0 --> 2.0.0-py_0
sortedcollections 2.1.0-pyhd3eb1b0_0 --> 1.2.1-py_0
sortedcontainers 2.3.0-pyhd3eb1b0_0 --> 2.2.2-py_0
soupsieve 2.1-pyhd3eb1b0_0 --> 2.0.1-py_0
sphinx 3.4.3-pyhd3eb1b0_0 --> 3.2.1-py_0
sqlalchemy 1.3.21-py38h2bbff1b_0 --> 1.3.20-py38h2bbff1b_0
statsmodels 0.12.1-py38h2bbff1b_0 --> 0.12.0-py38he774522_0
sympy 1.7.1-py38haa95532_0 --> 1.6.2-py38haa95532_1
terminado 0.9.2-py38haa95532_0 --> 0.9.1-py38_0
toolz 0.11.1-pyhd3eb1b0_0 --> 0.11.1-py_0
tornado 6.1-py38h2bbff1b_0 --> 6.0.4-py38he774522_1
tqdm 4.55.1-pyhd3eb1b0_0 --> 4.50.2-py_0
ujson 4.0.2-py38hd77b12b_0 --> 4.0.1-py38ha925a31_0
urllib3 1.26.2-pyhd3eb1b0_0 --> 1.25.11-py_0
vc 14.2-h21ff451_1 --> 14.1-h0510ff6_4
vs2015_runtime 14.27.29016-h5e58377_2 --> 14.16.27012-hf0eaf9b_3
watchdog 0.10.4-py38haa95532_0 --> 0.10.3-py38_0
wheel 0.36.2-pyhd3eb1b0_0 --> 0.35.1-py_0
win_inet_pton 1.1.0-py38haa95532_0 --> 1.1.0-py38_0
xlrd 2.0.1-pyhd3eb1b0_0 --> 1.2.0-py_0
xlwings 0.21.4-py38haa95532_0 --> 0.20.8-py38_0
zeromq 4.3.3-ha925a31_3 --> 4.3.2-ha925a31_3
zope.interface 5.2.0-py38h2bbff1b_0 --> 5.1.2-py38he774522_0

Proceed ([y]/n)? n

CondaSystemExit: Exiting.

@github-actions github-actions bot added the locked [bot] locked due to inactivity label Aug 9, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked [bot] locked due to inactivity
Projects
None yet
Development

No branches or pull requests

6 participants