Segmentation Fault When Importing plotly

I am new to plotly and somewhat new to python, but i just installed plotly for a school project. When I started trying to run the example code in the getting started section, I get a “Segmentation fault: 11” when I run the import line. I am using python version 3.7.2 and plotly version 5.6.0 on mac running Monterey 12.2.1. I have searched for similar problems but have not been able to find any. Any help is appreciated!

edit: Here is a MRE. I was originally working in Visual Studio Code but I also get the same segmentation fault if I try to run the code from the command line. I just copied the first scatter plot example from the getting started section of the plotly web page, and even after commenting out the rest of the code I still get the segmentation fault just by importing Please let me know if any more information is needed. Thanks!

import as px
# Creating the Figure instance
#fig = px.line(x=[1,2, 3], y=[1, 2, 3])
# printing the figure instance

Welcome! Please follow this below.

Sounds like something is wrong with the environment. Have you tried switching it?