I'm making a simple python app. I don't know if I am doing it correctly or not so please correct me in the comments or if you have an answer for this
Error:
ImportError: No module named 'taskhandler'
and:
ImportError: No module named 'styles' while doing `python3 setup.py test
File Structure:
.
├── MANIFEST.in
├── pydotask.egg-info
│ ├── dependency_links.txt
│ ├── not-zip-safe
│ ├── PKG-INFO
│ ├── SOURCES.txt
│ └── top_level.txt
├── README.md
├── setup.py
├── task_mod
│ ├── __init__.py
│ ├── __pycache__
│ │ ├── __init__.cpython-35.pyc
│ │ ├── pydo.cpython-35.pyc
│ │ └── taskhandler.cpython-35.pyc
│ ├── pydo.py
│ ├── styles
│ │ ├── __init__.py
│ │ ├── __pycache__
│ │ │ ├── __init__.cpython-35.pyc
│ │ │ ├── termcolor.cpython-35.pyc
│ │ │ └── text_style.cpython-35.pyc
│ │ ├── termcolor.py
│ │ └── text_style.py
│ ├── taskhandler.py
│ └── tasks.csv
└── update.txt
5 directories, 22 files
'task_mod/pydo.py':
#!/usr/bin/env python3
''' To Do App in Python '''
import sys, os
import taskhandler as task
from styles import text_style as text
from styles import termcolor
task_mod/taskhandler.py
:
#!/usr/bin/env python3
import sys, os
import csv
from styles import termcolor
from styles import text_style as text
setup.py
from setuptools import setup
def readme():
with open('README.md') as readme:
return readme.read()
setup(
name = 'pydotask',
version = '0.2',
description = 'PyDo is a CLI Application to keep you on track with your tasks and projects',
long_description = readme(),
classifiers = [
'Development Status :: 3 - Alpha',
'Programming Language :: Python :: 3.5',
'Topic :: Office/Business :: Scheduling'
],
keywords = 'utilities office schedule task reminder',
url = '',
author = 'Abhishta Gatya',
author_email = 'abhishtagatya@yahoo.com',
packages = ['task_mod'],
scripts = ['task_mod/pydo'],
python_requires = '>=3',
include_package_data = True,
zip_safe = False
)
How do I get around this problem?
Note: If I run python3 task_mod/pydo.py
it works fine! But when I try testing it it, it gives 2 ImportErrors.