#!/usr/bin/env python
# -*- coding: utf-8 -*-
import io
import os

from setuptools import find_packages, setup

NAME = 'doccano'
DESCRIPTION = 'doccano, text annotation tool for machine learning practitioners'
URL = 'https://github.com/doccano/doccano'
EMAIL = 'hiroki.nakayama.py@gmail.com'
AUTHOR = 'Hironsan'
LICENSE = 'MIT'

here = os.path.abspath(os.path.dirname(__file__))
with io.open(os.path.join(here, 'README.md'), encoding='utf-8') as f:
    long_description = '\n' + f.read()

required = [
    'apache-libcloud>=3.2.0',
    'colour>=0.1.5',
    'conllu>=4.2.2',
    'dj-database-url>=0.5.0',
    'django-cors-headers>=3.5.0',
    'django-filter>=2.4.0',
    'django-rest-polymorphic>=0.1.9',
    'djangorestframework-csv>=2.1.0',
    'djangorestframework-xml>=2.0.0',
    'drf-yasg>=1.20.0',
    'environs>=9.2.0',
    'furl>=2.1.0',
    'pyexcel>=0.6.6',
    'pyexcel-xlsx>=0.6.0',
    'python-jose>=3.2.0',
    'seqeval>=1.2.2',
    'social-auth-app-django>=4.0.0',
    'whitenoise>=5.2.0',
    'auto-labeling-pipeline>=0.1.12'
]

setup(
    name=NAME,
    use_scm_version=True,
    setup_requires=['setuptools_scm'],
    description=DESCRIPTION,
    long_description=long_description,
    long_description_content_type='text/markdown',
    author=AUTHOR,
    author_email=EMAIL,
    url=URL,
    packages=find_packages(exclude=('*.tests',)),
    entry_points={
        'console_scripts': [
            'doccano = app.doccano.doccano:main'
        ]
    },
    install_requires=required,
    extras_require={
        'postgresql': ['psycopg2-binary>=2.8.6'],
        'mssql': ['django-mssql-backend>=2.8.1'],
    },
    include_package_data=True,
    license=LICENSE,
    classifiers=[
        'License :: OSI Approved :: MIT License',
        'Programming Language :: Python',
        'Programming Language :: Python :: 3.6',
        'Programming Language :: Python :: 3.7',
        'Programming Language :: Python :: 3.8',
        'Programming Language :: Python :: Implementation :: CPython',
        'Programming Language :: Python :: Implementation :: PyPy'
    ],
)

setup.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import io
import os

from setuptools import find_packages, setup

NAME = 'doccano'
DESCRIPTION = 'doccano, text annotation tool for machine learning practitioners'
URL = 'https://github.com/doccano/doccano'
EMAIL = 'hiroki.nakayama.py@gmail.com'
AUTHOR = 'Hironsan'
LICENSE = 'MIT'

here = os.path.abspath(os.path.dirname(__file__))
with io.open(os.path.join(here, 'README.md'), encoding='utf-8') as f:
    long_description = '\n' + f.read()

required = [
    'apache-libcloud>=3.2.0',
    'colour>=0.1.5',
    'conllu>=4.2.2',
    'dj-database-url>=0.5.0',
    'django-cors-headers>=3.5.0',
    'django-filter>=2.4.0',
    'django-rest-polymorphic>=0.1.9',
    'djangorestframework-csv>=2.1.0',
    'djangorestframework-xml>=2.0.0',
    'drf-yasg>=1.20.0',
    'environs>=9.2.0',
    'furl>=2.1.0',
    'pyexcel>=0.6.6',
    'pyexcel-xlsx>=0.6.0',
    'python-jose>=3.2.0',
    'seqeval>=1.2.2',
    'social-auth-app-django>=4.0.0',
    'whitenoise>=5.2.0',
    'auto-labeling-pipeline>=0.1.12',
    'dj-rest-auth>=2.1.4'
]

