0

I can run my django project only on my own computer. If i copy all files on another computer and try to run it, I get error. Virtualenv is running successfully, but then i get this message "Couldn't import Django. Are you sure it's installed and available on your PYTHONPATH environment variable? Did you forget to activate a virtual environment?" I tried to install django on other computers too, but it isnt helps. What is wrong?

Project
   .idea
   __pycatch__
   main
   Project
   templates
   venv
   db.sqlite3
   manage
   start

start.bat

@echo off
cmd /k "cd /d C:\Users\[user]\PycharmProjects\Project\venv\Scripts & activate.bat & cd /d C:\Users\[user]\PycharmProject\Project & python manage.py runserver"

manage.py

#!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys


def main():
"""Run administrative tasks."""
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'Project.settings')
try:
    from django.core.management import execute_from_command_line
except ImportError as exc:
    raise ImportError(
        "Couldn't import Django. Are you sure it's installed and "
        "available on your PYTHONPATH environment variable? Did you "
        "forget to activate a virtual environment?"
    ) from exc
execute_from_command_line(sys.argv)


if __name__ == '__main__':
    main()
Demid
  • 11
  • 2
  • Does this answer your question? [ImportError: Couldn't import Django](https://stackoverflow.com/questions/46210934/importerror-couldnt-import-django) – Abdul Aziz Barkat Apr 10 '21 at 14:13

1 Answers1

0

I could solve this problem. If somebody has same problem I replace "python manage.py runserver" with "py -m manage runserver"

Demid
  • 11
  • 2