0

after installing the isacalc module I wrote the example code given in the read me.
then I get the error:

    runfile('C:/Users/Black/Documents/1-Neff Aero/Python 
    Plots/isacalctest.py', wdir='C:/Users/Black/Documents/1-Neff Aero/Python 
    Plots')
    Traceback (most recent call last):

   File "C:\Users\Black\Documents\1-Neff Aero\Python Plots\isacalctest.py", 
   line 8, in <module>
   import isacalc as isa

   File "C:\ProgramData\Anaconda3\lib\site-packages\isacalc\__init__.py", 
   line 1, in <module>
   from isacalc.main_executable import calculate_at_h, get_atmosphere

   File "C:\ProgramData\Anaconda3\lib\site- 
   packages\isacalc\main_executable.py", line 1, in <module>
   from src import Atmosphere

   ModuleNotFoundError: No module named 'src'

Code I wrote:

import isacalc as isa


atmosphere = isa.get_atmosphere()

h = 11000.0

T,P,d,a,mu = isa.calculate_at_h(h,atmosphere)
Adam Black
  • 53
  • 4

1 Answers1

1

I installed isacalc in a virtualenv and looked in <venv>\Lib\site-packages\isacalc. This is what I found:

enter image description here

Huh, weird! No src directory for it to import Atmosphere from.

No worries, just download the src directory from the GitHub repo and put it in the isacalc directory.

enter image description here

Problem fixed!

Pranav Hosangadi
  • 23,755
  • 7
  • 44
  • 70
  • Thank you! I had to move all the files from the GitHub repo to get it to work. But it does work now. not sure why : pip install isacalc didn't install half the files. – Adam Black Aug 03 '20 at 13:14