setup(
    name=NAME,
    use_scm_version=True,
    setup_requires=['setuptools_scm'],
    description=DESCRIPTION,
    long_description=long_description,
    long_description_content_type='text/markdown',
    author=AUTHOR,
    author_email=EMAIL,
    url=URL,
    packages=find_packages(exclude=('*.tests',)),
    entry_points={
        'console_scripts': [
            'doccano = app.doccano.doccano:main'
        ]
    },
    install_requires=required,
    extras_require={
        'postgresql': ['psycopg2-binary>=2.8.6'],
        'mssql': ['django-mssql-backend>=2.8.1'],
    },
    include_package_data=True,
    license=LICENSE,
    classifiers=[
        'License :: OSI Approved :: MIT License',
        'Programming Language :: Python',
        'Programming Language :: Python :: 3.6',
        'Programming Language :: Python :: 3.7',
        'Programming Language :: Python :: 3.8',
        'Programming Language :: Python :: Implementation :: CPython',
        'Programming Language :: Python :: Implementation :: PyPy'
    ],
)

setup.py
diff --git a/setup.py b/setup.py
index de5f683cf3..9001f3fff0 100644
--- a/setup.py
+++ b/setup.py
@@ -35,7 +35,8 @@
     'seqeval>=1.2.2',
     'social-auth-app-django>=4.0.0',
     'whitenoise>=5.2.0',
