ImportError: No module named utils

J'essaie d'importer un utilitaires fichier mais en cours d'exécution dans une erreur bizarre que quand je lance le code par l'intermédiaire d'un script.

Quand je le lance test.py

emplacement: /home/amourav/Python/proj/test.py

code:

import os
os.chdir(r'/home/amourav/Python/')
print os.listdir(os.getcwd())
print os.getcwd()
from UTILS import *

La sortie est:

['UTILS_local.py','UTILS.py', 'proj', 'UTILS.pyc']

/home/amourav/Python

Traceback (most recent call last):
Fichier "UNET_2D_AUG17.py", la ligne 11, en
à partir UTILS à l'importation *
ImportError: No module named UTILS

mais quand je lance le code via le terminal bash, il semble bien fonctionner

bash-4.1$ python
>>> import os
>>> os.chdir(r'/home/amourav/Python/')
>>> print os.listdir(os.getcwd())

['UTILS_local.py','UTILS.py', 'proj', 'UTILS.pyc']

>>> from UTILS import *

bla bla -tout va bien - blah blah

Je suis en cours d'exécution Python 2.7.10 sur une machine linux

OriginalL'auteur A.Mouraviev | 2017-08-17