ModuleNotFoundError: No module named 'psr'

0

I have started to make a library for my application, in Python 3.6, however I get the following Module error not found, I have checked carefully and I have done several tests, until now several modules I import them correctly, until with the file 'psr.py' does not import it correctly.

This way, it imports the file that I specify

 EBM
  |->POES.py

 PVT
  __init__.py
  |->Gas
      |->factorvolgas.py
      |->psr.py
  pypvt.py

POES.py

import sys
sys.path.append("/home/andres/documents/PVT")
from pypvt import *
import numpy as np
import matplotlib.pyplot as plt

#INPUT DATA - PVT
GOR = 300; SpG = 0.6; T = 200; API = 30; N =0; HS=0 ; CO=0
print(gas.Bg(1000,T,N,HS,CO,SpG,API))'

pypvt.py

#Propiedades del Gas, cálculo de Factor volumétrico, factor Z con ecuaciones de estado
class gas(object):

    def Bg(P,T,N,HS,CO,SpG,API):
        from Gas import factorvolgas
        return factorvolgas.Bg(P,T,N,HS,CO,SpG,API)

factorvolgas.py

#Archivo de almacenamiento para el factor volumetrico del gas
from psr import Psr
from tsr import Tsr
#Variable

#P = 3810; T = 139; N = 0.5; HS = 0.33; CO = 0.27; SpG = 0.75; API = 0

def Bg(P,T,N,HS,CO,SpG,API):

    dpsr = Psr(P,T,N,HS,CO,SpG,API)
    dtsr = Tsr(T,N,HS,CO,SpG,API)

    if 0.1 <= dpsr <= 1.49 and 1.05 <= dtsr <= 2.95:
        import Sarem
        z = Sarem.z(dpsr,tsr)

    elif 0.1 <= dpsr <= 24 and 1.2 <= dtsr <= 3:
        import HallYMethod
        z = HallYMethod.z(dpsr,T,N,HS,CO,SpG,API)

    elif 0.2 <= dpsr <= 30 and 1.05 <= dtsr <= 3:
        import BWRMethod
        z = BWRMethod.z(dpsr,dtsr)

    return 0.00503*((z*T)/P)

But the final error is:

Traceback (most recent call last):
  File "POES.py", line 38, in <module>
    print(gas.Bg(1000,T,N,HS,CO,SpG,API))
  File "/home/andres/documents/PVT/pypvt.py", line 109, in Bg
    from Gas import factorvolgas
  File "/home/andres/documents/PVT/Gas/factorvolgas.py", line 2, in <module>
    from psr import Psr
ModuleNotFoundError: No module named 'psr'
    
asked by Gilberto 30.03.2018 в 03:06
source

0 answers