Will
Will

Reputation: 1

Installing napari and matplotlib in the same anaconda environment

I created an environment with anaconda

conda create --name napari_env python=3.10

conda activate napari_env

I then installed napari and matplotlib

conda install napari matplotlib

By launching my napari viewer (in a vscode debugger);


def display_volumes():
    viewer = napari.Viewer(ndisplay=3)
    viewer.add_image(
        data = cell_mask,
        name = 'cell',
        colormap='gray_r', 
        rendering='mip'
    )

    viewer.add_points(
        data = [cx1, cy1, cz1],
        name = 'sphere center',
        face_color = 'orange',
        size=5
    )
    viewer.window._qt_window.showMaximized()
    napari.run()

I got an error with OpenGL;

RuntimeError: OpenGL got errors (Check before draw): GL_INVALID_ENUM

I think there's a dependency conflict with the vispy library

I've decided to install the two libraries in separate environments.

I'd like to find a configuration during the installation of my environment that allows me to have both libraries cohabit.

Upvotes: 0

Views: 23

Answers (0)

Related Questions