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

Message matplotlib not installed #15

Open
FrisoBroekhuizen opened this issue Feb 13, 2025 · 8 comments
Open

Message matplotlib not installed #15

FrisoBroekhuizen opened this issue Feb 13, 2025 · 8 comments
Assignees
Labels
enhancement New feature or request

Comments

@FrisoBroekhuizen
Copy link
Collaborator

on windows 11 with julia 1.10, when running this script create_sys_image, the message appears even though it is already installed.

@ufechner7
Copy link
Owner

Same problem on Linux. This code does not work any longer:

PYTHON_PATH=$(which python3)
if [ -x "$PYTHON_PATH" ]; then
            echo "Matplotlib found. Using existing installation."
            export PYTHON=$PYTHON_PATH

@ufechner7 ufechner7 added the enhancement New feature or request label Feb 13, 2025
@1-Bart-1
Copy link
Collaborator

Still works for me on Linux, with matplotlib installed in a virtual environment. @FrisoBroekhuizen and @ufechner7 how did you install python and matplotlib? And can you try running python3 and importing matplotlib in the terminal, and check the result?

% python3
Python 3.12.3 (main, Jan 17 2025, 18:03:48) [GCC 13.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import matplotlib
>>> 

@1-Bart-1 1-Bart-1 self-assigned this Feb 13, 2025
@ufechner7
Copy link
Owner

   Resolving package versions...
  No Changes to `~/.julia/environments/v1.10/Project.toml`
  No Changes to `~/.julia/environments/v1.10/Manifest.toml`
Python is found at /home/ufechner/miniconda3/bin/python3
Matplotlib is not found.
Do you want to install matplotlib with Conda? (y/n): y

On the command line it works:

ufechner@framework:~$ python3
Python 3.12.3 (main, Jan 17 2025, 18:03:48) [GCC 13.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import matplotlib
>>> 

But on the command line it is also using a different version of python:

ufechner@framework:~$ which python3
/usr/bin/python3

@1-Bart-1
Copy link
Collaborator

So that would mean that you don't have matplotlib installed in your Conda environment? Could you try running /home/ufechner/miniconda3/bin/python3 and import matplotlib there?

@ufechner7
Copy link
Owner

ufechner7 commented Feb 13, 2025

ufechner@framework:~$ /home/ufechner/miniconda3/bin/python3
Python 3.11.5 (main, Sep 11 2023, 13:54:46) [GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import matplotlib
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'matplotlib'
>>> 

But I don't understand why the script is trying to use a different Python version.

UPDATE:
Now I understand: If I use bash in VSCode, than it says:

ufechner@framework:~/repos/Tethers.jl$ which python3
/home/ufechner/miniconda3/bin/python3

If I use Bash in the normal terminal it says:

ufechner@framework:~$ which python3
/usr/bin/python3

@1-Bart-1
Copy link
Collaborator

Does that solve the issue? Or should we add a command line arg to the script where you can specify the python path you want to use.

@1-Bart-1
Copy link
Collaborator

So the solution for @ufechner7 would be to install matplotlib through the VSCode terminal.

@ufechner7
Copy link
Owner

Not really. I don't want to have multiple Python3 installations. I would like to teach VSCode not to mess with the search path.

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

No branches or pull requests

3 participants