Error when trying to access Jupyter conda API to retrieve information about two default environments for kernel specifications

After installing conda (python 3.5, channel= conda-forge) and numerous packages using conda and jupyter labextension...

When I check

conda info --envs

only the root environment is listed even though I haven't created any additional environments)

https://i.stack.imgur.com/eWPrP.png

As a result, some unusual issues have cropped up:

  1. An error occurred while retrieving installed packages.

    EnvironmentLocationNotFound: Not a conda environment: /opt/conda/envs/conda
    

Additionally, there are two default environments in jupyter conda

  1. I encounter an error when trying to launch jupyter (notebook or lab):

    [E 16:33:06.973 LabApp] Uncaught exception GET /api/kernelspecs?1525530786969 (172.17.0.1)
    
    [E 16:35:44.455 LabApp] 500 GET /api/kernelspecs (172.17.0.1) 3.71ms
    

    Consequently, despite being listed in

    jupyter kernelspec list
    

One solution could be to utilize pip 9.x and

pip install --upgrade jupyter-client

However, my preference is to resolve it within conda.

Answer №1

If you prefer updating through conda instead of pip, you can use the following command:

conda update jupyter_client jupyter_core

Answer №2

Encountering the identical issue, I managed to resolve it by executing the following command in WSL Ubuntu:

sudo apt install jupyter-core

It appears that pip alone does not meet all Linux prerequisites.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

How can I display the y-axis values on a histogram plot created in Python?

I'm having trouble getting my y-axis values to print in increments of 100 for a histogram plot in Python. Everything else seems to be working correctly. Below is the code I'm using: #!/usr/local/bin/python3 import math from sys import argv from ...

Error: The absence of a Firefox profile in Python's Selenium causing

Currently, I am facing challenges while attempting to set up a Firefox driver with Selenium. The process of creating the driver seems to be causing some obstacles. My initial attempt looks like this: from selenium import webdriver driver = webdriver.Fire ...

Generator causes Two-Sum to Run Out of Time

Currently, I am working on solving various problems and have been exploring different approaches for the two-sum problem. Initially, I came up with the following solution: nums = [2,7,11,15] target = 9 def twoSum(nums: List[int], target: int) -> List[ ...

Python code to find the mean and standard deviation for each column in a CSV file

I need help with pre-processing a dataset. My goal is to remove all occurrences of '?' in each data point, then calculate the mean and standard deviation for every column. However, I keep encountering this error message: IOError: [Errno 13] Pe ...

Stopping a nested loop in Python after a condition is satisfied

After working on a piece of code for a while, I encountered a problem with stopping a for loop after a certain condition is met. Here's the snippet: DATA_t = pd.read_excel('C:/Users/yo4226ka/Work Folders/Desktop/Teaching/IKER STUFF/iker1.xlsx&apo ...

What is causing this unexpected text to display in Django when encountering errors while trying to submit a form?

On my website, there is a form that collects an employee number and validates it against another model called Salesman. It also checks if the employee's team field includes 'WF'. The validation process functions correctly and displays everyt ...

Python "every" completion

I am puzzled about how Python handles objects when executing the all function. According to the documentation, it should work as follows: def all(iterable): for element in iterable: if not element: return False return True How ...

What is the best way to turn off console messages from pywebkit?

One common issue that often arises is how to prevent the following messages from displaying on the terminal: ** Message: console message: @1: Refused to set unsafe header "cookie" ** Message: console message: @1: Refused to set unsafe header ...

How to pull specific nested dictionary values based on conditions using JINJA2 within Ansible for JSON data extraction

I am attempting to retrieve the CDN domain name associated with a specific Alias from Ansible's cloudfront_facts. The output, in summary form, looks like this: { "cdn_facts": { "ansible_facts": { "cloudfront": { "summary": { "di ...

Need help navigating tensor slicing when dealing with a 'None' dimension?

I am currently utilizing TensorFlow to implement a CNN model named DVF from the repository here: https://github.com/liuziwei7/voxel-flow. The model's output is 'deconv4' with dimensions of [batch_size, 256, 256,3]. To extract optical flow, ...

"Extracting items from a list and using them to locate elements with find_element

driver.find_element_by_xpath('//*[starts-with(@href, "javascript") and contains(@href, '"(list1)[3]"')]') I'm struggling with a piece of code similar to this. It's almost functional, but the issue arises w ...

How to use Selenium WebDriver in Python to upload a file using a hidden input field

Html: <div id="js-cert-file" class="form-group"> <button id="js-ob-browse-n-upload" class="btn btn-ob browse-and-upload-onboarding-ssl-button" style=""> BROWSE & UPLOAD </button> <input id="js-cert-file" class="hidden btn btn-ob" ...

Downloading files in headless mode using Python and Selenium is not working

I am encountering an issue while trying to download this file: Residential Product Guide & Rate Sheets Residential Rate Sheet -> Click on the download button next to it When I download without using headless mode, everything works perfectly fine ...

Creating a Python script to generate a 3D plot using multiple dataframes

If I have three different DataFrames in Python using pandas library: df_sales = pd.DataFrame([[20,30,10], [30,20,20], [20,40,40]], columns=list("ABC")) A B C 0 20 30 10 1 30 20 20 2 20 40 40 df_people_info = pd.DataFrame([[2,3,1], [3 ...

Select a particular email within a Gmail inbox using Python

Looking to extract a specific email from a Gmail account based on the subject. I have opted for selenium as I am unable to utilize imaplib with this particular Gmail account. Stuck at this point: driver.find_element_by_id("identifierId").send_keys('M ...

Django REST FrameWork JWT prohibits the provision of data and self-decoding

I currently have these API endpoints set up: urlpatterns += [ path('api-token-auth/', obtain_jwt_token), path('api-token-verify/', verify_jwt_token), path('api-token-refresh/', refresh_jwt_token), path('a ...

Python Selenium (Extracting Data from a Specific Table)

Picture of the table I would like to utilize My intention was to extract a specific value from the table, targeting a precise row and column. However, upon inspecting the sheet, there doesn't seem to be a <table> element present, leaving me str ...

Using Python to create a customizable progress bar and writing it to a file

I am facing an issue with executing a Python script that runs a Perl script as part of its functionality. I am capturing the stdout and stderr using the subprocess module, following this pseudo code: import subprocess as sp import sys perl_script='/u ...

Retrieve data from a file in CSV format and separate it into two distinct lists: one for strings and the other for integers

I have the following CSV data: Jim 57 83 55 78 John 98 91 80 Michael 61 88 80 60 Harry 92 58 50 57 James 51 97 52 53 I need to format it without using the CSV module. For empty values, I want to display "Non ...

The Django Extended User model fails to assign values to fields upon creation, despite receiving the appropriate arguments

After creating a new user using a registration form I developed, the user is successfully created with an extension that includes a field pointing to the User. However, when passing information like name or birthday during the creation process, it appears ...