Module not found

Larry Martell larry.martell at gmail.com
Mon Aug 27 11:27:51 EDT 2018


On Mon, Aug 27, 2018 at 11:20 AM, Sharan Basappa
<sharan.basappa at gmail.com> wrote:
> I am running a program that I got as reference from GitHub.
> I am running on windows OS.
>
> Here is a snippet of the code (initial few lines).
>
> #!/usr/bin/env python
> # -*- coding: utf-8 -*-
> __author__ = 'Shilin He'
>
> import sys
> sys.path.insert(0, 'D:\Projects\Initiatives\machine learning\loglizer-master\loglizer-master\utils\evaluation')
> sys.path.insert(0, 'D:\Projects\Initiatives\machine learning\loglizer-master\loglizer-master\utils\evaluation')
> print sys.path
> import numpy as np
> import math
> from scipy.special import expit
> from numpy import linalg as LA
> from scipy.cluster.hierarchy import linkage
> from scipy.cluster.hierarchy import fcluster
> from scipy.spatial.distance import pdist
> import utils.evaluation as ev
>
> Here is the error:
> D:\Projects\Initiatives\machine learning\loglizer-master\loglizer-master\models\log_clustering.py in <module>()
>      14 from scipy.cluster.hierarchy import fcluster
>      15 from scipy.spatial.distance import pdist
> ---> 16 import utils.evaluation as ev
>      17
>      18
> ImportError: No module named utils.evaluation
>
>
> In the utils directory, I clearly can see evaluation file.
>
> Can someone give some directions?

Is there an __init__.py file in the utils dir?



More information about the Python-list mailing list