Skip to content Skip to sidebar Skip to footer

Importerror: With Error 'is Not A Package'

In python 3 getting into ImportError issues. My project structure is like: cts_sap_polaris/ |-- etc

Solution 1:

Rename cts_sap_polaris.py to something else.

This name conflicts with the package name (which has the same name).

(credit goes to @jedwards on his comment)

Solution 2:

From what i understand, python only searches the current directory and sys.path. So you can add to the python path at run time. A similar question has been answered here

I would suggest you to try this ..

# scripts/cts_sap_polaris.py# Add additional path to current sys pathimport sys
sys.path.insert(0,'/path/to/cts_sap_polaris/lib')
import cli_check

Let me know if it works.

Post a Comment for "Importerror: With Error 'is Not A Package'"