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

2nd miniconda install broken jupyter nb_conda #69

Open
nick-youngblut opened this issue Feb 26, 2018 · 2 comments
Open

2nd miniconda install broken jupyter nb_conda #69

nick-youngblut opened this issue Feb 26, 2018 · 2 comments

Comments

@nick-youngblut
Copy link

My research lab and I use a centralized install of miniconda (not installed via root). We've been using conda <v4.4 due to issues with installing certain software for conda >=4.4. In order to start the transition to >4.4, I created a 2nd centralized install of miniconda. Installing this 2nd version of conda seems to have broken nb_conda for all of our Jupyter notebooks. For creating new notebooks, we now only have two options: "Python 3" or "R". Previously, we could select from ~15 different conda environments. When I click on the "conda" table in Jupyter, I get an error, and this is reported on the command line:

[E 13:43:46.719 NotebookApp] 500 GET /conda/packages/available?_=1519649013685 (127.0.0.1) 44.97ms referer=http://127.0.0.1:9705/tree?
Traceback (most recent call last):
  File "/ebio/abt3_projects/software/miniconda3/lib/python3.6/site-packages/conda/exceptions.py", line 640, in conda_exception_handler
    return_value = func(*args, **kwargs)
  File "/ebio/abt3_projects/software/miniconda3/lib/python3.6/site-packages/conda/cli/main.py", line 103, in _main
    from ..base.context import context
  File "/ebio/abt3_projects/software/miniconda3/lib/python3.6/site-packages/conda/base/context.py", line 771, in <module>
    context = Context(SEARCH_PATH, APP_NAME, None)
  File "/ebio/abt3_projects/software/miniconda3/lib/python3.6/site-packages/conda/common/configuration.py", line 727, in __init__
    self._set_search_path(search_path)
  File "/ebio/abt3_projects/software/miniconda3/lib/python3.6/site-packages/conda/common/configuration.py", line 745, in _set_search_path
    self._set_raw_data(load_file_configs(search_path))
  File "/ebio/abt3_projects/software/miniconda3/lib/python3.6/site-packages/conda/common/configuration.py", line 364, in load_file_configs
    expanded_paths = tuple(expand(path) for path in search_path)
  File "/ebio/abt3_projects/software/miniconda3/lib/python3.6/site-packages/conda/common/configuration.py", line 364, in <genexpr>
    expanded_paths = tuple(expand(path) for path in search_path)
  File "/ebio/abt3_projects/software/miniconda3/lib/python3.6/site-packages/conda/common/path.py", line 247, in expand
    return abspath(expanduser(expandvars(path)))
  File "/ebio/abt3_projects/software/miniconda3/lib/python3.6/posixpath.py", line 374, in abspath
    cwd = os.getcwd()
FileNotFoundError: [Errno 2] No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/ebio/abt3_projects/software/miniconda3/bin/conda", line 11, in <module>
    sys.exit(main())
  File "/ebio/abt3_projects/software/miniconda3/lib/python3.6/site-packages/conda/cli/main.py", line 182, in main
    return conda_exception_handler(_main, *args)
  File "/ebio/abt3_projects/software/miniconda3/lib/python3.6/site-packages/conda/exceptions.py", line 644, in conda_exception_handler
    return handle_exception(e)
  File "/ebio/abt3_projects/software/miniconda3/lib/python3.6/site-packages/conda/exceptions.py", line 634, in handle_exception
    print_unexpected_error_message(e)
  File "/ebio/abt3_projects/software/miniconda3/lib/python3.6/site-packages/conda/exceptions.py", line 579, in print_unexpected_error_message
    from .base.context import context
  File "/ebio/abt3_projects/software/miniconda3/lib/python3.6/site-packages/conda/base/context.py", line 771, in <module>
    context = Context(SEARCH_PATH, APP_NAME, None)
  File "/ebio/abt3_projects/software/miniconda3/lib/python3.6/site-packages/conda/common/configuration.py", line 727, in __init__
    self._set_search_path(search_path)
  File "/ebio/abt3_projects/software/miniconda3/lib/python3.6/site-packages/conda/common/configuration.py", line 745, in _set_search_path
    self._set_raw_data(load_file_configs(search_path))
  File "/ebio/abt3_projects/software/miniconda3/lib/python3.6/site-packages/conda/common/configuration.py", line 364, in load_file_configs
    expanded_paths = tuple(expand(path) for path in search_path)
  File "/ebio/abt3_projects/software/miniconda3/lib/python3.6/site-packages/conda/common/configuration.py", line 364, in <genexpr>
    expanded_paths = tuple(expand(path) for path in search_path)
  File "/ebio/abt3_projects/software/miniconda3/lib/python3.6/site-packages/conda/common/path.py", line 247, in expand
    return abspath(expanduser(expandvars(path)))
  File "/ebio/abt3_projects/software/miniconda3/lib/python3.6/posixpath.py", line 374, in abspath
    cwd = os.getcwd()
FileNotFoundError: [Errno 2] No such file or directory
[E 13:45:08.273 NotebookApp] [nb_conda_kernels] couldn't call conda:

Why did a 2nd conda install affect nb_conda? Isn't everything contained in the conda install directory? Any ideas on how I revert back? Our whole research group of ~20 people now do not have access to the conda environments in Jupyter.

@nick-youngblut
Copy link
Author

The simple fix was to restart all of the Jupyter notebook servers. I still don't see why a new conda install (with nb_conda installed in it) would affect Jupyter notebooks servers running from a different conda install. At least it was relatively easy to fix.

@tjd2002
Copy link

tjd2002 commented May 25, 2018

Maybe related to this bug: anaconda/nb_conda_kernels#73?
(Open pull request with fix at anaconda/nb_conda_kernels#79 )

I say that because of the lines

FileNotFoundError: [Errno 2] No such file or directory
[E 13:45:08.273 NotebookApp] [nb_conda_kernels] couldn't call conda:

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

2 participants