I get this error while installing Misago the forum. I don't know what's causing since I have Django installed. Please help me anyone.
xxxxx#xxxxx:~/Desktop/newfeed/startupindia$ python manage.py migrate
Traceback (most recent call last):
File "manage.py", line 23, in <module>
execute_from_command_line(sys.argv)
File "/home/xxxxx/.local/lib/python2.7/site-packages/django/core/management/__init__.py", line 350, in execute_from_command_line
utility.execute()
File "/home/xxxxx/.local/lib/python2.7/site-packages/django/core/management/__init__.py", line 324, in execute
django.setup()
File "/home/xxxxx/.local/lib/python2.7/site-packages/django/__init__.py", line 18, in setup
apps.populate(settings.INSTALLED_APPS)
File "/home/xxxxx/.local/lib/python2.7/site-packages/django/apps/registry.py", line 85, in populate
app_config = AppConfig.create(entry)
File "/home/xxxxx/.local/lib/python2.7/site-packages/django/apps/config.py", line 90, in create
module = import_module(entry)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
ImportError: No module named misago
I haven't heard of Misago before, however from the documentations:
Version ~0.5.5 Alpha 1
Misago documentation
Misago is delivered with Vagrant.
Vagrant is a Virtual Machine, and can be started with the vagrant up command from the root directory.
All the required installations will be done with an installation script being executed on the vagrant up command.
Vagrant: What, Why and How?
Version 0.6 Alpha 1
The Misago version 0.6 Alpha 1 from GitHub does not contain vagrant, but is installed with an install script:
Development
To start Misago site locally, first setup and activate virtual environment for it and then fire following commands:
python setup.py install
More about the virtual envirionment.
To test and run the server:
python manage.py migrate
python manage.py createsuperuser
python manage.py runserver
It seems that you didn't set the environment variable. first of type into terminal
virtualenv env
source env/bin/activate
then try pip freeze
if misago is missing here then install misago again.
Related
I am migrating a Django project to production and was going through python manage.py collectstatic phase.
After running this command, I get an error:
ImportError: No module named djangocms_admin_style
However, I clearly have this module installed as both pip list and a manual inspection of the directories shows.
What's more, preceeding this error, there is the following traceback:
File "manage.py", line 10, in
execute_from_command_line(sys.argv) File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py",
line 354, in execute_from_command_line
utility.execute() File "/usr/local/lib/python2.7/site-packages/django/core/management/init.py",
line 328, in execute
django.setup() File "/usr/local/lib/python2.7/site-packages/django/init.py", line 18,
in setup
apps.populate(settings.INSTALLED_APPS) File "/usr/local/lib/python2.7/site-packages/django/apps/registry.py", line
85, in populate
app_config = AppConfig.create(entry) File "/usr/local/lib/python2.7/site-packages/django/apps/config.py", line
86, in create
module = import_module(entry) File "/usr/lib64/python2.7/importlib/__init__.py", line 37, in
import_module
import(name)
What confuses me about the traceback is that there are multiple references to the system-wide Python instead of the one I created within the virtualenv. Why is that? I suspect that this has something to do with the error above.
If it helps, I do not have anything custom (including django_admin_styles) installed in the system Python environment, only within my virtualenv, which is also activated when the commands are run.
Any help is appreciated.
Are you using VSCode by any chance? Along with setting up the environment, you need to reference the correct python executable by setting the "python.pythonPath" setting to the path of the python executable inside your virtual environment.
I'm trying to follow the install tutorial for Django-celery. After installing, I need to run migrate to make the necessary tables, but this error appears:
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/home/guilherme/.virtualenvs/martizi-api/local/lib/python2.7/site-packages/django/core/management/__init__.py",
line 353, in execute_from_command_line
utility.execute()
File "/home/guilherme/.virtualenvs/martizi-api/local/lib/python2.7/site-packages/django/core/management/__init__.py",
line 327, in execute
django.setup()
File "/home/guilherme/.virtualenvs/martizi-api/local/lib/python2.7/site-packages/django/__init__.py",
line 18, in setup
apps.populate(settings.INSTALLED_APPS)
File "/home/guilherme/.virtualenvs/martizi-api/local/lib/python2.7/site-packages/django/apps/registry.py",
line 108, in populate
app_config.import_models(all_models)
File "/home/guilherme/.virtualenvs/martizi-api/local/lib/python2.7/site-packages/django/apps/config.py",
line 202, in import_models
self.models_module = import_module(models_module_name)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/home/guilherme/.virtualenvs/martizi-api/local/lib/python2.7/site-packages/djcelery/models.py",
line 15, in <module>
from celery.utils.timeutils import timedelta_seconds
ImportError: No module named timeutils
I'm not finding anything about this "timeutils" on the Internet...
I'm using Django 1.9.8 and Django-celery 3.1.17.
Please help!
It appears that django-celery==3.1.17 does not work with newer versions of celery (see this github issue).
If it is acceptable to you to use an earlier version of celery, you can uninstall your current version, install a specific older version, and django-celery should work again. For example:
$ pip uninstall celery
$ pip install celery==3.1
should get things working again until django-celery supports a newer version of celery.
For Django==1.9.8
$ pip install django-celery==3.1.17
$ pip uninstall celery
$ pip install celery==3.1.25
a bit late, but this helped me, pip3 did the trick for me, I needed the latest version of django-celery for my project so I put this in my requirements.txt file (at the time of writing this the latest version was django-celery==3.3.1)
celery==
croniter==
django-celery==3.3.1
django-celery-beat==
kombu==
and then run the command
pip3 install -r requirements.txt
which automatically checked for the dependency of the various packages and installed all other packages, I then run pip freeze and got
celery==3.1.26.post2
croniter==1.0.15
django-celery==3.3.1
django-celery-beat==2.0.0
kombu==3.0.37
you can try
pip install --no-deps --ignore-installed django-celery
Worked for me
OSX, Python 2.7, pip, virtualenv. Been using these for years with no issues.
I'm not sure what changed, but recently my environment completely broke for Django after working perfectly fine for a while. The same checkout runs fine on my friend's computer with a similar setup.
Things I've already tried: deleting my venv and creating a new one with fresh installs from requirements.txt, uninstalling logging outside the venv and reinstalling inside, reinstalling pip.
I get the same traceback for any manage.py command. It appears to be having issues with the logging module:
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/Users/rfong/Dropbox/code/lattis_workspace/lattis_repo/venv/lib/python2. 7/site-packages/django/core/management/__init__.py", line 453, in execute_from_command_line
utility.execute()
File "/Users/rfong/Dropbox/code/lattis_workspace/lattis_repo/venv/lib/python2. 7/site-packages/django/core/management/__init__.py", line 376, in execute
sys.stdout.write(self.main_help_text() + '\n')
File "/Users/rfong/Dropbox/code/lattis_workspace/lattis_repo/venv/lib/python2. 7/site-packages/django/core/management/__init__.py", line 242, in main_help_text
for name, app in six.iteritems(get_commands()):
File "/Users/rfong/Dropbox/code/lattis_workspace/lattis_repo/venv/lib/python2. 7/site-packages/django/core/management/__init__.py", line 109, in get_commands
apps = settings.INSTALLED_APPS
File "/Users/rfong/Dropbox/code/lattis_workspace/lattis_repo/venv/lib/python2. 7/site-packages/django/conf/__init__.py", line 52, in __getattr__
self._setup(name)
File "/Users/rfong/Dropbox/code/lattis_workspace/lattis_repo/venv/lib/python2. 7/site-packages/django/conf/__init__.py", line 48, in _setup
self._configure_logging()
File "/Users/rfong/Dropbox/code/lattis_workspace/lattis_repo/venv/lib/python2. 7/site-packages/django/conf/__init__.py", line 75, in _configure_logging
logging_config_func(DEFAULT_LOGGING)
File "/Users/rfong/Dropbox/code/lattis_workspace/lattis_repo/venv/lib/python2. 7/site-packages/django/utils/dictconfig.py", line 555, in dictConfig
dictConfigClass(config).configure()
File "/Users/rfong/Dropbox/code/lattis_workspace/lattis_repo/venv/lib/python2. 7/site-packages/django/utils/dictconfig.py", line 323, in configure
del logging._handlerList[:]
AttributeError: 'module' object has no attribute '_handlerList'
It seems that you installed outdated 0.4.9.6 version of logging module, presumably with pip. Correct version, shipped with python 2.7 is 0.5.1.2, and I suppose in your case might be located in /Library/Python/2.7/lib/logging. Correct version can be uploaded from python svn.
If you use pip, you always can find out which module versions are installed with
$ pip freeze
to ensure that correct versions of packages are installed, use following syntax:
$ pip install <package>==<version>
this will save you lot of pain and efforts, and almost a must on production environments.
I'm trying to get a work project that I git-cloned from work (used in numerous other places, I know the project works fine) to run on my MacBook. I installed Django (via sudo python setup.py install), as well as MySQL, the Python MySQL wrapper, and also virtualenv with virtualenvwrapper.
After creating a virtualenv for my project (virtualenv is created fine), and doing a pip install for the project requirements (all of which install into the proper virtualenv directory), an attempt to do a runserver command spits out the following:
Traceback (most recent call last):
File "manage.py", line 12, in <module>
execute_manager(settings)
File "/Library/Python/2.6/site-packages/django/core/management/__init__.py", line 436, in execute_manager
setup_environ(settings_mod)
File "/Library/Python/2.6/site-packages/django/core/management/__init__.py", line 419, in setup_environ
project_module = import_module(project_name)
File "/Library/Python/2.6/site-packages/django/utils/importlib.py", line 35, in import_module
__import__(name)
ImportError: No module named website-backend
First try to import this library from python or ./manage.py shell.
If that fails import sys and check if your lib is in sys path print sys.path
Hello
I have Ubuntu 10.10 installed. And I wanted to try out Turbogear. I got the installation steps correctly I think. Problems that I have encountered though is in the steps where you create the quickstart example
When I type in the command to create a quickstart example I followed the default values which is example, no, yes. To create the example. At the last steps where I type in paster setup-app development.ini, paster serve development.ini It will complain no module named template.Genshi. I don't get what it means by that. And I couldn't find any answer to this problem on the Internet either. Can it be because Ubuntu got python 2.6.6 installed as standard?
These are the steps I've followed, found on here
$ virtualenv --no-site-packages -p python2.6 tg2env
$ cd tg2env/
$ source bin/activate
(tg2env)$ easy_install -i http://www.turbogears.org/2.1/downloads/current/index tg.devtools
(tg2env)$ paster quickstart example
(tg2env)$ cd example/
(tg2env)$ python setup.py develop
(tg2env)$ nosetests
(tg2env)$ paster setup-app development.ini
(tg2env)$ paster serve development.ini
(tg2env)$ deactivate
And here's the error I get when running paster setup-app development.ini
File "/home/starcorn/tg2env/bin/paster", line 9, in <module>
load_entry_point('PasteScript==1.7.3', 'console_scripts', 'paster')()
File "/home/starcorn/tg2env/lib/python2.6/site-packages/PasteScript-1.7.3-py2.6.egg/paste/script/command.py", line 84, in run
invoke(command, command_name, options, args[1:])
File "/home/starcorn/tg2env/lib/python2.6/site-packages/PasteScript-1.7.3-py2.6.egg/paste/script/command.py", line 123, in invoke
exit_code = runner.run(args)
File "/home/starcorn/tg2env/lib/python2.6/site-packages/PasteScript-1.7.3-py2.6.egg/paste/script/appinstall.py", line 68, in run
return super(AbstractInstallCommand, self).run(new_args)
File "/home/starcorn/tg2env/lib/python2.6/site-packages/PasteScript-1.7.3-py2.6.egg/paste/script/command.py", line 218, in run
result = self.command()
File "/home/starcorn/tg2env/lib/python2.6/site-packages/PasteScript-1.7.3-py2.6.egg/paste/script/appinstall.py", line 456, in command
self, config_file, section, self.sysconfig_install_vars(installer))
File "/home/starcorn/tg2env/lib/python2.6/site-packages/PasteScript-1.7.3-py2.6.egg/paste/script/appinstall.py", line 598, in setup_config
mod.setup_app, command, filename, section, vars)
File "/home/starcorn/tg2env/lib/python2.6/site-packages/PasteScript-1.7.3-py2.6.egg/paste/script/appinstall.py", line 612, in _call_setup_app
func(command, conf, vars)
File "/home/starcorn/tg2env/example/example/websetup/__init__.py", line 17, in setup_app
load_environment(conf.global_conf, conf.local_conf)
File "/home/starcorn/tg2env/lib/python2.6/site-packages/TurboGears2-2.1-py2.6.egg/tg/configuration.py", line 581, in load_environment
setup()
File "/home/starcorn/tg2env/lib/python2.6/site-packages/TurboGears2-2.1-py2.6.egg/tg/configuration.py", line 392, in setup_genshi_renderer
from tg.dottednames.genshi_lookup import GenshiTemplateLoader
File "/home/starcorn/tg2env/lib/python2.6/site-packages/TurboGears2-2.1-py2.6.egg/tg/dottednames/genshi_lookup.py", line 6, in <module>
from genshi.template import TemplateLoader
ImportError: No module named genshi.template
As to why it didn't get installed is an issue for turbogears, but...
$ easy_install Genshi
will fix this.