I've just installed python25 and cgkit. Everything worked great until I wrote the very firsl lines from tutorial:
from cgkit import *
What I got is : NameError: name 'Sphere' is not defined
but I have cgkit modules installed and it did look ok...
I thought it could be because of some dependencies so I installed Python23 with numPy Pygame PIL PyProtocols and finally cgkit for py23 but It's the same.
I can't get even a silly Sphere() :(
Thanks for your time()
I'd be in love for any help on this()
I have the same issue. I am new to python but I have all the dependecies installed for both cgkit and pyopengl. I can run the pyopengl examples just fine also.
I found one silly way to force the viewer to run...copied file to be opened to python/scripts directory, where viewer.py resides, opened command prompt and head there, then write: python viewer.py myfile.py.
I'm not sure why it doesn't work in any other way.
I rechecked my paths and environment variables a few times already.
Nice to see somebody alive here, I hope for more users of cgkit in future:)
Yet another thing,
You can create everything from cgkit by eriting:
from cgkit.all import *
now you can do :
and it works.
sorry for double posts.
Sorry for the long turn around. I am working on a couple different projects but I am ready to focus on this one.
I am using cgkit to exercise a couple shaders I wrote. I am using Pixie Renderman to render some generated castles.
Thanks for your help getting me started I hope to contribute some myself.
Sorry, I forgot to update the online tutorial (whereas the tutorial in the manual is already updated: http://cgkit.sourceforge.net/doc2/node6.html\).
As was already mentioned the symbols have to imported from cgkit.all instead of cgkit. This was done so that importing individual functionality from cgkit doesn't trigger the import of everything else as well (might might take some time).
Sorry for any inconvenience.
- Matthias -
PS: And sorry again for the delayed reply, I switched my job and have been rather busy lately (and also offline for a while).
Hi, i am new to python and all of its staff but i have a prob because when i run this piece of code:
from cgkit.all import*
i get an error saying:
Traceback (most recent call last):
File "D:\Users\jamsinux\Desktop\tst.py", line 1, in <module>
from cgkit.all import*
File "D:\Python25\Lib\site-packages\cgkit\all\__init__.py", line 54, in <module>
from cgkit.scene import Scene, getScene
File "D:\Python25\Lib\site-packages\cgkit\scene.py", line 41, in <module>
from Interfaces import ISceneItem
File "D:\Python25\Lib\site-packages\cgkit\Interfaces\__init__.py", line 37, in <module>
from isceneitem import ISceneItem, ISceneItemContainer
File "D:\Python25\Lib\site-packages\cgkit\Interfaces\isceneitem.py", line 37, in <module>
from protocols import Interface
ImportError: No module named protocols
You have to install PyProtocols (http://peak.telecommunity.com/PyProtocols.html).
See the manual for a full list of (possible) dependencies:
- Matthias -
Sorry for posting such a question, but how do I install the protocols? beause i've downloaded it clicked on 'setup.py', a dos screen popped up and closed again, extremely quickly, and when i run the script i posted before , i get the same message. is there some kind of setup.exe file,(and if yes, where can i find it?), or am i missing something? thank you.
hello!, i have a serious problem (^^ prev message)
if i still cannot unsderstand, would any one so kind, please send me a small video clip about installing these things, 10x (this is not a request, just if there is someone who has nothing important to do @ d moment and wishes to help a newbie)
You must pass the actual command that the setup script is supposed to carry out on the command line. This means you have to open a dos box, change to the directory where the setup script is located and invoke "python setup.py install". If you just double-click it the "install" part is missing from that command and the setup script doesn't know what to do and will exit immediately.
oooooo!!! thanks a LOT!! i have about half of the downloaded modules not installed, but now, thanks to , i can. Thanks again
but wait a minute, are there some compatibility issues like the operating system, because i am using widows Vista and when i run the staff you told me i installed all the the modules i had, ok no problems, but the protocols copied like half the files and then an error :( the error:
first there are things like running,writing,reading and other but then
error:Python was built with Visual Studio 2004;
extensions must be built with a compiler than can generate compatible binaries. Visual Studio 2003 was not found on this system. If you have Cygwin installed, you can try compiling with MingW32, by passing "-c mingw32" to setup.py
that was it. does this mean that i must have cygwin or Visual Studio? thank you (because this is the only module that gave me tonnes of trouble!)
Well, just as the error message said, the compiler that is used for compiling extension modules must be compatible with the compiler that was used for compiling Python itself (apparently MingW32 would work as well, but I have never tried that myself).
But I think PyProtocols can also be installed as a pure Python module in which case you don't need any C/C++ compiler at all. I don't remember the name of the option to enable this, just check the PyProtocols documentation or the setup script.
hey ok, I found it. to install it you must invoke ' setup.py --ithout-speedups install'
and it will install without problems because the things written in c are just to enhance the inatllation a little or something. but now i think its ok