mikele
13 post(s)
|
Topic: DjangoStack /
Installing PIL
Hi guys – I’m on djangostack-1.1.1-0 and SNow Leopard and wanted to install PIL, the imaging library.
I’ve tried both easy_install PIL and using the manual download, but I get this error:
using frameworks at /System/Library/Frameworks
building ‘_imaging’ extension
creating build/temp.macosx-10.4-i386-2.5
creating build/temp.macosx-10.4-i386-2.5/libImaging
gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DHAVE_LIBJPEG -DHAVE_LIBZ -I/System/Library/Frameworks/Tcl.framework/Headers -I/System/Library/Frameworks/Tk.framework/Headers -IlibImaging -I/Applications/djangostack-1.1.1-0/python/include -I/usr/local/include -I/usr/include -I/Applications/djangostack-1.1.1-0/python/include/python2.5 -c imaging.c -o build/temp.macosx-10.4-i386-2.5/imaging.o
cc1: error: unrecognized command line option “-Wno-long-double”
error: command ‘gcc’ failed with exit status 1
===
Is it installing it outside the stack? what’s the prob?
Also – a suggestion – why not adding PIL (and maybe other commonly used python libraries) to the default installation?
thanks very much,
mikele
|
mikele
13 post(s)
|
Topic: DjangoStack /
When are you guys going to update to latest Django?
I have upgraded my djangostack manually to django 1.1… it was enough to replace the directory in djangostack/apps/django/lib/python2.5/site-packages/django.
But yes, I have to admit that it’d be really nice to have a new stack that includes it by default (especially now that the stack runs on amazon goGrid too! wow).
And also, can I suggest to have iPython installed too by default? I tried installing it but I get an error with Readline (which is required by iPython)…
thanks!!!!
mikele
|
mikele
13 post(s)
|
Topic: DjangoStack /
Using DjangoModels without a server running
Dear all, I need to import some xml into my webapp (called ltb1) – it’s a one-off thing so I want to do it outside the webapp, but still making use of all the models I’ve defined in it.. So I created a new package in my djangostack/projects/ltb1 which contains a new module ‘import_xml’. I should be able to access the DB through the django models, so to parse the xml and feed the results into the DB accordingly. (Essentially, I wanted to manually load whatever usually gets loaded with ‘manage.py’):
import sys, os, ltb1.settings
from django.core.management import setup_environ
setup_environ(ltb1.settings)
from ltb1.ltbapp.models import MyModel
It seems to work till the ‘setup_env….’ but then it fails when I try to import my models. Here’s the result:
Traceback (most recent call last):
File "/Applications/djangostack-1.0-6/projects/ltb1/src/ltb1_xml/test.py", line 6, in <module>
from ltb1.ltbapp.models import EndnoteReferences
File "/Applications/djangostack-1.0-6/projects/ltb1/src/python_ltb1/../python_ltb1/ltbapp/models.py", line 1, in <module>
File "/Applications/djangostack-1.0-6/apps/django/lib/python2.5/site-packages/django/db/__init__.py", line 16, in <module>
backend = __import__('%s%s.base' % (_import_path, settings.DATABASE_ENGINE), {}, {}, [''])
File "/Applications/djangostack-1.0-6/apps/django/lib/python2.5/site-packages/django/db/backends/mysql/base.py", line 13, in <module>
raise ImproperlyConfigured("Error loading MySQLdb module: %s" % e)
django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: dlopen(/Users/mac/.python-eggs/MySQL_python-1.2.2-py2.5-macosx-10.4-i386.egg-tmp/_mysql.so, 2): Library not loaded: /usr/local/mysql/lib/libmysqlclient_r.15.dylib
Referenced from: /Users/mac/.python-eggs/MySQL_python-1.2.2-py2.5-macosx-10.4-i386.egg-tmp/_mysql.so
Reason: image not found
I must have NOT included some other setting that loads the right python_mysql bridge, I guess… any suggestion?
tx!
|
mikele
13 post(s)
|
Topic: DjangoStack /
how do i start a new project in mac os x 10.4?
Hi beltran
yes it did the trick! thanks a lot :-) Just a small detail: the first line of /Applications/djangostack-1.0-6/apps/django/bin/django-admin.py in my case wasnt ending as you’ve written above (.python.bin), but just with ‘python’, i.e.
!/Applications/djangostack-1.0-6/python/bin/python
|
mikele
13 post(s)
|
Topic: DjangoStack /
how do i start a new project in mac os x 10.4?
hi all, I get the same error geezer mentioned… here’s the code:
bash-3.2$ ./use_djangostack
bash-3.2$ which python
/Applications/djangostack-1.0-6/python/bin/python
bash-3.2$ django-admin.py startproject newproject
from: can't read /var/mail/django.core
/Applications/djangostack-1.0-6/apps/django/bin/django-admin.py: line 6: syntax error: unexpected end of file
bash-3.2$ /Applications/djangostack-1.0-6/apps/django/bin/django-admin.py startproject newproject
from: can't read /var/mail/django.core
/Applications/djangostack-1.0-6/apps/django/bin/django-admin.py: line 6: syntax error: unexpected end of file
bash-3.2$ python /Applications/djangostack-1.0-6/apps/django/bin/django-admin.py startproject newproject
bash-3.2$ ls newproject/
__init__.py manage.py settings.py urls.py
There’s a workaround obviously… but I’m new to python, so I don’t know if I’ll need to write the complete path when issuing other commands too (such as the scripts in rails).
|
mikele
13 post(s)
|
Topic: RubyStack & JRubyStack /
MacX86 install error- RubyStack 1.4-beta-0
Hi all,
thanks very much indeed!! just installed it – works perfectly!
|
mikele
13 post(s)
|
Topic: RubyStack & JRubyStack /
MacX86 install error- RubyStack 1.4-beta-0
Sounds great – rubystack is really neat! BTW I tried also to install JRUBYstack, but had no luck here too http://www.flickr.com/photos/mikele/2926725222/ It hangs while trying to install rails – from the activity monitor it looks like it’s java that is going nuts, sucking 99% of the cpu.
|
mikele
13 post(s)
|
Topic: RubyStack & JRubyStack /
Rake Error
brilliant! tx again!
|
mikele
13 post(s)
|
Topic: RubyStack & JRubyStack /
Rake Error
UPDATE I fixed it following carlos’ advice! it was my fault, the shebang line
#!/usr/bin/env /Applications/-Other-Apps/8-Languages-IDEs/BitNamiRubyStack1_3/ruby/bin/ruby
wasn’t the very first one... I had some other lines i thought were comments, instead they were interpreted as commands. Thanks for the tip!
|
mikele
13 post(s)
|
Topic: RubyStack & JRubyStack /
MacX86 install error- RubyStack 1.4-beta-0
Sorry I can’t ! The other mac I have is a powerPc … here instead I’m running 10.5.5. I thought it was related to a mysql instance that was running in the background, so I stopped it (and actually deleted the mysql standalone mysql installation), re-installed rubystack 1.4, but the problem persisted!!!!! i’m kinda stuck here cause I need a ruby develop environment..:-( trying to go back to a non-stacked solution now
|
mikele
13 post(s)
|
Topic: RubyStack & JRubyStack /
MacX86 install error- RubyStack 1.4-beta-0
Strangely enough – I get the same error when installing the previous rubystack (1.2). http://www.flickr.com/photos/mikele/2924361648/
Also the console reports the same exception.. I’m starting thinking that there’s something in my system causing the problem – I wonder how, given that rubystack is a completely separate installation..
any suggestion much appreciated!! thanks in advance..
|
mikele
13 post(s)
|
Topic: RubyStack & JRubyStack /
MacX86 install error- RubyStack 1.4-beta-0
tried to install the latest rubystack, but get this error:
http://www.flickr.com/photos/mikele/2924325502/
When I try to run it, here’s the response:
ganimede:/Applications/rubystack-1.4-beta-0$ ./rubyconsole
bash-3.2$ pwd
/Applications/rubystack-1.4-beta-0
bash-3.2$ irb
/Applications/rubystack-1.4-beta-0/ruby/lib/ruby/1.8/thread.rb:5:in `require': no such file to load -- thread.so (LoadError)
from /Applications/rubystack-1.4-beta-0/ruby/lib/ruby/1.8/thread.rb:5
from /Applications/rubystack-1.4-beta-0/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:10:in `require'
from /Applications/rubystack-1.4-beta-0/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:10
from /Applications/rubystack-1.4-beta-0/ruby/lib/ruby/site_ruby/1.8/ubygems.rb:10:in `require'
from /Applications/rubystack-1.4-beta-0/ruby/lib/ruby/site_ruby/1.8/ubygems.rb:10
bash-3.2$
any hint?
|
mikele
13 post(s)
|
Topic: RubyStack & JRubyStack /
Rake Error
(thanks to the admins for fixing the code formatting :-) ) Hi there! I run into the same problem.. I did “gem install update” and then rake stopped functioning. I actually got some compile errors from the gem update process. Can it be related to that? Then I tried to install a brand new Bitnami stack but it always threw installation exceptions (might do another post about this too – i’ll give it another try this morning though) .. Now my rake file looks like this:
#!/usr/bin/env /Applications/-Other-Apps/8-Languages-IDEs/BitNamiRubyStack1_3/ruby/bin/ruby
require 'rubygems'
version = ">= 0"
if ARGV.first =~ /^_(.*)_$/ and Gem::Version.correct? $1 then
version = $1
ARGV.shift
end
gem 'rake', version
load 'rake'"
And here’s the response in the console:
bash-3.2$ which ruby
/Applications/-Other-Apps/8-Languages-IDEs/BitNamiRubyStack1_3/ruby/bin/ruby
bash-3.2$ which rake
/Applications/-Other-Apps/8-Languages-IDEs/BitNamiRubyStack1_3/ruby/bin/rake
bash-3.2$ rake
/Applications/-Other-Apps/8-Languages-IDEs/BitNamiRubyStack1_3/ruby/bin/rake: line 11: require: command not found
/Applications/-Other-Apps/8-Languages-IDEs/BitNamiRubyStack1_3/ruby/bin/rake: line 13: version: command not found
/Applications/-Other-Apps/8-Languages-IDEs/BitNamiRubyStack1_3/ruby/bin/rake: line 15: syntax error near unexpected token `('
/Applications/-Other-Apps/8-Languages-IDEs/BitNamiRubyStack1_3/ruby/bin/rake: line 15: `if ARGV.first =~ /^_(.*)_$/ and Gem::Version.correct? $1 then'
bash-3.2$
Can anybody help??? thanks a lot in advance.
|