Getting ImportError: cannot import name OrderedDict - python-2.7

I am getting the error
ImportError: cannot import name OrderedDict
while installing a server locally on my ubuntu 14.04 machine.I have tried installing ordereddict manually and also tried upgrading kombu but it is still giving the error.The full traceback is added below-
rishav#Swastik:~/open-event-orga-server$ sudo python create_db.py
Traceback (most recent call last):
File "create_db.py", line 5, in
from app import current_app
File "/home/rishav/open-event-orga-server/app/init.py", line 23, in
from celery import Celery
File "/usr/local/lib/python2.7/dist-packages/celery/init.py", line 133, in
from celery import five # noqa
File "/usr/local/lib/python2.7/dist-packages/celery/five.py", line 153, in
from kombu.utils.compat import OrderedDict # noqa
ImportError: cannot import name OrderedDict

This solved my problem:
Downgraded kombu to 2.5.16.
Reinstalled django-celery
here is log:
(virtualEnv) D:\Project\staging\modone\settings>pip install django-celery
Collecting django-celery
Downloading django_celery-3.2.1-py2-none-any.whl (63kB)
100% |################################| 71kB 83kB/s
Collecting django>=1.8 (from django-celery)
Using cached Django-1.10.5-py2.py3-none-any.whl
Collecting celery<4.0,>=3.1.15 (from django-celery)
Downloading celery-3.1.25-py2.py3-none-any.whl (526kB)
100% |################################| 532kB 122kB/s
Requirement already satisfied: pytz>dev in d:\project\installations\virtualenv\lib\site-packages (from celery<4.0,>=3.1.15->django-celery)
Collecting kombu<3.1,>=3.0.37 (from celery<4.0,>=3.1.15->django-celery)
Using cached kombu-3.0.37-py2.py3-none-any.whl
Collecting billiard<3.4,>=3.3.0.23 (from celery<4.0,>=3.1.15->django-celery)
Downloading billiard-3.3.0.23-cp27-none-win32.whl (102kB)
100% |################################| 102kB 114kB/s
Requirement already satisfied: anyjson>=0.3.3 in d:\project\installations\virtualenv\lib\site-packages (from kombu<3.1,>=3.0.37->celery<4.0,>=3.1.15->
django-celery)
Collecting amqp<2.0,>=1.4.9 (from kombu<3.1,>=3.0.37->celery<4.0,>=3.1.15->django-celery)
Using cached amqp-1.4.9-py2.py3-none-any.whl
Installing collected packages: django, amqp, kombu, billiard, celery, django-celery
Found existing installation: Django 1.4.5
Uninstalling Django-1.4.5:
Successfully uninstalled Django-1.4.5
Found existing installation: amqp 1.0.13
Uninstalling amqp-1.0.13:
Successfully uninstalled amqp-1.0.13
Found existing installation: kombu 2.5.16
Uninstalling kombu-2.5.16:
Successfully uninstalled kombu-2.5.16
Found existing installation: billiard 2.7.3.28
Uninstalling billiard-2.7.3.28:
Successfully uninstalled billiard-2.7.3.28
Found existing installation: celery 3.0.18
Uninstalling celery-3.0.18:
Successfully uninstalled celery-3.0.18
Successfully installed amqp-1.4.9 billiard-3.3.0.23 celery-3.1.25 django-1.10.5 django-celery-3.2.1 kombu-3.0.37

I had this same problem on python 2.7.8 with kombu 4.0.x and I solved it by downgrading kombu to 3.0.x (which was the version I needed).
Didn't have time to investigate the reason of the issue, but this might be related...

The ImportError would also occur, if it is not correctly imported (such as with orderedDict, Ordereddict, or ordereddict):
Method 1
from collections import OrderedDict
d = {'banana': 3, 'apple': 4, 'pear': 1, 'orange': 2}
# dictionary sorted by key
print(OrderedDict(sorted(d.items(), key=lambda t: t[0])))
print(OrderedDict([('apple', 4), ('banana', 3), ('orange', 2), ('pear', 1)]))
Method 2
import collections
d = {'banana': 3, 'apple': 4, 'pear': 1, 'orange': 2}
# dictionary sorted by key
print(collections.OrderedDict(sorted(d.items(), key=lambda t: t[0])))
print(collections.OrderedDict(
[('apple', 4), ('banana', 3), ('orange', 2), ('pear', 1)]))
Output
OrderedDict([('apple', 4), ('banana', 3), ('orange', 2), ('pear', 1)])
OrderedDict([('apple', 4), ('banana', 3), ('orange', 2), ('pear', 1)])
Source
8.3.5.1. OrderedDict Examples and Recipes

Related

Why is statsmodels package not working on Flask but is on ipython?

I am getting this import error from the scipy package. Please see requirements.txt for versions. This is only happening on Flask and not when I run the same code on ipython. Is there any reason why statsmodels doesn't work on flask but would work on ipython?
File "/env/lib/python3.7/site-packages/statsmodels/api.py", line 9, in
from . import regression
File "/env/lib/python3.7/site-packages/statsmodels/regression/init.py", line 1, in
from .linear_model import yule_walker
File "/env/lib/python3.7/site-packages/statsmodels/regression/linear_model.py", line 39, in
from scipy.linalg import toeplitz
File "/env/lib/python3.7/site-packages/scipy/init.py", line 156, in
from . import fft
File "/env/lib/python3.7/site-packages/scipy/fft/init.py", line 81, in
from ._helper import next_fast_len
File "/env/lib/python3.7/site-packages/scipy/fft/_helper.py", line 4, in
from . import _pocketfft
File "/env/lib/python3.7/site-packages/scipy/fft/_pocketfft/init.py", line 3, in
from .basic import *
File "/env/lib/python3.7/site-packages/scipy/fft/_pocketfft/basic.py", line 8, in
from . import pypocketfft as pfft
ImportError: SystemExit: 1
*This happens only in Flask. When i use statsmodels
I'm running it in flask and here are my complete list of packages:
attrs==19.3.0
autopep8==1.5
backcall==0.1.0
bleach==3.1.0
cachetools==4.0.0
cattrs==1.0.0
certifi==2019.11.28
chardet==3.0.4
Click==7.0
cloudstorage==0.10.0
cycler==0.10.0
decorator==4.4.1
defusedxml==0.6.0
entrypoints==0.3
Flask==1.1.1
Flask-Assets==2.0
Flask-CacheBuster==1.0.0
Flask-Cors==3.0.8
Flask-SQLAlchemy==2.4.1
flask-talisman==0.7.0
google-api-core==1.16.0
google-auth==1.11.0
google-cloud==0.34.0
google-cloud-core==1.2.0
google-cloud-storage==1.25.0
google-cloud-tasks==1.3.0
google-resumable-media==0.5.0
googleapis-common-protos==1.51.0
grpc-google-iam-v1==0.12.3
grpcio==1.26.0
idna==2.8
importlib-metadata==1.5.0
inflect==3.0.2
inflection==0.3.1
ipykernel==5.1.4
ipython==7.11.1
ipython-genutils==0.2.0
ipywidgets==7.5.1
itsdangerous==1.1.0
jedi==0.16.0
Jinja2==2.11.0
jsonschema==3.2.0
jupyter==1.0.0
jupyter-client==5.3.4
jupyter-console==6.1.0
jupyter-contrib-core==0.3.3
jupyter-contrib-nbextensions==0.5.1
jupyter-core==4.6.1
jupyter-highlight-selected-word==0.2.0
jupyter-latex-envs==1.4.6
jupyter-nbextensions-configurator==0.4.1
kiwisolver==1.1.0
looker-sdk==0.1.3b6
lxml==4.5.0
MarkupSafe==1.1.1
matplotlib==3.1.2
mistune==0.8.4
natural==0.2.0
nbconvert==5.6.1
nbformat==5.0.4
nltk==3.4.5
notebook==6.0.3
numpy==1.18.1
pandas==0.25.3
pandas-datareader==0.8.1
pandocfilters==1.4.2
parso==0.6.0
patsy==0.5.1
pexpect==4.8.0
pg8000==1.13.2
pickleshare==0.7.5
prometheus-client==0.7.1
prompt-toolkit==3.0.3
protobuf==3.11.2
psycopg2==2.8.4
ptyprocess==0.6.0
pyasn1==0.4.8
pyasn1-modules==0.2.8
pycodestyle==2.5.0
Pygments==2.5.2
pyparsing==2.4.6
pyrsistent==0.15.7
python-dateutil==2.8.1
python-magic==0.4.15
pytz==2019.3
PyYAML==5.3
pyzmq==18.1.1
qtconsole==4.6.0
requests==2.22.0
rsa==4.0
scipy==1.4.1
scramp==1.1.0
seasonal==0.3.1
Send2Trash==1.5.0
simple-salesforce==0.74.3
simplenlg==0.2.0
six==1.14.0
SQLAlchemy==1.3.13
statsmodels==0.11.0
stripe==2.42.0
terminado==0.8.3
testpath==0.4.4
tornado==6.0.3
traitlets==4.3.3
tzlocal==2.0.0
urllib3==1.25.8
wcwidth==0.1.8
webapp2==2.5.2
webassets==2.0
webencodings==0.5.1
Werkzeug==0.16.1
widgetsnbextension==3.5.1
zipp==2.1.0
no error in ipython, but i get an error when i run it in flask
Checkout this issues for more detail.
Turns out that statsmodels is dependent upon several packages being installed before it so that it can key on them to compile its own modules. Although I don't exactly know what causes this particular conflict with flask, I have faced this on python3.7 before and here is what worked for me:
If you need to clean out what you already have, you can uninstall with the following command:
pip3 uninstall statsmodels
Now install Flask
pip3 install Flask
Install the individual dependencies of statmodels first:
pip3 install numpy scipy patsy pandas
Now install statmodels:
pip3 install statsmodels
Important!!!
Make sure you are running a fresh virtual environment. To open a new one in linxux system:
python3 -m venv venv
source venv/bin/activate
Now install the dependencies as instructed above. Let me know if that fixed your problem. If not, you might need a better dependency resolver than pip. Poetry is one of them.
Just restart the server and the problem is solved!

Import sklearn fails - conflict with numpy version?

I'm trying to import sklearn module in the interactive python environment, but I get this error message:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Python/2.7/site-packages/sklearn/__init__.py", line 57, in <module>
from .base import clone
File "/Library/Python/2.7/site-packages/sklearn/base.py", line 11, in <module>
from .utils.fixes import signature
File "/Library/Python/2.7/site-packages/sklearn/utils/__init__.py", line 10, in <module>
from .murmurhash import murmurhash3_32
File "numpy.pxd", line 155, in init sklearn.utils.murmurhash (sklearn/utils/murmurhash.c:5029)
ValueError: numpy.dtype has the wrong size, try recompiling
I read somewhere that this might be a problem derived by the fact that scikit-learn is compiled against an older version of numpy, but I tried to uninstall and reinstall both numpy and scikit-learn (and scipy to be sure) and the problem persists.
These are my python modules:
giacomopoli$ pip freeze
Warning: cannot find svn location for setuptools===0.6c12dev-r88846
altgraph==0.10.1
appnope==0.1.0
attrs==15.2.0
backports-abc==0.4
backports.ssl-match-hostname==3.5.0.1
bdist-mpkg==0.4.4
beautifulsoup4==4.4.1
bonjour-py==0.3
certifi==2016.2.28
cssselect==0.9.1
decorator==4.0.9
functools32==3.2.3.post2
gnureadline==6.3.3
ipykernel==4.3.1
ipython==4.1.2
ipython-genutils==0.1.0
ipywidgets==4.1.1
Jinja2==2.8
jsonschema==2.5.1
jupyter==1.0.0
jupyter-client==4.1.1
jupyter-console==4.1.1
jupyter-core==4.0.6
lxml==3.5.0
macholib==1.5
MarkupSafe==0.23
matplotlib==1.1.1
mistune==0.7.2
modulegraph==0.10.1
nbconvert==4.1.0
nbformat==4.0.1
notebook==4.1.0
numpy==1.10.4
path.py==8.1.2
pexpect==4.0.1
pickleshare==0.6
protobuf==3.0.0b2
ptyprocess==0.5.1
py2app==0.7.1
pyasn1==0.1.9
pyasn1-modules==0.0.8
Pygments==2.1.3
PyInstaller==3.1.1
pyobjc-core==2.3.2a0
pyobjc-framework-AddressBook==2.3.2a0
pyobjc-framework-AppleScriptKit==2.3.2a0
pyobjc-framework-AppleScriptObjC==2.3.2a0
pyobjc-framework-Automator==2.3.2a0
pyobjc-framework-CFNetwork==2.3.2a0
pyobjc-framework-Cocoa==2.3.2a0
pyobjc-framework-Collaboration==2.3.2a0
pyobjc-framework-CoreData==2.3.2a0
pyobjc-framework-CoreLocation==2.3.2a0
pyobjc-framework-CoreText==2.3.2a0
pyobjc-framework-DictionaryServices==2.3.2a0
pyobjc-framework-ExceptionHandling==2.3.2a0
pyobjc-framework-FSEvents==2.3.2a0
pyobjc-framework-InputMethodKit==2.3.2a0
pyobjc-framework-InstallerPlugins==2.3.2a0
pyobjc-framework-InstantMessage==2.3.2a0
pyobjc-framework-InterfaceBuilderKit==2.3.2a0
pyobjc-framework-LatentSemanticMapping==2.3.2a0
pyobjc-framework-LaunchServices==2.3.2a0
pyobjc-framework-Message==2.3.2a0
pyobjc-framework-OpenDirectory==2.3.2a0
pyobjc-framework-PreferencePanes==2.3.2a0
pyobjc-framework-PubSub==2.3.2a0
pyobjc-framework-QTKit==2.3.2a0
pyobjc-framework-Quartz==2.3.2a0
pyobjc-framework-ScreenSaver==2.3.2a0
pyobjc-framework-ScriptingBridge==2.3.2a0
pyobjc-framework-SearchKit==2.3.2a0
pyobjc-framework-ServiceManagement==2.3.2a0
pyobjc-framework-SyncServices==2.3.2a0
pyobjc-framework-SystemConfiguration==2.3.2a0
pyobjc-framework-WebKit==2.3.2a0
pyobjc-framework-XgridFoundation==2.3.2a0
pyOpenSSL==0.13
PyRSS2Gen==1.0.0
python-dateutil==1.5
pytz===2012d
pyzmq==15.2.0
qtconsole==4.2.0
queuelib==1.4.2
scikit-learn==0.17.1
scipy==0.17.0
Scrapy==1.0.5
selenium==2.52.0
service-identity==16.0.0
simplegeneric==0.8.1
singledispatch==3.4.0.3
six==1.10.0
tensorflow==0.7.1
terminado==0.6
tornado==4.3
traitlets==4.1.0
Twisted==12.2.0
w3lib==1.13.0
xattr==0.6.4
zope.interface==3.8.0
I've Python 2.7 and OSX 10.9.5.
What do I have to do in order to get things work?
I figured it out. I had multiple versions of python installed (2.3, 2.5, 2.6, 2.7) and multiple version of Numpy. The one used in the interactive shell was numpy 1.6. I erased them all and installed the new one with numpy and now it works.

twisted critical unhandled error on scrapy tutorial

I'm new in programming and I'm trying to learn scrapy, using scrapy tutorial: http://doc.scrapy.org/en/latest/intro/tutorial.html
So I ran "scrapy crawl dmoz" command and got this error:
2015-07-14 16:11:02 [scrapy] INFO: Scrapy 1.0.1 started (bot: tutorial)
2015-07-14 16:11:02 [scrapy] INFO: Optional features available: ssl, http11
2015-07-14 16:11:02 [scrapy] INFO: Overridden settings: {'NEWSPIDER_MODULE': 'tu
torial.spiders', 'SPIDER_MODULES': ['tutorial.spiders'], 'BOT_NAME': 'tutorial'}
2015-07-14 16:11:05 [scrapy] INFO: Enabled extensions: CloseSpider, TelnetConsol
e, LogStats, CoreStats, SpiderState
Unhandled error in Deferred:
2015-07-14 16:11:06 [twisted] CRITICAL: Unhandled error in Deferred:
2015-07-14 16:11:07 [twisted] CRITICAL:
I'm using windows 7 and python 2.7. Anybody knows what's the problem? How could I fix that?
EDIT: My spider file code is:
# This package will contain the spiders of your Scrapy project
#
# Please refer to the documentation for information on how to create and manage
# your spiders.
import scrapy
class DmozSpider(scrapy.Spider):
name = "dmoz"
allowed_domains = ["dmoz.org"]
start_urls = [
"http://www.dmoz.org/computers/programming/languages/python/books/",
"http://www.dmoz.org/computer/programming/languages/python/resources/"
]
def parse(self, response):
filename = response.url.split("/")[-2] + '.html'
with open(filename,'wb') as f:
f.write(response.body)
items.py code:
import scrapy
class DmozItem(scrapy.Item):
title = scrapy.Field()
link = scrapy.Field()
desc = scrapy.Field()
pip list:
bootstrap-admin (0.3.3)
cffi (1.1.2)
characteristic (14.3.0)
cryptography (0.9.3)
cssselect (0.9.1)
Django (1.7.7)
django-auth-ldap (1.2.4)
django-debug-toolbar (1.3.0)
django-mssql (1.6.2)
django-pyodbc (0.2.6)
django-pyodbc-azure (1.2.2)
django-redator (0.2.3)
django-reversion (1.8.5)
django-summernote (0.6.0)
django-windows-tools (0.1.1)
django-wysiwyg-redactor (0.4.3.2)
enum34 (1.0.4)
ez-setup (0.9)
flup (1.0.2)
idna (2.0)
ipaddress (1.0.13)
iso8601 (0.1.4)
logging (0.4.9.6)
lxml (3.4.4)
mechanize (0.2.5)
MySQL-python (1.2.4)
pbr (0.10.8)
Pillow (2.7.0)
pip (7.1.0)
pyasn1 (0.1.8)
pyasn1-modules (0.0.6)
pycparser (2.14)
pymongo (2.6)
pyodbc (3.0.7)
pyOpenSSL (0.15.1)
pypm (1.4.3)
python-ldap (2.4.18)
pythonselect (1.3)
pywin32 (218.3)
queuelib (1.2.2)
Scrapy (1.0.1)
selenium (2.44.0)
service-identity (14.0.0)
setuptools (18.0.1)
six (1.9.0)
sqlparse (0.1.15)
stevedore (1.3.0)
Twisted (15.2.1)
virtualenv (1.11.6)
virtualenv-clone (0.2.5)
virtualenvwrapper (4.3.2)
virtualenvwrapper-powershell (12.7.8)
w3lib (1.11.0)
xlrd (0.9.2)
zope.interface (4.1.2)
Thx for the attention and sry for my poor English, isn't my native language.
I'm beginning to learn scrapy as well and encounter the same question with yours.
After struggling with it for an afternoon, finally I found it's due to the pywin32 module only download without install.
You can try input the command below in the cmd to finish the pywin32 module install and try crawl again:
python python27\scripts\pywin32_postinstall.py -install
I hope it will help!
The short answer is You are missing pywin32!
The other answers are basically right, but not 100% correct. pywin32 is not a pip install! You must download the installer package from here:
http://sourceforge.net/projects/pywin32/files/pywin32/
Make sure that you get the correct bit: 32 or 64. In my case I didn't realize I had the 32bit version of Python installed on my 64bit machine and the installer fails with "Cannot find Python 2.7 installation in registry". I had to install the 32bit version of pywin32. Once I did this, scrapy crawl site worked.
I dont see what your doing with items as your writing to a file. But its the imports maybe. Try this if this does not work try, pip install pywin --update and pip install Twisted --update, that should reinstall any corrupted files.
Plus I dont know if it's Stack's problem but you had some misplaced identation.
from scrapy.spiders import Spider
from {Projectname}.items import {Itemclass}
import scrapy
class DmozSpider(scrapy.Spider):
name = "dmoz"
allowed_domains = ["dmoz.org"]
start_urls = [
"http://www.dmoz.org/computers/programming/languages/python/books/",
"http://www.dmoz.org/computer/programming/languages/python/resources/"]
def parse(self, response):
filename = response.url.split("/")[-2] + '.html'
with open(filename,'wb') as f:
f.write(response.body)
Scrapy crashes with: ImportError: No module named win32api
You need to install pywin32 because of this Twisted bug.

Installing NodeboxOpenGL on windows

Hello I am trying to install and make use of NodeboxOpenGL, the python library so I can create my own graphs with nodes and edges. But I am running into some trouble,
starting off at NodeBox OpenGL site. I downloaded NodeBox for OpenGL and then pyglet, I then did easy_install nodebox-opengl.
Note I did not do pip install
I installed pyglet from pyglet. So now I am thinking its all ready to go. I did a quick check of my c:\python27\Lib\site-packages\ location just be sure the nodebox folder was there, all seems good.
I tried the sample program that's on the site
from nodebox.graphics import *
from nodebox.graphics.physics import Flock
flock = Flock(40, 0, 0, 500, 500)
flock.sight = 300
def draw(canvas):
background(1)
fill(0, 0.75)
flock.update(cohesion=0.15)
for boid in flock:
push()
translate(boid.x, boid.y)
scale(0.5 + 1.5 * boid.depth)
rotate(boid.heading)
arrow(0, 0, 15)
pop()
canvas.fps = 30
canvas.size = 600, 400
canvas.run(draw)
tried to run it, but i keep getting this error
Traceback (most recent call last):
File "E:\Workspace\ElasticNodes\graph1.py", line 5, in <module>
from nodebox.graphics import *
File "E:\Workspace\ElasticNodes\nodebox\graphics\__init__.py", line 1, in <module>
import bezier
File "E:\Workspace\ElasticNodes\nodebox\graphics\bezier.py", line 10, in <module>
from context import BezierPath, PathElement, PathError, Point, MOVETO, LINETO, CURVETO, CLOSE
File "E:\Workspace\ElasticNodes\nodebox\graphics\context.py", line 29, in <module>
import geometry
File "E:\Workspace\ElasticNodes\nodebox\graphics\geometry.py", line 454, in <module>
from pyglet.gl import \
ImportError: cannot import name pointer
I tried modifying the python script i.e
In your script, add the location of NodeBox to sys.path, before importing it: >>> MODULE = '/users/tom/python/nodebox' >>> import sys; if MODULE not in sys.path: sys.path.append(MODULE) >>> import nodebox
But still the same error.
I am using Python2.7, running on windows. I am not sure what I am doing wrong. Has anyone got any experience with running this library on windows. What am I doing wrong
Maybe this helps you:
In geometry.py del "pointer" import. Replace pointer(data) to POINTER(data)
I also had another error, so maybe you need add import to "shaders.py": from ctypes import c_uint
I am having a similar problem with Linux. The Nodebox-opengl site ( http://www.cityinabottle.org/nodebox/ ) says that python 2.5 or 2.6 must be used, so it is possible that the problem is that you are using 2.7.
EDIT:
Ok, I installed pyglet first, with pip (and or apt-get, I did both) and I don't get a problem with pyglet. But I still do get other problems.

Buildout and django-registration from repository for Django 1.5

I'd like to use Buildout to get django-registration with Django 1.5, and I have a custom user using MyUser(AbstractUser). I used to get it from the recipe v0.8 and it was great. Since, I switched to 1.5, remove my UserProfile and use this custom MyUser.
django-registration no longer work. I've been told I should get it from the repository, and that's what I'm trying to do. I've in the past used mr.developer to get a newer version of django-tastypie, and I tried to reproduce the same with django-registration. I have an error while calling bin/buildout tho. Let's first check the buildout config:
[buildout]
extensions = mr.developer
parts = myquivers
eggs =
django-registration
include-site-packages = false
versions = versions
sources = sources
auto-checkout =
django-registration
[sources]
django-registration = hg https://bitbucket.org/ubernostrum/django-registration
[versions]
django = 1.5
[myquivers]
recipe = djangorecipe
settings = development
eggs = ${buildout:eggs}
project = myquivers
Pretty simple config. It used to work with tastypie like I said, and I'm trying to do the same steps:
- python2.7 bootstrap.py
- bin/buildout
- bin/develop activate django-registration
- bin/develop checkout django-registration
- bin/myquivers syncdb
- bin/myquivers runservser
But it fails at the bin/buildout steps:
$ bin/buildout
Getting distribution for 'mr.developer'.
Got mr.developer 1.25.
mr.developer: Creating missing sources dir /home/damien/Documents/projects/myquivers/src.
mr.developer: Queued 'django-registration' for checkout.
mr.developer: Cloned 'django-registration' with mercurial.
Develop: '/home/damien/Documents/projects/myquivers/src/django-registration'
Traceback (most recent call last):
File "/tmp/tmpzLDggG", line 13, in <module>
exec(compile(open('/home/damien/Documents/projects/myquivers/src/django-registration/setup.py').read(), '/home/damien/Documents/projects/myquivers/src/django-registration/setup.py', 'exec'))
File "/home/damien/Documents/projects/myquivers/src/django-registration/setup.py", line 30, in <module>
version=get_version().replace(' ', '-'),
File "/home/damien/Documents/projects/myquivers/src/django-registration/registration/__init__.py", line 5, in get_version
from django.utils.version import get_version as django_get_version
ImportError: No module named django.utils.version
While:
Installing.
Processing develop directory '/home/damien/Documents/projects/myquivers/src/django-registration'.
An internal error occured due to a bug in either zc.buildout or in a
recipe being used:
Traceback (most recent call last):
File "/home/damien/Documents/projects/myquivers/eggs/zc.buildout-2.1.0-py2.7.egg/zc/buildout/buildout.py", line 1923, in main
getattr(buildout, command)(args)
File "/home/damien/Documents/projects/myquivers/eggs/zc.buildout-2.1.0-py2.7.egg/zc/buildout/buildout.py", line 466, in install
installed_develop_eggs = self._develop()
File "/home/damien/Documents/projects/myquivers/eggs/zc.buildout-2.1.0-py2.7.egg/zc/buildout/buildout.py", line 707, in _develop
zc.buildout.easy_install.develop(setup, dest)
File "/home/damien/Documents/projects/myquivers/eggs/zc.buildout-2.1.0-py2.7.egg/zc/buildout/easy_install.py", line 871, in develop
call_subprocess(args)
File "/home/damien/Documents/projects/myquivers/eggs/zc.buildout-2.1.0-py2.7.egg/zc/buildout/easy_install.py", line 129, in call_subprocess
% repr(args)[1:-1])
Exception: Failed to run command:
'/usr/bin/python2.7', '/tmp/tmpzLDggG', '-q', 'develop', '-mxN', '-d', '/home/damien/Documents/projects/myquivers/develop-eggs/tmpYM_dR9build'
Checking at the error, first Django seems not to be in the system, and that's right, when entering python2.7 and try >>> import django, it fails. But that's normal and that's why I'm using buildout, to not install system-wide Django, just locally for my project.
Any idea how to fix this? Is there a better alternative than taking this repo version? Please let me know, again, custom user/django 1.5/django-registration.
Thanks!