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

conda_create "module 'colorama' has no attribute 'init'" #1110

Closed
charlielogan opened this issue Dec 22, 2021 · 4 comments
Closed

conda_create "module 'colorama' has no attribute 'init'" #1110

charlielogan opened this issue Dec 22, 2021 · 4 comments

Comments

@charlielogan
Copy link

I am trying to load a conda environment in reticulate from a .yml file but am stopped by AttributeError: module 'colorama' has no attribute 'init'. In trying to figure out more about why this is occurring, I found that the same error happens when trying to create any conda environment with conda_create.

I uninstalled reticulate and tried these steps to reproduce from the beginning:
devtools::install_github("rstudio/reticulate")
library(reticulate)
conda_create("test_export", packages="python=3.7")

Error:

Traceback (most recent call last):
File "C:\Users\clogan\AppData\Local\R-MINI~1\Scripts\conda-script.py", line 12, in <module> sys.exit(main())
File "C:\Users\clogan\AppData\Local\R-MINI~1\lib\site-packages\conda\cli\main.py", line 151, in main from ..exceptions import conda_exception_handler
File "C:\Users\clogan\AppData\Local\R-MINI~1\lib\site-packages\conda\exceptions.py", line 25, in <module> from .common.io import dashlist, timeout
File "C:\Users\clogan\AppData\Local\R-MINI~1\lib\site-packages\conda\common\io.py", line 33, in <module> from .._vendor.tqdm import tqdm
File "C:\Users\clogan\AppData\Local\R-MINI~1\lib\site-packages\conda\_vendor\tqdm\__init__.py", line 13, in <module> from .cli import main # TODO: remove in v5.0.0
File "C:\Users\clogan\AppData\Local\R-MINI~1\lib\site-packages\conda\_vendor\tqdm\cli.py", line 9, in <module> from .std import TqdmKeyError, TqdmTypeError, tqdm
File "C:\Users\clogan\AppData\Local\R-MINI~1\lib\site-packages\conda\_vendor\tqdm\std.py", line 22, in <module> from .utils import (
File "C:\Users\clogan\AppData\Local\R-MINI~1\lib\site-packages\conda\_vendor\tqdm\utils.py", line 45, in <module> colorama.init(strip=False)
AttributeError: module 'colorama' has no attribute 'init'
Error: Error creating conda environment 'test_export' [exit code 1]

Any help would be appreciated

@kevinushey
Copy link
Collaborator

jupyterlab/jupyterlab#3671 seems related, but I don't have any great ideas. The issue appears to be independent of reticulate, though.

@charlielogan
Copy link
Author

jupyterlab/jupyterlab#3671 seems related, but I don't have any great ideas. The issue appears to be independent of reticulate, though.

Do you think its an issue with conda? Or with colorama?

@RParkerE
Copy link

I was having an issue with colorama.init() as well in a different external library. Issue 370 solved this for me. You will have to import colorama using from colorama import initialise at least with colorama 0.4.6 that worked for me.

@t-kalinowski
Copy link
Member

Thanks for reporting. This doesn't seem to be a reticulate issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants