django 1.11 run error

176 views
Skip to first unread message

ngn zone

unread,
Nov 22, 2017, 11:42:48 AM11/22/17
to Django users
Hello all,

  I am new to Django. I am trying to run a project and when I run "python manage.py makemigrations " I get the following error message. 
What am I doing wrong?


python manage.py makemigrations
Traceback (most recent call last):
  File "manage.py", line 9, in <module>
    dotenv.read_dotenv()
AttributeError: 'module' object has no attribute 'read_dotenv'

mohammad k

unread,
Nov 22, 2017, 4:51:09 PM11/22/17
to django...@googlegroups.com
If you use virtualenv, first of all activate the virtualenv

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/7b296ad6-ef80-4186-a82b-a49345448bee%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

nerdfiles

unread,
Nov 22, 2017, 6:32:51 PM11/22/17
to Django users
pyenv also allows for a .local file to autoload the environment


On Wednesday, November 22, 2017 at 3:51:09 PM UTC-6, k2527806 wrote:
If you use virtualenv, first of all activate the virtualenv
On Nov 22, 2017 8:12 PM, "ngn zone" <ngn...@gmail.com> wrote:
Hello all,

  I am new to Django. I am trying to run a project and when I run "python manage.py makemigrations " I get the following error message. 
What am I doing wrong?


python manage.py makemigrations
Traceback (most recent call last):
  File "manage.py", line 9, in <module>
    dotenv.read_dotenv()
AttributeError: 'module' object has no attribute 'read_dotenv'

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.

ngn zone

unread,
Nov 23, 2017, 12:53:17 AM11/23/17
to Django users
Thanks k2527806 , Actually my virtualenv is activated and all the commands "python manage.py migrate " is run  while it is activated. So I still wonder what might be wrong. Is it the django installation or the virtualenv installation? I  wonder


On Wednesday, November 22, 2017 at 10:51:09 PM UTC+1, k2527806 wrote:
If you use virtualenv, first of all activate the virtualenv
On Nov 22, 2017 8:12 PM, "ngn zone" <ngn...@gmail.com> wrote:
Hello all,

  I am new to Django. I am trying to run a project and when I run "python manage.py makemigrations " I get the following error message. 
What am I doing wrong?


python manage.py makemigrations
Traceback (most recent call last):
  File "manage.py", line 9, in <module>
    dotenv.read_dotenv()
AttributeError: 'module' object has no attribute 'read_dotenv'

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.

Jason

unread,
Nov 23, 2017, 8:43:45 AM11/23/17
to Django users
If this is a new environment with existing source code, did you install all the requirements?  eg, is there a requirements.txt file in the project root, and did you execute pip install -r requirements.txt when the virtual env was activated?

If so, try running pip install python-dotenv

Your error message says it can't find that module, so I suspect the python-dotenv package hasn't been installed to your virtualenv

ngn

unread,
Nov 24, 2017, 4:55:51 AM11/24/17
to django...@googlegroups.com

Thanks Jason, That solved the problem.

I am grateful

--
You received this message because you are subscribed to a topic in the Google Groups "Django users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/django-users/wxSoCYhwDfg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to django-users...@googlegroups.com.

To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
Reply all
Reply to author
Forward
0 new messages