You are not logged in.
Got a simple script to check if the importation succeeded.
#simple_script.py
import matplotlib.pyplot as pltRunning it by ./simple_script.py the cursor turns into a cross-like one and nothing happens moreover, but if I press three left clicks I get
import: unable to load module `/usr/lib/ImageMagick-6.9.8//modules-Q16HDRI/coders/ps.la': file not found @ error/module.c/OpenModule/1290.
import: no encode delegate for this image format `PS' @ error/constitute.c/WriteImage/1184.python -c "import sys; print (sys.path);"
['', '/home/florea/Projects/python_scripts', '/usr/lib', '/usr/lib/python36.zip', '/usr/lib/python3.6', '/usr/lib/python3.6/lib-dynload', '/home/florea/.local/lib/python3.6/site-packages', '/usr/lib/python3.6/site-packages']
pacman --query --list | grep "modules-Q16HDRI/coders/ps.la"
imagemagick /usr/lib/ImageMagick-6.9.8/modules-Q16HDRI/coders/ps.la
Same behaviour with PythonMagick too installed. Any ideas?
Last edited by asdfiex (2017-05-01 17:07:13)
Offline
Got a simple script to check if the importation succeeded.
#simple_script.py import matplotlib.pyplot as pltRunning it by ./simple_script.py the cursor turns into a cross-like one and nothing happens moreover, but if I press three left clicks I get
import: unable to load module `/usr/lib/ImageMagick-6.9.8//modules-Q16HDRI/coders/ps.la': file not found @ error/module.c/OpenModule/1290. import: no encode delegate for this image format `PS' @ error/constitute.c/WriteImage/1184.Same behaviour with PythonMagick too installed. Any ideas?
Your simple_script.py has no hashbang. It is being interpreted as a shell script so it is running /usr/bin/import on the first line. That is why you see the crosshairs. /usr/bin/import is a command to screenshot X-server windows.
Add a hashbang, e.g.
#!/usr/bin/env python3
import matplotlib.pyplot as plt
print('import succeeded')or run the script with
python simple_script.pyMy Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
I simply took the code from tutorials as it is.
Better somebody tell them there, lot of abecedarians everywhere...
It works! Thank you!
Offline
I don't think anyone needs to "tell them there", that is a valid Python script. You put it in a bash file, and your implementation is not a valid bash file. Those tutorials are teaching you about their library, not about bash scripts or any other OS-dependent things you may do.
Last edited by mrunion (2017-05-01 12:08:07)
Matt
"It is very difficult to educate the educated."
Offline
I simply took the code from tutorials as it is.
Better somebody tell them there, lot of abecedarians everywhere...
It works! Thank you!
Please edit your first post and prepend "[SOLVED]" to the subject line.
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline