I upgraded to Django to 1.8.3, and i hit this error:
from django_nose.runner import *
File "/blah/lib/python2.7/site-packages/django_nose/runner.py", line 22, in <module>
from django.db.backends.creation import BaseDatabaseCreation
ImportError: No module named creation
I looked around for solutions, but could not find any. Is there a way to fix this issue ?
Fyi, i did a
pip install django==1.8.3
Any help would be appreciated.
Maybe upgrading django_nose will work (version 1.4 has Django 1.8 support according to the changelog)
pip install django_nose --upgrade
Change:
from django.db.backends.creation import BaseDatabaseCreation
To:
from django.db.backends.base.creation import BaseDatabaseCreation
Related
Although, there are many similar questions to the one I am asking, but non of them have helped me.
I am trying to store the file into my azure storage blob through directly through my system using Django. can some help me?
Here is the result of pip freeze:
azure-nspkg==3.0.2
azure-servicebus==0.21.1
azure-servicefabric==6.3.0.0
azure-servicemanagement-legacy==0.20.7
azure-storage-blob==1.5.0
azure-storage-common==1.4.2
azure-storage-file==1.4.0
azure-storage-queue==1.4.0
I got the following importerror:
from azure.storage.blob import (
ImportError: cannot import name 'BlobClient' from 'azure.storage.blob'
You can try reinstalling azure-storage-blob.
Unistall: python3 -m pip uninstall azure-storage-blob
Install: python3 -m pip install azure-storage-blob
You can refer to similar bugs: cannot import name 'BlobClient' from 'azure.storage.blob and ImportError: cannot import name 'BlobServiceClient' from 'azure.storage.blob'
I am trying to install and import pytplot, which is a package that can plot IDL save files using python. I have Python 2.7 on Windows 10. If I try importing pytplot, I get an import error saying: ImportError: cannot import name OrderedDict. This question has already been answered here: Getting ImportError: cannot import name OrderedDict.
However, I can't figure out how to complete the first step: downgrade kombu to the 2.5.16 version. I have uninstalled my current version of kombu and I'm trying to use:
"pip install kombu-2.5.16"
This fails and my prompt says that it could not find a version that satisfies this requirement.
Try:
pip install -U kombu==2.5.16
otherwise pip -U kombu==3.5.x
will show you all available versions
I have installed Anacoda Python v2.7 and Gensim v 0.13.0
I am using Spyder as IDE
I have the following simple code:
from gensim import corpora
I got the following error:
from gensim import corpora
File "gensim.py", line 7, in <module>
ImportError: cannot import name corpora
I reinstalled:
- Gensim
- Scipy
- Numpy
but still have the same issue.
I had the same problem, when I named my own script "gensim.py". It was trying to load the modules from itself when importing from gensym.
So, avoid using "gensim.py" as a name of your script.
You might want to refer to this issue. Apparently, Anaconda behaves weirdly: bundling a different version of Numpy at runtime or something. I recommend using pip to install Gensim. Or easy_install Here's a link to help you install it properly.
My issue got resolved by uninstalling then reinstalling gensim using pip
then upgrading it
pip uninstall gensim
pip install gensim
pip install --upgrade gensim
I was working on one django project on my old machine and it was working fine.
Now I am trying to shift my django development environment to new machine (Linux). As a dependency in my project, I am using django-grappelli in it.
I have installed the django-grappelli using following command
sudo pip install --upgrade django-grappelli
It is installed successfully, but now I am trying to run my application and it is giving me following error.
File "/usr/local/lib/python2.7/dist-packages/grappelli/dashboard/__init__.py", line 1, in <module>
from grappelli.dashboard.dashboards import * File "/usr/local/lib/python2.7/dist-packages/grappelli/dashboard/dashboards.py", line 13, in <module>
from grappelli.dashboard import modules File "/usr/local/lib/python2.7/dist-packages/grappelli/dashboard/modules.py", line 11, in <module>
from django.apps import apps as django_apps ImportError: No module named apps
I have search around and tried many suggestions, but didn't work. If I am uninstalling the grappelli, It is goving me error for
No module named grappelli
Can anyone suggest where am I doing mistake?
Django version is 1.6
I have tried different things based on my older setup in which all is working fine.
Downgrading the grappelli to version 2.5.3 worked form me. It was not working with 2.6.1 (latest varsion). Not very sure about if is this the issue with 2.6.1 grappelli version or is there any prerequisite for it.
I have uninstalled the 2.6.1 and installed 2.5.3 grappelli, and it resolved my issue.
The problem isn't with grapelli, that is being installed correctly. The problem is that django 1.6 does not have the apps folder, or at least your instance of django 1.6 and my instance of django 1.6 (I looked into 1.6.5) both don't have the apps folder.
I'm not sure what you're using the apps namespace for, but that's where the problem is.
django-grappelli 2.6 is not compatible with Django 1.6.
The apps folder was created in 1.7 alpha stage in this commit:
https://github.com/django/django/commit/860c2c8bc5c77194c41464655851379bf512a052
We install virtualenv inside every project in server:
virtualenv env
source env/bin/activate
pip install -r requirements.txt
But I have stil from django.utils.six import with_metaclass ImportError: No module named six
error in syncdb. I have this problem with django-modeltranslation.
Why I have this error? I could import six in python.
Django 1.4 is a very old version. django-modeltranslation clearly relies on a more recent version of Django.