Installation errors

9 views
Skip to first unread message

Mac

unread,
Oct 26, 2011, 10:02:54 PM10/26/11
to Satchmo users
Hi,

I downloaded and installed Satchmo using the instructions here,
http://www.satchmoproject.com/docs/dev/new_installation.html

When I run python manage.py satchmo_check, I get the following errors:
malcolm@spring:~/src/store1/store$ python manage.py satchmo_check
Checking your satchmo configuration.
Using Django version 1.3.1
Using Satchmo version 0.9.2-pre hg-unknown
/usr/local/lib/python2.6/dist-packages/django_registration-0.7-
py2.6.egg/registration/models.py:4: DeprecationWarning: the sha module
is deprecated; use the hashlib module instead

The following errors were found:
Registration is not installed.
Sorl imaging library is not installed.
Threaded multihost is not installed.
malcolm@spring:~/src/store1/store$ python
Python 2.6.5 (r265:79063, Apr 16 2010, 13:09:56)
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import registration
>>> import sorl
>>> import threaded_multihost
>>> import django
>>> django.get_version()
'1.3.1'
>>> import satchmo_store
>>> satchmo_store.get_version()
'0.9.2-pre hg-unknown'
>>>

As you can see from the imports above, I think the dependencies have
been properly installed and, the sample store is up and running on the
development server without any issues. I'm using Ubuntu 10.04.3 LTS .

Does anyone know how to fix these errors? Thanks for you help!

scjohn

unread,
Oct 28, 2011, 11:28:08 AM10/28/11
to Satchmo users
Could it be that the dependencies are installed to your global python
instance, but not a virtual environment.

Try:

python manage.py shell

then re-try your imports to see if they still work.

John

Malcolm MacKinnon

unread,
Oct 28, 2011, 1:16:36 PM10/28/11
to satchm...@googlegroups.com
Thanks for responding. I retried my imports in the manage.py shell mode and they all worked. The problem must be due to something else. 


--
You received this message because you are subscribed to the Google Groups "Satchmo users" group.
To post to this group, send email to satchm...@googlegroups.com.
To unsubscribe from this group, send email to satchmo-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/satchmo-users?hl=en.


hynekcer

unread,
Oct 29, 2011, 9:14:21 PM10/29/11
to Satchmo users
I should help you because I am responsible for the actual
"satchmo_check" command. I am surprised by your report.
Please try the following commands:

python manage.py shell
>>> import imp
>>> print imp.find_module('registration', None)
>>> import registration
>>> print registration
>>> from satchmo_store.shop.management.commands.satchmo_check import find_module_extend
>>> print find_module_extend('registration')

What is the output? You can write these details direct to me
eventually.
This is enough for me to identify your (probably unusual) installation
and write a patch for similar cases.

hynek

Malcolm MacKinnon

unread,
Oct 29, 2011, 10:04:43 PM10/29/11
to satchm...@googlegroups.com
Thanks for offering to help. Here is what I get:

>>> import imp
>>> print imp.find_module('registration', None)
Traceback (most recent call last):
  File "<console>", line 1, in <module>
ImportError: No module named registration
>>> import registration
>>> print registration
<module 'registration' from '/usr/local/lib/python2.6/dist-packages/django_registration-0.7-py2.6.egg/registration/__init__.pyc'>
>>> from satchmo_store.shop.management.commands.satchmo_check import find_module_extend
>>> print find_module_extend('registration')
(None, None, None)

hynekcer

unread,
Oct 30, 2011, 2:14:07 PM10/30/11
to Satchmo users
The problem is that you probably have installed all these three
packages as compressed egg, which is problematic with Django.

(The path ...-packages/django_registration-0.7-py2.6.egg/ can be
either .egg directory or compressed .egg archive, but if
imp.find_module('packagename') raises an error this is usually because
it is compressed whereas "inport packagename" works for both)

You can verify one type of the problem by:
cd .../store
$ sudo rm -rf /usr/local/lib/python2.*/dist-packages/
django_registration-0.7-py2.*.egg*
$ sudo easy_install --zip-ok django-registration
# ... (is zip compressed)
$ python manage.py cleanupregistration
Unknown command: 'cleanupregistration'
$ sudo rm -rf /usr/local/lib/python2.*/dist-packages/
django_registration-0.7-py2.*.egg*
$ sudo easy_install --always-unzip django-registration
# ... (is uncompressed)
$ python manage.py cleanupregistration
# ... (no output = OK)

This is the reason why I verify ALL packages by imp.find_package(...),
not only by __import__(...)
IMO it is better to forbid all compressed packages with Django then to
explore what would work and what not, because Django uses also
imp.find_package sometimes in the code.

So, I only improve an error message to mention it requires
uncompressed installation. My code is aproximately correct and useful
already. phew...

An issue with minor priority have been created
https://bitbucket.org/chris1610/satchmo/issue/1356/unsupported-compressed-egg-packages
After all other known issues with satchmo_check would be fixed in the
main satchmo repository I would like to invite you users to often make
use satchmo_check when you are reporting details for some problem.
Reply all
Reply to author
Forward
0 new messages