# Anaconda Prompt closes immediately after setting up virtual environment

**URL:** <https://forum.anaconda.com/t/anaconda-prompt-closes-immediately-after-setting-up-virtual-environment/33435>\
**Category:** Packages & Environments\
**Created:** [September 1, 2022, 1:29pm UTC](https://forum.anaconda.com/t/anaconda-prompt-closes-immediately-after-setting-up-virtual-environment/33435 "2022-09-01T13:29:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mrmichae](https://dub1.discourse-cdn.com/anaconda/user_avatar/forum.anaconda.com/mrmichae/32/2091_2.png) [@mrmichae](https://forum.anaconda.com/u/mrmichae)\
**Post date:** [September 1, 2022, 1:29pm UTC](https://forum.anaconda.com/t/anaconda-prompt-closes-immediately-after-setting-up-virtual-environment/33435/1 "2022-09-01T13:29:41Z")

</div>

I recently installed Miniconda3 (Conda 4.12.0, Python 3.9.7). I then created a virtual environment and attempted to install a list of packages from a requirements.txt file using `conda install <package>`. However, many of these packages were not available through the Conda channels, so I used `pip install <package>` to install those.

Since doing this, the Anaconda Prompt closes immediately after opening and is unusable. I also cannot open Windows Command prompt (same issue), so it appears that these two things are related.

I tried reinstalling Miniconda, but this didn’t help. The Powershell version of the Anaconda Prompt works, but I would rather use the standard version - AND be able to use the Windows Command Prompt when needed.

Is this a known issue? Any guidance on this?

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![ktsh.tanaka.2020](https://dub1.discourse-cdn.com/anaconda/user_avatar/forum.anaconda.com/ktsh.tanaka.2020/32/1400_2.png) [@ktsh.tanaka.2020](https://forum.anaconda.com/u/ktsh.tanaka.2020)\
**Post date:** [September 6, 2022, 5:19am UTC](https://forum.anaconda.com/t/anaconda-prompt-closes-immediately-after-setting-up-virtual-environment/33435/2 "2022-09-06T05:19:49Z")

</div>

dear [mrmichae](https://forum.anaconda.com/u/mrmichae).

thank you for your posting.  
This issue seems to be system specific rather than a known issue.  
At the moment, with conda4.12.0, the only known issues are listed at the URL below.

> <https://github.com/conda/conda/issues/11414>
>
> \### Checklist
> 
> \- \[X\] I added a descriptive title
> \- \[X\] I searched for other i…ssues and couldn't find a solution or duplication
> \- \[X\] I already searched in Google and didn't find any good information or help
> \- \[X\] I looked at the \[docs\](https://docs.conda.io/projects/conda/en/latest/user-guide/index.html) and didn't see anything to help
> 
> \### What happened?
> 
> Thank you for the great tool.
> Conda has been working well for me but I recently started getting issues. This seem to have started when I updated to conda 4.12 and it been is very slow when I source it via 'source miniconda3/bin/activate' or try to update a package or even activate an environment. It takes tens of minutes to even source, activate or update a package.
> 
> When I kill the process using keyboard interrupt, I get this error
> 
> \`\`\`
> 'File "/lustre/scratch118/malaria/team222/jr35/sware/miniconda3/bin/conda", line 13, in \<module\>
> sys.exit(main())
> File "/lustre/scratch118/malaria/team222/jr35/sware/miniconda3/lib/python3.10/site-packages/conda/cli/main.py", line 142, in main
> from ..activate import main as activator\_main
> File "/lustre/scratch118/malaria/team222/jr35/sware/miniconda3/lib/python3.10/site-packages/conda/activate.py", line 22, in \<module\>
> from .base.context import ROOT\_ENV\_NAME, context, locate\_prefix\_by\_name
> File "/lustre/scratch118/malaria/team222/jr35/sware/miniconda3/lib/python3.10/site-packages/conda/base/context.py", line 32, in \<module\>
> from ..common.configuration import (Configuration, ConfigurationLoadError, MapParameter,
> File "/lustre/scratch118/malaria/team222/jr35/sware/miniconda3/lib/python3.10/site-packages/conda/common/configuration.py", line 37, in \<module\>
> from .serialize import yaml\_round\_trip\_load
> File "/lustre/scratch118/malaria/team222/jr35/sware/miniconda3/lib/python3.10/site-packages/conda/common/serialize.py", line 11, in \<module\>
> from ..auxlib.entity import EntityEncoder
> File "/lustre/scratch118/malaria/team222/jr35/sware/miniconda3/lib/python3.10/site-packages/conda/auxlib/entity.py", line 252, in \<module\>
> from .\_vendor.boltons.timeutils import isoparse
> File "\<frozen importlib.\_bootstrap\>", line 1027, in \_find\_and\_load
> File "\<frozen importlib.\_bootstrap\>", line 1006, in \_find\_and\_load\_unlocked
> File "\<frozen importlib.\_bootstrap\>", line 688, in \_load\_unlocked
> File "\<frozen importlib.\_bootstrap\_external\>", line 879, in exec\_module
> File "\<frozen importlib.\_bootstrap\_external\>", line 975, in get\_code
> File "\<frozen importlib.\_bootstrap\_external\>", line 1074, in get\_data'
> \`\`\`
> 
> \### Additional Context
> 
> I am working on a cluster which also has conda base as 4.9.2. 
> 
> \### Conda Details
> 
> \<details\>
> \<summary\>\<code\>conda info\</code\>\</summary\>
> 
> \`\`\`shell
> active environment : base
> active env location : /lustre/scratch118/malaria/team222/jr35/sware/miniconda3
> shell level : 1
> user config file : /nfs/users/nfs\_j/jr35/.condarc
> populated config files : /nfs/users/nfs\_j/jr35/.condarc
> conda version : 4.12.0
> conda-build version : not installed
> python version : 3.10.4.final.0
> virtual packages : \_\_linux=4.15.0=0
> \_\_glibc=2.27=0
> \_\_unix=0=0
> \_\_archspec=1=x86\_64
> base environment : /lustre/scratch118/malaria/team222/jr35/sware/miniconda3 (writable)
> conda av data dir : /lustre/scratch118/malaria/team222/jr35/sware/miniconda3/etc/conda
> conda av metadata url : None
> channel URLs : https://conda.anaconda.org/conda-forge/linux-64
> https://conda.anaconda.org/conda-forge/noarch
> https://repo.anaconda.com/pkgs/main/linux-64
> https://repo.anaconda.com/pkgs/main/noarch
> https://repo.anaconda.com/pkgs/r/linux-64
> https://repo.anaconda.com/pkgs/r/noarch
> package cache : /lustre/scratch118/malaria/team222/jr35/sware/miniconda3/pkgs
> envs directories : /lustre/scratch118/malaria/team222/jr35/sware/miniconda3/envs
> /nfs/users/nfs\_j/jr35/.conda/envs
> platform : linux-64
> user-agent : conda/4.12.0 requests/2.27.1 CPython/3.10.4 Linux/4.15.0-171-generic ubuntu/18.04.6 glibc/2.27
> UID:GID : 20360:15253
> netrc file : None
> offline mode : False
> \`\`\`
> 
> \</details\>
> 
> \<details\>
> \<summary\>\<code\>conda config\</code\>\</summary\>
> 
> \`\`\`shell
> ==\> /nfs/users/nfs\_j/jr35/.condarc \<==
> auto\_activate\_base: False
> envs\_dirs:
> - /lustre/scratch118/malaria/team222/jr35/sware/miniconda3/envs
> pkgs\_dirs:
> - /lustre/scratch118/malaria/team222/jr35/sware/miniconda3/pkgs
> channel\_priority: disabled
> channels:
> - conda-forge
> - defaults
> \`\`\`
> 
> \</details\>
> 
> \<details\>
> \<summary\>\<code\>conda list\</code\>\</summary\>
> 
> \`\`\`shell
> \# packages in environment at /lustre/scratch118/malaria/team222/jr35/sware/miniconda3:
> \#
> \# Name Version Build Channel
> \_libgcc\_mutex 0.1 conda\_forge conda-forge
> \_openmp\_mutex 4.5 1\_gnu conda-forge
> brotlipy 0.7.0 py310h5764c6d\_1004 conda-forge
> bzip2 1.0.8 h7f98852\_4 conda-forge
> ca-certificates 2022.3.29 h06a4308\_0 defaults
> certifi 2021.10.8 py310hff52083\_2 conda-forge
> cffi 1.15.0 py310h0fdd8cc\_0 conda-forge
> charset-normalizer 2.0.12 pyhd8ed1ab\_0 conda-forge
> colorama 0.4.4 pyh9f0ad1d\_0 conda-forge
> conda 4.12.0 py310hff52083\_0 conda-forge
> conda-package-handling 1.8.1 py310h5764c6d\_1 conda-forge
> cryptography 36.0.0 py310h9ce1e76\_0 defaults
> idna 3.3 pyhd8ed1ab\_0 conda-forge
> ld\_impl\_linux-64 2.36.1 hea4e1c9\_2 conda-forge
> libffi 3.4.2 h7f98852\_5 conda-forge
> libgcc-ng 11.2.0 h1d223b6\_15 conda-forge
> libgomp 11.2.0 h1d223b6\_15 conda-forge
> libnsl 2.0.0 h7f98852\_0 conda-forge
> libuuid 2.32.1 h7f98852\_1000 conda-forge
> libzlib 1.2.11 h166bdaf\_1014 conda-forge
> ncurses 6.3 h27087fc\_1 conda-forge
> openssl 3.0.2 h166bdaf\_1 conda-forge
> pip 22.0.4 pyhd8ed1ab\_0 conda-forge
> pycosat 0.6.3 py310h5764c6d\_1010 conda-forge
> pycparser 2.21 pyhd8ed1ab\_0 conda-forge
> pyopenssl 22.0.0 pyhd8ed1ab\_0 conda-forge
> pysocks 1.7.1 py310hff52083\_5 conda-forge
> python 3.10.4 h2660328\_0\_cpython conda-forge
> python\_abi 3.10 2\_cp310 conda-forge
> readline 8.1.2 h7f8727e\_1 defaults
> requests 2.27.1 pyhd8ed1ab\_0 conda-forge
> ruamel\_yaml 0.15.100 py310h7f8727e\_0 defaults
> setuptools 62.1.0 py310hff52083\_0 conda-forge
> six 1.16.0 pyh6c4a22f\_0 conda-forge
> sqlite 3.38.2 h4ff8645\_0 conda-forge
> tk 8.6.12 h27826a3\_0 conda-forge
> tqdm 4.64.0 pyhd8ed1ab\_0 conda-forge
> tzdata 2022a h191b570\_0 conda-forge
> urllib3 1.26.9 pyhd8ed1ab\_0 conda-forge
> wheel 0.37.1 pyhd8ed1ab\_0 conda-forge
> xz 5.2.5 h516909a\_1 conda-forge
> yaml 0.2.5 h7f98852\_2 conda-forge
> zlib 1.2.11 h166bdaf\_1014 conda-forge
> \`\`\`
> 
> \</details\>

Different versions of python have different problems, and different versions of windows have different problems.

Of course, there are also relationships with other applications and security software, and it has not been completely elucidated.

It’s very annoying, but the best solution may be to build a dedicated server and client for anaconda.

Regards, you.  
ktsh.tanaka.2020

---

<div class="post-metadata">

**Author:** ![mrmichae](https://dub1.discourse-cdn.com/anaconda/user_avatar/forum.anaconda.com/mrmichae/32/2091_2.png) [@mrmichae](https://forum.anaconda.com/u/mrmichae)\
**Post date:** [September 9, 2022, 6:33pm UTC](https://forum.anaconda.com/t/anaconda-prompt-closes-immediately-after-setting-up-virtual-environment/33435/3 "2022-09-09T18:33:00Z")

</div>

Thanks @ktsh.tanaka.2020. Unfortunately setting up a separate server is not an option for me.

So far, I’ve tried several things including the following (all ideas from [Command Prompt Opens and Closes Immediately in Windows 10 - 9 Solutions](https://www.ubackup.com/windows-10/command-prompt-opens-and-closes-immediately-windows-10-jkzbj.html)):

- Create a copy of cmd.exe and change the name
- Use Windows 10 system file checker (SFC)
- Use the CHKDSK /F Command to check for disk errors
- Delete troublesome keys from the registry

None of these options worked. Since then, I’ve reverted the registry key(s) back to their previous state.

Has anyone else experienced this issue? If so, how did you resolve?

---

<div class="post-metadata">

**Author:** ![ktsh.tanaka.2020](https://dub1.discourse-cdn.com/anaconda/user_avatar/forum.anaconda.com/ktsh.tanaka.2020/32/1400_2.png) [@ktsh.tanaka.2020](https://forum.anaconda.com/u/ktsh.tanaka.2020)\
**Post date:** [September 9, 2022, 7:25pm UTC](https://forum.anaconda.com/t/anaconda-prompt-closes-immediately-after-setting-up-virtual-environment/33435/4 "2022-09-09T19:25:15Z")

</div>

dear [mrmichae](https://forum.anaconda.com/u/mrmichae).

thank you for your reply.  
There is nothing wrong with creating a system that is easy for you to use, with your own hands, in your own way.

What we want is to maintain this community in order to think and discuss with each other and solve it if an error or problem occurs.

This is because I think that distributions called open source are systems created by users themselves, not systems created by manufacturers or vendors.

The experience you gained in this case may be experience that other users do not have, or it may be experienced by users with the same problem somewhere on the planet.

Currently, various issues and ideas regarding conda are being discussed at the URL below. We hope for your reference.

> **[Issues · conda/conda](https://github.com/conda/conda/issues?page=1&q=is%3Aissue%2Bis%3Aopen)**
>
> OS-agnostic, system-level binary package manager and ecosystem - Issues · conda/conda

At present, similar problems are not subject to discussion. However, there may be some helpful information.

We sincerely wish you success.

Regards, you.  
ktsh.tanaka.2020
