I'm installing Wagtail on Linode Ubuntu 16.04 LTS. I followed the following guides so far:
https://www.linode.com/docs/getting-started
http://docs.wagtail.io/en/v1.9/getting_started/index.html
For the second link, I followed the installation guides for Python, pip, virtualenv and the required Pillow libs.
I got up to the following in the installation process:
$ pip install -r requirements.txt
$ ./manage.py migrate
The migrate command produces the following error:
Traceback (most recent call last):
File "./manage.py", line 10, in <module>
from django.core.management import execute_from_command_line
ImportError: No module named django.core.management
I haven't been able to find a solution for this. I am doing all of this in venv. Any help is greatly appreciated.
That error suggests that Django hasn't been installed.
What is the output of pip install -r requirements.txt?
I solved the issue by re-doing everything. Created new virtualenv, activated, and continued from there. Everything seems to be working correctly so far. Thanks!
Related
The following command was executed in the tests directory inside the development version of django
./runtests.py
Traceback (most recent call last):
File "./runtests.py", line 26, in <module>
from django.test.utils import NullTimeKeeper, TimeKeeper, get_runner
ImportError: cannot import name 'NullTimeKeeper'
I am using python 3.8 and am following the instructions for contributing to django from https://docs.djangoproject.com/en/3.1/intro/contributing/ where I have resolved all errors up to this point. Could someone explain what I would have to do as I already ran
python3.8 -m pip install -r requirements/py3.txt
in my virtual environment that I created using
python3.8 -m venv /path/to/venv
Never mind I found the answer. It is solved by configuring python3 to 3.8 version instead of 3.6 in the following link configuring python and then executing all of this in the virtual environment.
I working in a project that uses python 3.6.9 and django 3.1.1 using it on a virtual enviroment with virtualenv, somerall python in my computer updated to the version 3.8.2 (I think it's because i updated ubuntu to 20.04 version) and somerall changed the virtual enviroment too , and now i can't even run the server.
this is the steps that i do:
source bin/activate
in the folder of my project i do that:
python manage.py runserver
but It keeps given this error:
Traceback (most recent call last):
File "manage.py", line 11, in main
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 22, in <module>
main()
File "manage.py", line 13, in main
raise ImportError(
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?
if I enter this comand on virtual environment:
$ python3 --version
//gives:
Python 3.8.2
to solve this i tried some think's like:
installing python 3.6.9 with requirements.txt
pip install -r requirements.txt
but it didn't localizate the command pip
soo i tried with pip3
pip3 install -r requirements.txt
but it didn't work again..
if I miss some information about the problem please tell me...
I new here!
Error Traceback below.
import django
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named django
If you're installing django on a system level, then try installing via root like this
sudo pip install django
If you're in a virtualenv, then the a simple pip install django would also work.
To know what a virtualenv is, please refer: https://virtualenv.readthedocs.org/en/latest/
I see The read operation timed out - maybe there is problem with server or too many people try to use server at this time. Try to install tomorrow.
If you can download django on local disk as whl file then you can use
pip install downloaded-django-package.whl
btw: it can be problem with pip so you can also try to upgrade pip
pip install --upgrade pip
EDIT:
If you get error with Permission denied then you have to use sudo as #ishaar suggests.
Followed instructions on the github page. Of course, had to make minor changes since I was working with a windows 7 system. I got to the point post creating the virtual environment for portia to run. And I was trying to install the required packages using pip.
pip install -r requirements.txt
It failed with a log.
Now in the shell I try to run twistd, it gives error saying command not found. I even tried as follows:
deostroll#DEOTOP /c/Portia/portia/slyd (master)
$ python ../../portia_env/Scripts/twistd.py -n slyd
Traceback (most recent call last):
File "../../portia_env/Scripts/twistd.py", line 13, in <module>
from twisted.scripts.twistd import run
File "c:\Portia\portia_env\lib\site-packages\twisted\__init__.py", line 53, in
<module>
_checkRequirements()
File "c:\Portia\portia_env\lib\site-packages\twisted\__init__.py", line 37, in
_checkRequirements
raise ImportError(required + ": no module named zope.interface.")
ImportError: Twisted requires zope.interface 3.6.0 or later: no module named zop
e.interface.
(portia_env)
deostroll#DEOTOP /c/Portia/portia/slyd (master)
$
Is there an alternate procedure to follow in order to make this work on windows?
It looks like zope.interface didn't install when you ran:
pip install -r requirements.txt
Could you try running the following and see if it works?
pip install zope.interface
First time here!
And first time with Django also!
I read same issue here on StackOverFlow, e.g: Django:No module named django.core.management but without any result
Purpose:
Install a Django app (based on 1.5.1 on windows 8
I have + tested (e.g: pip --version):
Python 2.7
Pip 1.5.6
Virtualenv 1.11.6
I followed the instructions, and when I run:
python manage.py runserver
P.S:
I created my env,
$ virtualenv --distribute myenv
and activate it using:
source myenv/Scripts/activate
I got this error:
Traceback (most recent call last):
File "manage.py", line 8, in <module>
from django.core.management import execute_from_command_line
ImportError: No module named django.core.management
Any help how to debug the issue?
PPS: Please read the comments bellow!
Regards
You don't have django installed in your virtual environment.
Just do this: pip install django
In your case, to make sure the right one pip is used: env/Scripts/pip install django
Virtual environment is isolated "python + packages folder", so you need to install your packages again, but for this virtual evironment.
It is obvious, because you have exception at 8 line of manage.py, which tries to import special django function to run command-line commands.