The French's Mystpedia Age Project

General debates and discussion about the Guild of Writers and Age creation

Re: The French's Mystpedia Age Project

Postby Gbadji » Sat Sep 12, 2009 10:00 am

Thanks Christian,

even if I can export ages with blender 2.49, I'm currious, so two questions.

I have 3 installations of blender : 2.47, 2.49, 2.49b
2.47 and 2.49 are looking after (information obtened with import PIL, help(PIL) in the Script window of blender)
Code: Select all
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/PIL/__init__.py

2.49b is looking after
Code: Select all
/Library/Python/2.5/site-packages/PIL/__init__.py


when I suppress /Library/Python/2.5/site-packages/PIL/__init__.py, the 2.49b version is looking after
Code: Select all
/Applications/blender-2.49b-OSX-10.5-py2.5-intel/blender.app/Contents/MacOS/.blender/scripts/PIL/__init__.py
according the Default Python Script Location written in Blender (File Paths properties)
Even it, image module is still not found.

Note: the 2.47 and 2.49 versions have the same File Paths properties as the 2.49b.
Note 2: PIL folders are the same versions in the Library folder (one with compiled files the other without). Such version is older than the one I have put in the blender/script folder :(.

My questions:
1/ why the 3 versions of blender are not looking after the same folder ?

2/ why the PIL installed in the Default Python Script Location is not taken into account ?

Thanks for your time.
See you soon.
The French's Mystpedia age Project - http://www.mystpedia.net
To find me in the Cavern: Gbadji KI #6911493 or Alatan KI#7869109
User avatar
Gbadji
 
Posts: 73
Joined: Sat Feb 02, 2008 5:59 am

Re: The French's Mystpedia Age Project

Postby Christian Walther » Sat Sep 12, 2009 12:17 pm

Gbadji wrote:Even it, image module is still not found.

The module is called Image, with a capital I, not image. Is that what you tried?

Gbadji wrote:1/ why the 3 versions of blender are not looking after the same folder ?

Apparently they are linked against different Python frameworks and therefore set up their module path differently. Here's what I get for Blender 2.49a and 2.49b (I don't have 2.49 or 2.47 lying around anymore):
Code: Select all
buia:~ cwalther$ otool -L /Applications/Programme/Graphik/blender\ 2.49a/blender.app/Contents/MacOS/blender | grep Python
   /Library/Frameworks/Python.framework/Versions/2.5/Python (compatibility version 2.5.0, current version 2.5.0)
buia:~ cwalther$ otool -L /Applications/Programme/Graphik/blender\ 2.49b/blender.app/Contents/MacOS/blender | grep Python
   /System/Library/Frameworks/Python.framework/Versions/2.5/Python (compatibility version 2.5.0, current version 2.5.1)


Gbadji wrote:2/ why the PIL installed in the Default Python Script Location is not taken into account ?

I don't understand. Apparently it is, judging from your third example?

In general, you can check what locations are searched in what order by running
Code: Select all
import sys
sys.path

in the Blender Interactive Python Console.
Christian Walther
 
Posts: 443
Joined: Sun Jun 08, 2008 3:10 am
Location: Switzerland

Re: The French's Mystpedia Age Project

Postby Gbadji » Sun Sep 13, 2009 12:11 am

Hi

Thanks Christian for the otool command :). So for this point the difference come from blender itself.
Code: Select all
$ otool -L /Applications/blender-2.47-OSX-10.4-py2.5-intel/blender.app/Contents/MacOS/blender | grep Python
   /Library/Frameworks/Python.framework/Versions/2.5/Python (compatibility version 2.5.0, current version 2.5.0)
$ otool -L /Applications/blender-2.49b-OSX-10.5-py2.5-intel/blender.app/Contents/MacOS/blender | grep Python
   /System/Library/Frameworks/Python.framework/Versions/2.5/Python (compatibility version 2.5.0, current version 2.5.1)
$ otool -L /Applications/blender-2.49-py2.5/blender.app/Contents/MacOS/blender | grep Python   /Library/Frameworks/Python.framework/Versions/2.5/Python (compatibility version 2.5.0, current version 2.5.0)


For the Image module, I wrote it wrongly in my previous post, you can read Image instead of image. So I'm sorry, but I don't understand: I have PIL installed where blender is looking for and it is only found by the 2.47 and thz 2.49 versions in the /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/ folder. If I suppressed it, it's not found in the blender script folder.
Code: Select all
$ /Applications/blender-2.47-OSX-10.4-py2.5-intel/blender.app/Contents/MacOS/blender Compiled with Python version 2.5.1.
Checking for installed Python... got it!
Traceback (most recent call last):
  File "<string>", line 55, in <module>
  File "/Applications/blender-2.49b-OSX-10.5-py2.5-intel/blender.app/Contents/MacOS/.blender/scripts/prp_ResManager.py", line 35, in <module>
    from prp_File import *
  File "/Applications/blender-2.49b-OSX-10.5-py2.5-intel/blender.app/Contents/MacOS/.blender/scripts/prp_File.py", line 20, in <module>
    from prp_AnimClasses import *
  File "/Applications/blender-2.49b-OSX-10.5-py2.5-intel/blender.app/Contents/MacOS/.blender/scripts/prp_AnimClasses.py", line 30, in <module>
    import md5, random, binascii, cStringIO, copy, Image, math, struct, StringIO, os, os.path, pickle
