Re: importError: Count Not import Django inside Virtualenv
Hi Etienne, I prefer messing with standard distutils/setuptools commands to avoid situations like this... ;-) Messing and restoring system libs is a matter of personnal taste 😃 Eric From: Etienne Robillard Sent: Wednesday, February 14, 2018 11:07:07 AM To: PASCUAL Eric Cc: django-users@googlegroups.com Subject: Re: importError: Count Not import Django inside Virtualenv Hi Eric, Le 2018-02-14 à 03:44, PASCUAL Eric a écrit : Hi, Hard to say without knowing the exact context, but my gut feeling is that you've modified a system wide library at a moment (maybe inadvertently). My own experience is that it's easy to mess with Python libraries when installing packages with sudo , which may happen form time to time when working with virtualenv (or pyenv) since not very long, and being caught up by old habits (they tend to survive longer that wanted 😊). I prefer messing with standard distutils/setuptools commands to avoid situations like this... ;-) Cheers, Etienne From: django-users@googlegroups.com<mailto:django-users@googlegroups.com> <mailto:django-users@googlegroups.com> on behalf of tango ward <mailto:tangowar...@gmail.com> Sent: Wednesday, February 14, 2018 3:40:04 AM To: django-users@googlegroups.com<mailto:django-users@googlegroups.com> Subject: Re: importError: Count Not import Django inside Virtualenv Hi Eric, I tried what you suggested and it works! I was just wondering why my existing pet projects have the same problem? On Wed, Feb 14, 2018 at 10:13 AM, tango ward mailto:tangowar...@gmail.com>> wrote: Hi, The error message that I am getting is: Traceback (most recent call last): File "manage.py", line 8, in from django.core.management import execute_from_command_line ModuleNotFoundError: No module named 'django' The above exception was the direct cause of the following exception: Traceback (most recent call last): File "manage.py", line 14, in ) from exc 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? @Jason, It's weird because couple of days, I can still run these pet projects without any error. If I go to venv folder virtual/lib/python3.6/site-packages, I can see django there. It seems that even though virtualenv is activated, the packages I installed inside it are not recognized by the system. On Wed, Feb 14, 2018 at 5:38 AM, PASCUAL Eric mailto:eric.pasc...@cstb.fr>> wrote: Hi Jarvis, Can you provide the error messages trace ? It can greatly help understanding what's happening. If you haven't already done this, try to restart from a fresh new virtualenv inside which you'll install Django and the additional packages you've added (if any). Then restore a copy of your project in this context (if by chance you work with git, a simple git clone will do the trick) and test your app again. Hoping you haven't already messed your system Python by installing stuff in sudo mode. The situation could be a little more complicated then. Best. Eric From: django-users@googlegroups.com<mailto:django-users@googlegroups.com> mailto:django-users@googlegroups.com>> on behalf of tango ward mailto:tangowar...@gmail.com>> Sent: Tuesday, February 13, 2018 9:43:45 PM To: django-users@googlegroups.com<mailto:django-users@googlegroups.com> Subject: importError: Count Not import Django inside Virtualenv Hi, I want to seek some advice about the error. All of my pet projects in my desktop are getting the same error even though virtualenv is activated. I can confirm that when I started playing around with the projects, I have installed Django inside virtualenv without using "sudo". Now, I can't run python manage.py runserver and the packages that I am getting whenever I run pip freeze are different from before which doesn't include Django in the list. Any advice pls? Thanks, Jarvis -- 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+unsubscr...@googlegroups.com<mailto:django-users+unsubscr...@googlegroups.com>. To post to this group, send email to django-users@googlegroups.com<mailto:django-users@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/CAA6wQLKp3oz-6FfDzQ%3Dip4XRsuLPSeOCuwkbUuWbe1JNx2YhFA%40mail.gmail.com<https://groups.google.com/d/msgid/django-users/CAA6wQLKp3oz-6FfDzQ%3Dip4XRsuLPSeOCuwkbUuWbe1JNx2YhFA%40mail.gmail.com?utm_medium=email&utm_source=footer>
Re: importError: Count Not import Django inside Virtualenv
Hi, The copy/paste of the project tree will work of course. Chances are that unwanted files can be brought too, but this should not be a problem in a first stage. I have used rsync or tar archives to deploy Django projects in some cases, and it worked fine. Eric From: django-users@googlegroups.com on behalf of tango ward Sent: Wednesday, February 14, 2018 10:09:51 AM To: django-users@googlegroups.com Subject: Re: importError: Count Not import Django inside Virtualenv that's odd. Whenever I test a pacakge, it's always installed first in virtualenv. Maybe when I updated my system? Btw, I have some projects which are not yet in github, can I just copy and paste them in a new folder with new virtualenv? On Wed, Feb 14, 2018 at 4:44 PM, PASCUAL Eric mailto:eric.pasc...@cstb.fr>> wrote: Hi, Hard to say without knowing the exact context, but my gut feeling is that you've modified a system wide library at a moment (maybe inadvertently). My own experience is that it's easy to mess with Python libraries when installing packages with sudo , which may happen form time to time when working with virtualenv (or pyenv) since not very long, and being caught up by old habits (they tend to survive longer that wanted 😊). Even if far less harmful, then --user option is to avoid for projects related libs, for the same reasons. Eric From: django-users@googlegroups.com<mailto:django-users@googlegroups.com> mailto:django-users@googlegroups.com>> on behalf of tango ward mailto:tangowar...@gmail.com>> Sent: Wednesday, February 14, 2018 3:40:04 AM To: django-users@googlegroups.com<mailto:django-users@googlegroups.com> Subject: Re: importError: Count Not import Django inside Virtualenv Hi Eric, I tried what you suggested and it works! I was just wondering why my existing pet projects have the same problem? On Wed, Feb 14, 2018 at 10:13 AM, tango ward mailto:tangowar...@gmail.com>> wrote: Hi, The error message that I am getting is: Traceback (most recent call last): File "manage.py", line 8, in from django.core.management import execute_from_command_line ModuleNotFoundError: No module named 'django' The above exception was the direct cause of the following exception: Traceback (most recent call last): File "manage.py", line 14, in ) from exc 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? @Jason, It's weird because couple of days, I can still run these pet projects without any error. If I go to venv folder virtual/lib/python3.6/site-packages, I can see django there. It seems that even though virtualenv is activated, the packages I installed inside it are not recognized by the system. On Wed, Feb 14, 2018 at 5:38 AM, PASCUAL Eric mailto:eric.pasc...@cstb.fr>> wrote: Hi Jarvis, Can you provide the error messages trace ? It can greatly help understanding what's happening. If you haven't already done this, try to restart from a fresh new virtualenv inside which you'll install Django and the additional packages you've added (if any). Then restore a copy of your project in this context (if by chance you work with git, a simple git clone will do the trick) and test your app again. Hoping you haven't already messed your system Python by installing stuff in sudo mode. The situation could be a little more complicated then. Best. Eric From: django-users@googlegroups.com<mailto:django-users@googlegroups.com> mailto:django-users@googlegroups.com>> on behalf of tango ward mailto:tangowar...@gmail.com>> Sent: Tuesday, February 13, 2018 9:43:45 PM To: django-users@googlegroups.com<mailto:django-users@googlegroups.com> Subject: importError: Count Not import Django inside Virtualenv Hi, I want to seek some advice about the error. All of my pet projects in my desktop are getting the same error even though virtualenv is activated. I can confirm that when I started playing around with the projects, I have installed Django inside virtualenv without using "sudo". Now, I can't run python manage.py runserver and the packages that I am getting whenever I run pip freeze are different from before which doesn't include Django in the list. Any advice pls? Thanks, Jarvis -- 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+unsubscr...@googlegroups.com<mailto:django-users+unsubscr...@googlegroups.com>. To post to this group, send email to django-users@googlegroups.com<mailto:django-user
Re: importError: Count Not import Django inside Virtualenv
Hi Eric, Le 2018-02-14 à 03:44, PASCUAL Eric a écrit : Hi, Hard to say without knowing the exact context, but my gut feeling is that you've modified a system wide library at a moment (maybe inadvertently). My own experience is that it's easy to mess with Python libraries when installing packages with sudo , which may happen form time to time when working with virtualenv (or pyenv) since not very long, and being caught up by old habits (they tend to survive longer that wanted 😊). I prefer messing with standard distutils/setuptools commands to avoid situations like this... ;-) Cheers, Etienne *From:* django-users@googlegroups.com on behalf of tango ward *Sent:* Wednesday, February 14, 2018 3:40:04 AM *To:* django-users@googlegroups.com *Subject:* Re: importError: Count Not import Django inside Virtualenv Hi Eric, I tried what you suggested and it works! I was just wondering why my existing pet projects have the same problem? On Wed, Feb 14, 2018 at 10:13 AM, tango ward <mailto:tangowar...@gmail.com>> wrote: Hi, The error message that I am getting is: Traceback (most recent call last):  File "manage.py", line 8, in    from django.core.management import execute_from_command_line ModuleNotFoundError: No module named 'django' The above exception was the direct cause of the following exception: Traceback (most recent call last):  File "manage.py", line 14, in    ) from exc 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? @Jason, It's weird because couple of days, I can still run these pet projects without any error. If I go to venv folder virtual/lib/python3.6/site-packages, I can see django there. It seems that even though virtualenv is activated, the packages I installed inside it are not recognized by the system. On Wed, Feb 14, 2018 at 5:38 AM, PASCUAL Eric mailto:eric.pasc...@cstb.fr>> wrote: Hi Jarvis, Can you provide the error messages trace ? It can greatly help understanding what's happening. If you haven't already done this, try to restart from a fresh new virtualenv inside which you'll install Django and the additional packages you've added (if any). Then restore a copy of your project in this context (if by chance you work with git, a simple git clone will do the trick) and test your app again. Hoping you haven't already messed your system Python by installing stuff in sudo mode. The situation could be a little more complicated then. Best. Eric *From:* django-users@googlegroups.com <mailto:django-users@googlegroups.com> mailto:django-users@googlegroups.com>> on behalf of tango ward mailto:tangowar...@gmail.com>> *Sent:* Tuesday, February 13, 2018 9:43:45 PM *To:* django-users@googlegroups.com <mailto:django-users@googlegroups.com> *Subject:* importError: Count Not import Django inside Virtualenv Hi, I want to seek some advice about the error. All of my pet projects in my desktop are getting the same error even though virtualenv is activated. I can confirm that when I started playing around with the projects, I have installed Django inside virtualenv without using "sudo". Now, I can't run python manage.py runserver and the packages that I am getting whenever I run pip freeze are different from before which doesn't include Django in the list. Any advice pls? Thanks, Jarvis -- 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+unsubscr...@googlegroups.com <mailto:django-users+unsubscr...@googlegroups.com>. To post to this group, send email to django-users@googlegroups.com <mailto:django-users@googlegroups.com>. Visit this group at https://groups.google.com/group/django-users <https://groups.google.com/group/django-users>. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAA6wQLKp3oz-6FfDzQ%3Dip4XRsuLPSeOCuwkbUuWbe1JNx2YhFA%40mail.gmail.com <https://groups.google.com/d/msgid/django-users/CAA6wQLKp3oz-6FfDzQ%3Dip4XRsuLPSeOCuwkbUuWbe1JNx
Re: importError: Count Not import Django inside Virtualenv
that's odd. Whenever I test a pacakge, it's always installed first in virtualenv. Maybe when I updated my system? Btw, I have some projects which are not yet in github, can I just copy and paste them in a new folder with new virtualenv? On Wed, Feb 14, 2018 at 4:44 PM, PASCUAL Eric wrote: > Hi, > > > Hard to say without knowing the exact context, but my gut feeling is that > you've modified a system wide library at a moment (maybe inadvertently). > > > My own experience is that it's easy to mess with Python libraries when > installing packages with sudo , which may happen form time to time > when working with virtualenv (or pyenv) since not very long, and being > caught up by old habits (they tend to survive longer that wanted 😊). > > > Even if far less harmful, then --user option is to avoid for projects > related libs, for the same reasons. > > > Eric > -- > *From:* django-users@googlegroups.com on > behalf of tango ward > *Sent:* Wednesday, February 14, 2018 3:40:04 AM > *To:* django-users@googlegroups.com > *Subject:* Re: importError: Count Not import Django inside Virtualenv > > Hi Eric, > > > I tried what you suggested and it works! I was just wondering why my > existing pet projects have the same problem? > > On Wed, Feb 14, 2018 at 10:13 AM, tango ward > wrote: > > Hi, > > The error message that I am getting is: > > Traceback (most recent call last): > File "manage.py", line 8, in > from django.core.management import execute_from_command_line > ModuleNotFoundError: No module named 'django' > > The above exception was the direct cause of the following exception: > > Traceback (most recent call last): > File "manage.py", line 14, in > ) from exc > 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? > > > @Jason, > > It's weird because couple of days, I can still run these pet projects > without any error. If I go to venv folder virtual/lib/python3.6/site-packages, > I can see django there. It seems that even though virtualenv is activated, > the packages I installed inside it are not recognized by the system. > > > On Wed, Feb 14, 2018 at 5:38 AM, PASCUAL Eric > wrote: > > Hi Jarvis, > > > Can you provide the error messages trace ? It can greatly help > understanding what's happening. > > > If you haven't already done this, try to restart from a fresh new > virtualenv inside which you'll install Django and the additional packages > you've added (if any). Then restore a copy of your project in this context > (if by chance you work with git, a simple git clone will do the trick) and > test your app again. > > > Hoping you haven't already messed your system Python by installing stuff > in sudo mode. The situation could be a little more complicated then. > > > Best. > > > Eric > -- > *From:* django-users@googlegroups.com on > behalf of tango ward > *Sent:* Tuesday, February 13, 2018 9:43:45 PM > *To:* django-users@googlegroups.com > *Subject:* importError: Count Not import Django inside Virtualenv > > Hi, > > I want to seek some advice about the error. All of my pet projects in my > desktop are getting the same error even though virtualenv is activated. I > can confirm that when I started playing around with the projects, I have > installed Django inside virtualenv without using "sudo". Now, I can't run > python manage.py runserver and the packages that I am getting whenever I > run pip freeze are different from before which doesn't include Django in > the list. > > > Any advice pls? > > > Thanks, > Jarvis > > -- > 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+unsubscr...@googlegroups.com. > To post to this group, send email to django-users@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/ms > gid/django-users/CAA6wQLKp3oz-6FfDzQ%3Dip4XRsuLPSeOCuwkbUuWb > e1JNx2YhFA%40mail.gmail.com > <https://groups.google.com/d/msgid/django-users/CAA6wQLKp3oz-6FfDzQ%3Dip4XRsuLPSeOCuwkbUuWbe1JNx2YhFA%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > > -- > You received this message because
Re: importError: Count Not import Django inside Virtualenv
Hi, Hard to say without knowing the exact context, but my gut feeling is that you've modified a system wide library at a moment (maybe inadvertently). My own experience is that it's easy to mess with Python libraries when installing packages with sudo , which may happen form time to time when working with virtualenv (or pyenv) since not very long, and being caught up by old habits (they tend to survive longer that wanted 😊). Even if far less harmful, then --user option is to avoid for projects related libs, for the same reasons. Eric From: django-users@googlegroups.com on behalf of tango ward Sent: Wednesday, February 14, 2018 3:40:04 AM To: django-users@googlegroups.com Subject: Re: importError: Count Not import Django inside Virtualenv Hi Eric, I tried what you suggested and it works! I was just wondering why my existing pet projects have the same problem? On Wed, Feb 14, 2018 at 10:13 AM, tango ward mailto:tangowar...@gmail.com>> wrote: Hi, The error message that I am getting is: Traceback (most recent call last): File "manage.py", line 8, in from django.core.management import execute_from_command_line ModuleNotFoundError: No module named 'django' The above exception was the direct cause of the following exception: Traceback (most recent call last): File "manage.py", line 14, in ) from exc 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? @Jason, It's weird because couple of days, I can still run these pet projects without any error. If I go to venv folder virtual/lib/python3.6/site-packages, I can see django there. It seems that even though virtualenv is activated, the packages I installed inside it are not recognized by the system. On Wed, Feb 14, 2018 at 5:38 AM, PASCUAL Eric mailto:eric.pasc...@cstb.fr>> wrote: Hi Jarvis, Can you provide the error messages trace ? It can greatly help understanding what's happening. If you haven't already done this, try to restart from a fresh new virtualenv inside which you'll install Django and the additional packages you've added (if any). Then restore a copy of your project in this context (if by chance you work with git, a simple git clone will do the trick) and test your app again. Hoping you haven't already messed your system Python by installing stuff in sudo mode. The situation could be a little more complicated then. Best. Eric From: django-users@googlegroups.com<mailto:django-users@googlegroups.com> mailto:django-users@googlegroups.com>> on behalf of tango ward mailto:tangowar...@gmail.com>> Sent: Tuesday, February 13, 2018 9:43:45 PM To: django-users@googlegroups.com<mailto:django-users@googlegroups.com> Subject: importError: Count Not import Django inside Virtualenv Hi, I want to seek some advice about the error. All of my pet projects in my desktop are getting the same error even though virtualenv is activated. I can confirm that when I started playing around with the projects, I have installed Django inside virtualenv without using "sudo". Now, I can't run python manage.py runserver and the packages that I am getting whenever I run pip freeze are different from before which doesn't include Django in the list. Any advice pls? Thanks, Jarvis -- 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+unsubscr...@googlegroups.com<mailto:django-users+unsubscr...@googlegroups.com>. To post to this group, send email to django-users@googlegroups.com<mailto:django-users@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/CAA6wQLKp3oz-6FfDzQ%3Dip4XRsuLPSeOCuwkbUuWbe1JNx2YhFA%40mail.gmail.com<https://groups.google.com/d/msgid/django-users/CAA6wQLKp3oz-6FfDzQ%3Dip4XRsuLPSeOCuwkbUuWbe1JNx2YhFA%40mail.gmail.com?utm_medium=email&utm_source=footer>. For more options, visit https://groups.google.com/d/optout. -- 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+unsubscr...@googlegroups.com<mailto:django-users+unsubscr...@googlegroups.com>. To post to this group, send email to django-users@googlegroups.com<mailto:django-users@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/AM5P193MB0083C66
Re: importError: Count Not import Django inside Virtualenv
Hi Eric, I tried what you suggested and it works! I was just wondering why my existing pet projects have the same problem? On Wed, Feb 14, 2018 at 10:13 AM, tango ward wrote: > Hi, > > The error message that I am getting is: > > Traceback (most recent call last): > File "manage.py", line 8, in > from django.core.management import execute_from_command_line > ModuleNotFoundError: No module named 'django' > > The above exception was the direct cause of the following exception: > > Traceback (most recent call last): > File "manage.py", line 14, in > ) from exc > 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? > > > @Jason, > > It's weird because couple of days, I can still run these pet projects > without any error. If I go to venv folder virtual/lib/python3.6/site-packages, > I can see django there. It seems that even though virtualenv is activated, > the packages I installed inside it are not recognized by the system. > > > On Wed, Feb 14, 2018 at 5:38 AM, PASCUAL Eric > wrote: > >> Hi Jarvis, >> >> >> Can you provide the error messages trace ? It can greatly help >> understanding what's happening. >> >> >> If you haven't already done this, try to restart from a fresh new >> virtualenv inside which you'll install Django and the additional packages >> you've added (if any). Then restore a copy of your project in this context >> (if by chance you work with git, a simple git clone will do the trick) and >> test your app again. >> >> >> Hoping you haven't already messed your system Python by installing stuff >> in sudo mode. The situation could be a little more complicated then. >> >> >> Best. >> >> >> Eric >> -- >> *From:* django-users@googlegroups.com on >> behalf of tango ward >> *Sent:* Tuesday, February 13, 2018 9:43:45 PM >> *To:* django-users@googlegroups.com >> *Subject:* importError: Count Not import Django inside Virtualenv >> >> Hi, >> >> I want to seek some advice about the error. All of my pet projects in my >> desktop are getting the same error even though virtualenv is activated. I >> can confirm that when I started playing around with the projects, I have >> installed Django inside virtualenv without using "sudo". Now, I can't run >> python manage.py runserver and the packages that I am getting whenever I >> run pip freeze are different from before which doesn't include Django in >> the list. >> >> >> Any advice pls? >> >> >> Thanks, >> Jarvis >> >> -- >> 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+unsubscr...@googlegroups.com. >> To post to this group, send email to django-users@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/ms >> gid/django-users/CAA6wQLKp3oz-6FfDzQ%3Dip4XRsuLPSeOCuwkbUuWb >> e1JNx2YhFA%40mail.gmail.com >> <https://groups.google.com/d/msgid/django-users/CAA6wQLKp3oz-6FfDzQ%3Dip4XRsuLPSeOCuwkbUuWbe1JNx2YhFA%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> >> -- >> 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+unsubscr...@googlegroups.com. >> To post to this group, send email to django-users@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/ms >> gid/django-users/AM5P193MB0083C66FCD689270720750708CF60% >> 40AM5P193MB0083.EURP193.PROD.OUTLOOK.COM >> <https://groups.google.com/d/msgid/django-users/AM5P193MB0083C66FCD689270720750708CF60%40AM5P193MB0083.EURP193.PROD.OUTLOOK.COM?utm_medium=email&utm_source=footer> >> . >> >> For more options, visit https://groups.google.com/d/optout. >> > > -- 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+unsubscr...@googlegroups.com. To post to this group, send email to django-users@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/CAA6wQLJCkd0B-0ep8jrUFk1QUp%3D_jQ_AuundhzBMwOSYf7h4fg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: importError: Count Not import Django inside Virtualenv
Hi, The error message that I am getting is: Traceback (most recent call last): File "manage.py", line 8, in from django.core.management import execute_from_command_line ModuleNotFoundError: No module named 'django' The above exception was the direct cause of the following exception: Traceback (most recent call last): File "manage.py", line 14, in ) from exc 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? @Jason, It's weird because couple of days, I can still run these pet projects without any error. If I go to venv folder virtual/lib/python3.6/site-packages, I can see django there. It seems that even though virtualenv is activated, the packages I installed inside it are not recognized by the system. On Wed, Feb 14, 2018 at 5:38 AM, PASCUAL Eric wrote: > Hi Jarvis, > > > Can you provide the error messages trace ? It can greatly help > understanding what's happening. > > > If you haven't already done this, try to restart from a fresh new > virtualenv inside which you'll install Django and the additional packages > you've added (if any). Then restore a copy of your project in this context > (if by chance you work with git, a simple git clone will do the trick) and > test your app again. > > > Hoping you haven't already messed your system Python by installing stuff > in sudo mode. The situation could be a little more complicated then. > > > Best. > > > Eric > -- > *From:* django-users@googlegroups.com on > behalf of tango ward > *Sent:* Tuesday, February 13, 2018 9:43:45 PM > *To:* django-users@googlegroups.com > *Subject:* importError: Count Not import Django inside Virtualenv > > Hi, > > I want to seek some advice about the error. All of my pet projects in my > desktop are getting the same error even though virtualenv is activated. I > can confirm that when I started playing around with the projects, I have > installed Django inside virtualenv without using "sudo". Now, I can't run > python manage.py runserver and the packages that I am getting whenever I > run pip freeze are different from before which doesn't include Django in > the list. > > > Any advice pls? > > > Thanks, > Jarvis > > -- > 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+unsubscr...@googlegroups.com. > To post to this group, send email to django-users@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/CAA6wQLKp3oz-6FfDzQ%3Dip4XRsuLPSeOCuwkbUuWbe1JNx2Y > hFA%40mail.gmail.com > <https://groups.google.com/d/msgid/django-users/CAA6wQLKp3oz-6FfDzQ%3Dip4XRsuLPSeOCuwkbUuWbe1JNx2YhFA%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > > -- > 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+unsubscr...@googlegroups.com. > To post to this group, send email to django-users@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/AM5P193MB0083C66FCD689270720750708CF60%40AM5P193MB0083. > EURP193.PROD.OUTLOOK.COM > <https://groups.google.com/d/msgid/django-users/AM5P193MB0083C66FCD689270720750708CF60%40AM5P193MB0083.EURP193.PROD.OUTLOOK.COM?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- 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+unsubscr...@googlegroups.com. To post to this group, send email to django-users@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/CAA6wQLLZyeuQiFL6fe4HvC4a6ogZnTh7kGrc62ni95aPggChyA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: importError: Count Not import Django inside Virtualenv
Hi Jarvis, Can you provide the error messages trace ? It can greatly help understanding what's happening. If you haven't already done this, try to restart from a fresh new virtualenv inside which you'll install Django and the additional packages you've added (if any). Then restore a copy of your project in this context (if by chance you work with git, a simple git clone will do the trick) and test your app again. Hoping you haven't already messed your system Python by installing stuff in sudo mode. The situation could be a little more complicated then. Best. Eric From: django-users@googlegroups.com on behalf of tango ward Sent: Tuesday, February 13, 2018 9:43:45 PM To: django-users@googlegroups.com Subject: importError: Count Not import Django inside Virtualenv Hi, I want to seek some advice about the error. All of my pet projects in my desktop are getting the same error even though virtualenv is activated. I can confirm that when I started playing around with the projects, I have installed Django inside virtualenv without using "sudo". Now, I can't run python manage.py runserver and the packages that I am getting whenever I run pip freeze are different from before which doesn't include Django in the list. Any advice pls? Thanks, Jarvis -- 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+unsubscr...@googlegroups.com<mailto:django-users+unsubscr...@googlegroups.com>. To post to this group, send email to django-users@googlegroups.com<mailto:django-users@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/CAA6wQLKp3oz-6FfDzQ%3Dip4XRsuLPSeOCuwkbUuWbe1JNx2YhFA%40mail.gmail.com<https://groups.google.com/d/msgid/django-users/CAA6wQLKp3oz-6FfDzQ%3Dip4XRsuLPSeOCuwkbUuWbe1JNx2YhFA%40mail.gmail.com?utm_medium=email&utm_source=footer>. For more options, visit https://groups.google.com/d/optout. -- 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+unsubscr...@googlegroups.com. To post to this group, send email to django-users@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/AM5P193MB0083C66FCD689270720750708CF60%40AM5P193MB0083.EURP193.PROD.OUTLOOK.COM. For more options, visit https://groups.google.com/d/optout.
Re: importError: Count Not import Django inside Virtualenv
if pip freeze doesn't include django in the output, then the django package is not installed in the virtualenv. are you sure the virtualenv was active when you installed django? also, remember that if you installed latest django, eg *pip install django*, it won't install for python2 venvs. On Tuesday, February 13, 2018 at 3:44:42 PM UTC-5, tangoward15 wrote: > > Hi, > > I want to seek some advice about the error. All of my pet projects in my > desktop are getting the same error even though virtualenv is activated. I > can confirm that when I started playing around with the projects, I have > installed Django inside virtualenv without using "sudo". Now, I can't run > python manage.py runserver and the packages that I am getting whenever I > run pip freeze are different from before which doesn't include Django in > the list. > > > Any advice pls? > > > Thanks, > Jarvis > -- 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+unsubscr...@googlegroups.com. To post to this group, send email to django-users@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/9ddf691d-6d16-4fa1-aab0-f534fef445ed%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
importError: Count Not import Django inside Virtualenv
Hi, I want to seek some advice about the error. All of my pet projects in my desktop are getting the same error even though virtualenv is activated. I can confirm that when I started playing around with the projects, I have installed Django inside virtualenv without using "sudo". Now, I can't run python manage.py runserver and the packages that I am getting whenever I run pip freeze are different from before which doesn't include Django in the list. Any advice pls? Thanks, Jarvis -- 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+unsubscr...@googlegroups.com. To post to this group, send email to django-users@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/CAA6wQLKp3oz-6FfDzQ%3Dip4XRsuLPSeOCuwkbUuWbe1JNx2YhFA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.