'(Windows 10) Unable to use Anaconda Prompt - AttributeError: module 'colorama' has no attribute 'init'
When I open Anaconda, I am unable to do anything. When I type a command, I end up getting:
Traceback (most recent call last):
File "C:\Users\jenni\Anaconda3\Scripts\conda-script.py", line 12, in <module>
sys.exit(main())
File "C:\Users\jenni\Anaconda3\lib\site-packages\conda\cli\main.py", line 145, in main
init_loggers()
File "C:\Users\jenni\Anaconda3\lib\site-packages\conda\cli\main.py", line 56, in init_loggers
from ..gateways.logging import initialize_logging, set_verbosity
File "C:\Users\jenni\Anaconda3\lib\site-packages\conda\gateways\logging.py", line 14, in <module>
from ..common.io import attach_stderr_handler
File "C:\Users\jenni\Anaconda3\lib\site-packages\conda\common\io.py", line 33, in <module>
from .._vendor.tqdm import tqdm
File "C:\Users\jenni\Anaconda3\lib\site-packages\conda\_vendor\tqdm\__init__.py", line 8, in <module>
from ._tqdm import tqdm
File "C:\Users\jenni\Anaconda3\lib\site-packages\conda\_vendor\tqdm\_tqdm.py", line 13, in <module>
from ._utils import _supports_unicode, _environ_cols_wrapper, _range, _unich, \
File "C:\Users\jenni\Anaconda3\lib\site-packages\conda\_vendor\tqdm\_utils.py", line 31, in <module>
colorama.init()
AttributeError: module 'colorama' has no attribute 'init'
I've tried uninstalling/reinstalling colorama, but I can't do so without Anaconda. Has anyone encountered this issue before? I've only seen one specific instance on here and it involves uninstalling.
Solution 1:[1]
I ran into this problem after uninstalling/re-installing Python & Anaconda.
From the miniconda troubleshooting page:
This can be caused by an old version of
requestsor by having thePYTHONPATHenvironment variable set.Solution
Update
requestsand be surePYTHONPATHis not set:
- Run
conda info -ato show the requests version and various environment variables such asPYTHONPATH.- Update the
requestsversion withpip install -U requests.- Clear
PYTHONPATH:
- On Windows, clear it the environment variable settings.
- On macOS and Linux, clear it by removing it from the bash profile and restarting the shell.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | svtaylor |