ImportError: No module named Image
Traceback (most recent call last):
  File "<string>", line 55, in <module>
  File "/Applications/blender-2.49b-OSX-10.5-py2.5-intel/blender.app/Contents/MacOS/.blender/scripts/prp_ResManager.py", line 35, in <module>
    from prp_File import *
  File "/Applications/blender-2.49b-OSX-10.5-py2.5-intel/blender.app/Contents/MacOS/.blender/scripts/prp_File.py", line 20, in <module>
    from prp_AnimClasses import *
  File "/Applications/blender-2.49b-OSX-10.5-py2.5-intel/blender.app/Contents/MacOS/.blender/scripts/prp_AnimClasses.py", line 30, in <module>
    import md5, random, binascii, cStringIO, copy, Image, math, struct, StringIO, os, os.path, pickle
ImportError: No module named Image

Blender quit
$ /Applications/blender-2.49-py2.5/blender.app/Contents/MacOS/blender Compiled with Python version 2.5.1.
Checking for installed Python... got it!
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Applications/blender-2.49b-OSX-10.5-py2.5-intel/blender.app/Contents/MacOS/.blender/scripts/prp_Export.py", line 55, in <module>
    from prp_ResManager import *
  File "/Applications/blender-2.49b-OSX-10.5-py2.5-intel/blender.app/Contents/MacOS/.blender/scripts/prp_ResManager.py", line 35, in <module>
    from prp_File import *
  File "/Applications/blender-2.49b-OSX-10.5-py2.5-intel/blender.app/Contents/MacOS/.blender/scripts/prp_File.py", line 20, in <module>
    from prp_AnimClasses import *
  File "/Applications/blender-2.49b-OSX-10.5-py2.5-intel/blender.app/Contents/MacOS/.blender/scripts/prp_AnimClasses.py", line 30, in <module>
    import md5, random, binascii, cStringIO, copy, Image, math, struct, StringIO, os, os.path, pickle
ImportError: No module named Image

Blender quit


I think to something ... I do a test ...
Last year I had to put the PIL folder in the blender script folder (not directly the files) to have an Image module, found, now it's not that so simple. I just tried to put the files directly in the blender script folder and it's working, Image module is found in the blender script folder.

Now an other question, I have read in the wiki that the installation of the PyPRP 1.6 will change and we will have to put the folder in the blender script folder. Do you think it will works for me ? :D

thanks for your patience.

See you soon.
The French's Mystpedia age Project - http://www.mystpedia.net
To find me in the Cavern: Gbadji KI #6911493 or Alatan KI#7869109
User avatar
Gbadji
 
Posts: 73
Joined: Sat Feb 02, 2008 5:59 am

Re: The French's Mystpedia Age Project

Postby Christian Walther » Sun Sep 13, 2009 8:14 am

I am not familiar with your nonstandard situation of installing PIL into the Blender scripts folder. Could be that Python doesn't evaluate the PIL.pth file there that adds the PIL subfolder to the search path. Why don't you just install it into the site-packages of the proper Python installation, where it belongs? (When installing from source, use /System/Library/Frameworks/Python.framework/Versions/2.5/bin/python2.5 setup.py install to make sure it picks the right one.)

More generally, do you really need the second Python 2.5 installation? It only seems to cause confusion...

Gbadji wrote:I have read in the wiki that the installation of the PyPRP 1.6 will change and we will have to put the folder in the blender script folder. Do you think it will works for me ?

Yes I think so. And if it doesn't, we need to fix that. If you have doubts, then you have a few hours left to try the beta before I release the final version. :)

Note to self: add specific instructions for Mac OS X to the install page. :?
Christian Walther
 
Posts: 443
Joined: Sun Jun 08, 2008 3:10 am
Location: Switzerland

Re: The French's Mystpedia Age Project

Postby Gbadji » Sun Sep 13, 2009 8:39 am

:D

I don't know if I need the both installations of python, I'm going to check the others application I use to verify and make clean installation.
I'm not sure to have time to test the beta, I will see and maybe make a clean installation :)

And thanks for the instruction for Mac OS :).

See you soon.
The French's Mystpedia age Project - http://www.mystpedia.net
To find me in the Cavern: Gbadji KI #6911493 or Alatan KI#7869109
User avatar
Gbadji
 
Posts: 73
Joined: Sat Feb 02, 2008 5:59 am

Previous

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 12 guests

cron