0

I have installed spectral library in Python 3.7 according to the commands given on the documentation site of SPy(spectral python)

The commands were :

 python setup.py install
   pip install spectral

(the website is this: http://www.spectralpython.net/installation.html)

But, when I import it on python, it shows this error:

Traceback (most recent call last): File "C:\Users\lenovo\hyprspectral classification using nn\Hyper-Spectral-Net.py", line 8, in import spectral

ModuleNotFoundError: No module named 'spectral'

Whereas on command prompt, it is showing that spectral has been successfully installed. It will be very helpful if someone can tell the solution for this.

  • Are you also running your script from the command line? If not, try running it from the command line but just prior to running it, run "pip freeze" to see if the spectral package shows up as being installed. – bogatron Apr 12 '20 at 17:34
  • Thank you so much. The error was in my python installation. The command prompt was running the previous version of python whereas the idle was of a different version. – Aditi Chandra Apr 20 '20 at 10:09

0 Answers0