I have already installed all the SPy dependencies and trying to import the spectral module in ipython version3.0 and getting this error : no module named spectral. what could possibly be wrong?
-
What statement are you using to import this module? – xnx Jun 13 '15 at 22:55
-
from spectral import * – RachJain Jun 14 '15 at 05:15
-
@RachJain it's not great practice to import modules using `*`, for readability purposes! – Nordle Sep 20 '18 at 13:52
2 Answers
The easiest way to install Spectral for Python 3 is:
1 - Go to the installation page http://www.spectralpython.net/installation.html
2 - Click on the link "Python Package Index (PyPI)". It will lead you to the download page: https://pypi.org/project/spectral/.
3 - Click on Download files, save the "spectral.tar.gz" into your computer.
4 - Extract the files (right click -> Extract here).
5 - On terminal type "cd /home/user/Downloads/spectral-0.19" (or use the path to the folder you just unconpressed).
6 - On terminal type "sudo python3 setup.py install"
Obs: if you use "sudo python setup.py install", as shown at installation page, it will install Spectral for Python 2.
I hope it helps.
you can use "pip install spectral"on terminal to install the spectral package. you can refer to "https://pypi.org/project/spectral/".

- 1