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

not working in terminal : conda install matplotlib #212

Closed
Sandy4321 opened this issue Apr 21, 2023 · 7 comments
Closed

not working in terminal : conda install matplotlib #212

Sandy4321 opened this issue Apr 21, 2023 · 7 comments
Labels
bug Something isn't working

Comments

@Sandy4321
Copy link

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:
I try to install matplotlib by usual way - use command line from terminal
(studiolab) studio-lab-user@default:~/sagemaker-studiolab-notebooks$ conda install matplotlib

image

then conda list confirms that matplotlib is installed
image

(studiolab) studio-lab-user@default:~/sagemaker-studiolab-notebooks$ conda list matplotlib

packages in environment at /home/studio-lab-user/.conda/envs/studiolab:

Name Version Build Channel

matplotlib 3.7.1 py39hf3d152e_0 conda-forge
matplotlib-base 3.7.1 py39he190548_0 conda-forge
matplotlib-inline 0.1.6 pyhd8ed1ab_0 conda-forge

but when I try to use matplotlib from notebook - it written it is not installed
image

closing current notebook and open new one is not helping

Expected behavior
(studiolab) studio-lab-user@default:~/sagemaker-studiolab-notebooks$ conda install matplotlib

should provide capability to use matplotlib from notebook

Notice I do have only one base environment
image

and
image

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS] windows 11
  • Browser [e.g. chrome, safari] edge
  • Version [e.g. 22]
@Sandy4321 Sandy4321 added the bug Something isn't working label Apr 21, 2023
@npmajisha
Copy link

Based on your screenshots, it seems like you are installing matplotlib in the studiolab environment.

This environment should only be used for installing jupyterlab and jupyter server extensions. The environment used for notebook kernels is default, which you can see from the kernel dropdown default:Python.

There are two ways you can fix this problem:

  1. In order to install packages into the default environment, you will have to activate the default environment so that they are available in your notebooks - conda activate default. After switching the environment, you can continue to install the packages you want.

  2. Alternatively, the recommended way for installation as described here is to use %conda install <package> or %pip install <package> in a notebook cell which will ensure that the packages are installed in the correct conda environment without having to remember to activate it.

Hope this helps.

@Sandy4321
Copy link
Author

In order to install packages into the default environment, you will have to activate the default environment so that they are available in your notebooks - conda activate default

but as you can see from above
(studiolab) studio-lab-user@default:~/sagemaker-studiolab-notebooks$ conda install matplotlib
active environment is studiolab
do you mean studiolab is not default environment?

@icoxfog417
Copy link
Contributor

default and studiolab is the different environment.

@Sandy4321
Copy link
Author

I see, let me try

@MicheleMonclova
Copy link

can we close this issue?

@Sandy4321
Copy link
Author

no closing pls, it is still bug

@icoxfog417
Copy link
Contributor

We discuss the default and studiolab confusion at #218 and close this issue because installing matplotlib is possible in Studio Lab.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants