I have installed an open source python platform for data analysis called YT and was trying to run a python script with the following imports:
import yt import numpy as np import yt.visualization.eps_writer as eps from yt.data_objects.particle_filters import add_particle_filter from matplotlib import pyplot as plt plt.switch_backend('agg') However, I get an error of not being able to find the module pyx:
> Traceback (most recent call last): File "gasinflow.py", line 3, in > <module> > import yt.visualization.eps_writer as eps File "/home/samvad/anaconda3/lib/python3.6/site-packages/yt/visualization/eps_writer.py", > line 16, in <module> > import pyx ModuleNotFoundError: No module named 'pyx' Python version: 3.6 I have come across this being an issue with Cython not being installed but Cython-0.29.7 is installed too.
1 Answer
Looks like you just need to install pyx:
~$ pip3 install pyx Collecting pyx Using cached Building wheels for collected packages: pyx Running setup.py bdist_wheel for pyx ... done Stored in directory: $HOME/.cache/pip/wheels/d7/df/3b/33998bf28fc6088c399f64629bcd12f2b129d358f92db5a825 Successfully built pyx Installing collected packages: pyx Successfully installed pyx-0.14.1 I recommend always using pip to install modules since it'll fetch any dependencies any module needs.