Reputation: 12627
I am completely new to Python and try to run the example code 'Working with MDF' of a library called 'asammdf' (code can be found here: https://asammdf.readthedocs.io/en/master/examples.html)
When I run the .py-script I get the following error message:
WARNING:root:Signal plotting requires pyqtgraph or matplotlib Traceback (most recent call last): File "/Users/martin/PycharmProjects/mdfp3/WorkingWithMDF.py", line 46, in mdf4_cut.get('Float64_Signal').plot()
I added the pyqtgraph and matplotlib packages using the dependency manager in PyCharm, but no luck.
What am I doing wrong?
Edit:
Running the pip install
commands for the packages results in 'Requirement already satisfied' statements (see below)
(venv) martins-mbp-2:mdfp3 martin$ pip install pyqtgraph Requirement already satisfied: pyqtgraph in ./venv/lib/python3.7/site-packages (0.10.0) Requirement already satisfied: numpy in ./venv/lib/python3.7/site-packages (from pyqtgraph) (1.17.4)
and
(venv) martins-mbp-2:mdfp3 martin$ pip install matplotlib Requirement already satisfied: matplotlib in ./venv/lib/python3.7/site-packages (3.1.1) Requirement already satisfied: cycler>=0.10 in ./venv/lib/python3.7/site-packages (from matplotlib) (0.10.0) Requirement already satisfied: numpy>=1.11 in ./venv/lib/python3.7/site-packages (from matplotlib) (1.17.4) Requirement already satisfied: python-dateutil>=2.1 in ./venv/lib/python3.7/site-packages (from matplotlib) (2.8.1) Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in ./venv/lib/python3.7/site-packages (from matplotlib) (2.4.5) Requirement already satisfied: kiwisolver>=1.0.1 in ./venv/lib/python3.7/site-packages (from matplotlib) (1.1.0) Requirement already satisfied: six in ./venv/lib/python3.7/site-packages (from cycler>=0.10->matplotlib) (1.13.0) Requirement already satisfied: setuptools in ./venv/lib/python3.7/site-packages/setuptools-40.8.0-py3.7.egg (from kiwisolver>=1.0.1->matplotlib) (40.8.0)
Upvotes: 0
Views: 916
Reputation: 3731
It turns out that you need PyQt5 as well as either pyqtgraph or matplotlib. The GUI packages are considered 'optional', which would explain why they don't get installed automatically. FYI, I found this out by reading the exception in the asammdf\gui\plot.py file.
The GUI dependecies can be installed using this pip command
pip install asammdf[gui]
Upvotes: 2