-    'auto-labeling-pipeline>=0.1.12'
+    'auto-labeling-pipeline>=0.1.12',
+    'dj-rest-auth>=2.1.4'
 ]
 
 setup(

ModuleNotFoundError: No module named 'dj_rest_auth'
<!-- Before submitting an issue, make sure to check the docs and closed issues and FAQ to see if any of the solutions work for you. https://github.com/doccano/doccano/wiki/Frequently-Asked-Questions -->

I was using `pip install` to install doccano, which is due to my lack of knowledge about docker. And I run into the following problem:  
(To sum up, module `dj_rest_auth` was not found when setting up database and createing admin user.)

```bash
(pytorch) D:\pythonwork\NLP\grad>doccano 
Setup Database. 
Traceback (most recent call last): 
  File "d:\anaconda3\envs\pytorch\lib\site-packages\app\manage.py", line 15, in <module> 
    execute_from_command_line(sys.argv) 
  File "d:\anaconda3\envs\pytorch\lib\site-packages\django\core\management\__init__.py", line 401, in execute_from_command_line 
    utility.execute() 
  File "d:\anaconda3\envs\pytorch\lib\site-packages\django\core\management\__init__.py", line 377, in execute 
    django.setup() 
  File "d:\anaconda3\envs\pytorch\lib\site-packages\django\__init__.py", line 24, in setup 
    apps.populate(settings.INSTALLED_APPS) 
  File "d:\anaconda3\envs\pytorch\lib\site-packages\django\apps\registry.py", line 91, in populate 
    app_config = AppConfig.create(entry) 
  File "d:\anaconda3\envs\pytorch\lib\site-packages\django\apps\config.py", line 90, in create 
    module = import_module(entry) 
  File "d:\anaconda3\envs\pytorch\lib\importlib\__init__.py", line 127, in import_module 
    return _bootstrap._gcd_import(name[level:], package, level) 
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import 
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load 
  File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked 
ModuleNotFoundError: No module named 'dj_rest_auth' 
Traceback (most recent call last): 
  File "d:\anaconda3\envs\pytorch\lib\site-packages\app\manage.py", line 15, in <module> 
    execute_from_command_line(sys.argv) 
  File "d:\anaconda3\envs\pytorch\lib\site-packages\django\core\management\__init__.py", line 401, in execute_from_command_line 
    utility.execute() 
  File "d:\anaconda3\envs\pytorch\lib\site-packages\django\core\management\__init__.py", line 377, in execute 
    django.setup() 
  File "d:\anaconda3\envs\pytorch\lib\site-packages\django\__init__.py", line 24, in setup 
    apps.populate(settings.INSTALLED_APPS) 
  File "d:\anaconda3\envs\pytorch\lib\site-packages\django\apps\registry.py", line 91, in populate 
    app_config = AppConfig.create(entry) 
  File "d:\anaconda3\envs\pytorch\lib\site-packages\django\apps\config.py", line 90, in create 
    module = import_module(entry) 
  File "d:\anaconda3\envs\pytorch\lib\importlib\__init__.py", line 127, in import_module 
    return _bootstrap._gcd_import(name[level:], package, level) 
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import 
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load 
  File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked 
ModuleNotFoundError: No module named 'dj_rest_auth' 
Traceback (most recent call last): 
  File "d:\anaconda3\envs\pytorch\lib\site-packages\app\manage.py", line 15, in <module> 
    execute_from_command_line(sys.argv) 
  File "d:\anaconda3\envs\pytorch\lib\site-packages\django\core\management\__init__.py", line 401, in execute_from_command_line 
    utility.execute() 
  File "d:\anaconda3\envs\pytorch\lib\site-packages\django\core\management\__init__.py", line 377, in execute 
    django.setup() 
  File "d:\anaconda3\envs\pytorch\lib\site-packages\django\__init__.py", line 24, in setup 
    apps.populate(settings.INSTALLED_APPS) 
  File "d:\anaconda3\envs\pytorch\lib\site-packages\django\apps\registry.py", line 91, in populate 
    app_config = AppConfig.create(entry) 
  File "d:\anaconda3\envs\pytorch\lib\site-packages\django\apps\config.py", line 90, in create 
    module = import_module(entry) 
  File "d:\anaconda3\envs\pytorch\lib\importlib\__init__.py", line 127, in import_module 
    return _bootstrap._gcd_import(name[level:], package, level) 
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import 
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load 
  File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked 
ModuleNotFoundError: No module named 'dj_rest_auth' 
Create admin user. 
Traceback (most recent call last): 
  File "d:\anaconda3\envs\pytorch\lib\site-packages\app\manage.py", line 15, in <module> 
    execute_from_command_line(sys.argv) 
  File "d:\anaconda3\envs\pytorch\lib\site-packages\django\core\management\__init__.py", line 401, in execute_from_command_line 
    utility.execute() 
  File "d:\anaconda3\envs\pytorch\lib\site-packages\django\core\management\__init__.py", line 377, in execute 
    django.setup() 
  File "d:\anaconda3\envs\pytorch\lib\site-packages\django\__init__.py", line 24, in setup 
    apps.populate(settings.INSTALLED_APPS) 
  File "d:\anaconda3\envs\pytorch\lib\site-packages\django\apps\registry.py", line 91, in populate 
    app_config = AppConfig.create(entry) 
  File "d:\anaconda3\envs\pytorch\lib\site-packages\django\apps\config.py", line 90, in create 
    module = import_module(entry) 
  File "d:\anaconda3\envs\pytorch\lib\importlib\__init__.py", line 127, in import_module 
    return _bootstrap._gcd_import(name[level:], package, level) 
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import 
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load 
  File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked 
ModuleNotFoundError: No module named 'dj_rest_auth' 
Starting server with port 8000. 
Exception in thread django-main-thread: 
Traceback (most recent call last): 
  File "d:\anaconda3\envs\pytorch\lib\threading.py", line 926, in _bootstrap_inner 
    self.run() 
  File "d:\anaconda3\envs\pytorch\lib\threading.py", line 870, in run 
    self._target(*self._args, **self._kwargs) 
  File "d:\anaconda3\envs\pytorch\lib\site-packages\django\utils\autoreload.py", line 53, in wrapper 
    fn(*args, **kwargs) 
  File "d:\anaconda3\envs\pytorch\lib\site-packages\django\core\management\commands\runserver.py", line 110, in inner_run 
    autoreload.raise_last_exception() 
  File "d:\anaconda3\envs\pytorch\lib\site-packages\django\utils\autoreload.py", line 76, in raise_last_exception 
    raise _exception[1] 
  File "d:\anaconda3\envs\pytorch\lib\site-packages\django\core\management\__init__.py", line 357, in execute 
    autoreload.check_errors(django.setup)() 
  File "d:\anaconda3\envs\pytorch\lib\site-packages\django\utils\autoreload.py", line 53, in wrapper 
    fn(*args, **kwargs) 
  File "d:\anaconda3\envs\pytorch\lib\site-packages\django\__init__.py", line 24, in setup 
    apps.populate(settings.INSTALLED_APPS) 
  File "d:\anaconda3\envs\pytorch\lib\site-packages\django\apps\registry.py", line 91, in populate 
    app_config = AppConfig.create(entry) 
  File "d:\anaconda3\envs\pytorch\lib\site-packages\django\apps\config.py", line 90, in create 
    module = import_module(entry) 
  File "d:\anaconda3\envs\pytorch\lib\importlib\__init__.py", line 127, in import_module 
    return _bootstrap._gcd_import(name[level:], package, level) 
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import 
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load 
  File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked 
ModuleNotFoundError: No module named 'dj_rest_auth' 
 
Traceback (most recent call last): 
  File "d:\anaconda3\envs\pytorch\lib\site-packages\app\manage.py", line 15, in <module> 
    execute_from_command_line(sys.argv) 
  File "d:\anaconda3\envs\pytorch\lib\site-packages\django\core\management\__init__.py", line 401, in execute_from_command_line 
    utility.execute() 
  File "d:\anaconda3\envs\pytorch\lib\site-packages\django\core\management\__init__.py", line 395, in execute 
    self.fetch_command(subcommand).run_from_argv(self.argv) 
  File "d:\anaconda3\envs\pytorch\lib\site-packages\django\core\management\base.py", line 330, in run_from_argv 
    self.execute(*args, **cmd_options) 
  File "d:\anaconda3\envs\pytorch\lib\site-packages\django\core\management\commands\runserver.py", line 61, in execute 
    super().execute(*args, **options) 
  File "d:\anaconda3\envs\pytorch\lib\site-packages\django\core\management\base.py", line 371, in execute 
    output = self.handle(*args, **options) 
  File "d:\anaconda3\envs\pytorch\lib\site-packages\django\core\management\commands\runserver.py", line 96, in handle 
    self.run(**options) 
  File "d:\anaconda3\envs\pytorch\lib\site-packages\django\core\management\commands\runserver.py", line 103, in run 
    autoreload.run_with_reloader(self.inner_run, **options) 
  File "d:\anaconda3\envs\pytorch\lib\site-packages\django\utils\autoreload.py", line 618, in run_with_reloader 
    start_django(reloader, main_func, *args, **kwargs) 
  File "d:\anaconda3\envs\pytorch\lib\site-packages\django\utils\autoreload.py", line 603, in start_django 
    reloader.run(django_main_thread) 
  File "d:\anaconda3\envs\pytorch\lib\site-packages\django\utils\autoreload.py", line 318, in run 
    self.run_loop() 
  File "d:\anaconda3\envs\pytorch\lib\site-packages\django\utils\autoreload.py", line 324, in run_loop 
    next(ticker) 
  File "d:\anaconda3\envs\pytorch\lib\site-packages\django\utils\autoreload.py", line 364, in tick 
    for filepath, mtime in self.snapshot_files(): 
  File "d:\anaconda3\envs\pytorch\lib\site-packages\django\utils\autoreload.py", line 380, in snapshot_files 
    for file in self.watched_files(): 
  File "d:\anaconda3\envs\pytorch\lib\site-packages\django\utils\autoreload.py", line 278, in watched_files 
    yield from iter_all_python_module_files() 
  File "d:\anaconda3\envs\pytorch\lib\site-packages\django\utils\autoreload.py", line 105, in iter_all_python_module_files 
    return iter_modules_and_files(modules, frozenset(_error_files)) 
  File "d:\anaconda3\envs\pytorch\lib\site-packages\django\utils\autoreload.py", line 141, in iter_modules_and_files 
    resolved_path = path.resolve(strict=True).absolute() 
  File "d:\anaconda3\envs\pytorch\lib\pathlib.py", line 1166, in resolve 
    s = self._flavour.resolve(self, strict=strict) 
  File "d:\anaconda3\envs\pytorch\lib\pathlib.py", line 200, in resolve 
    return self._ext_to_normal(_getfinalpathname(s)) 
OSError: [WinError 123] 文件名、目录名或卷标语法不正确。: '<frozen importlib._bootstrap>'
```
It seemed to be something wrong with `File <frozen importlib._bootstrap>`, but I cannot find the position of it. 

Your Environment
---------
<!-- Include details of your environment.-->
*   Operating System: Windows
*   Python Version Used: 3.7.10
*   When you install doccano: 2021.03.30
*   How did you install doccano (Heroku button etc): pip install

