hypothetical-inc / gaffer

Gaffer is an open source application framework designed specifically for creating tools for use in visual effects production.
http://imageengine.github.io/gaffer/
BSD 3-Clause "New" or "Revised" License
59 stars 3 forks source link

Running Gaffer #22

Open SheepDomination opened 4 years ago

SheepDomination commented 4 years ago

To begin using gaffer I must run gaffer.bat but when attempting to run gaffer.bat I get an error; No module named site ?

ericmehl commented 4 years ago

That sounds like a problem with which Python binary is being run. The batch file should be loading the Python included with Gaffer.

Have you made any changes to the batch file launcher or set any additional environment variables, especially GAFFER_EXTENSION_PATHS?

Do you have another installation of Python, separate from the one in Gaffer? Maybe there's a mixup in the environment set by the batch file.

SheepDomination commented 4 years ago

I haven't made any changes to anything besides run gaffer.bat. Although I do have another installation of Python, installed on the computer, can I check if there is a conflict ?

ericmehl commented 4 years ago

Try extracting this zip file into your Gaffer bin directory. It has a batch file that just starts python but not Gaffer.

gaffer_py.zip

What do you get as a startup message? for example mine is: Python 2.7.15 (default, May 20 2020, 20:08:13) [MSC v.1916 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. which is from the latest build last week.

If that matches, try import os os.environ["PATH"] and import os os.environ["PYTHONPATH"]

and let's see if the proper directories are getting picked up.

SheepDomination commented 4 years ago

This is the message I'm getting, when running gaffer_py.bat

ImportError: No module named site
"Error(s) running Gaffer"

I skipped the second part of your message, let me try that as well.

ericmehl commented 4 years ago

ok, try changing the gaffer_py.bat line near the end from "%GAFFER_ROOT%"\bin\python.exe to "%GAFFER_ROOT%"\bin\python.exe --version

I'm not sure that will run either but give it a try.

Also try changing that same python.exe line to echo %PATH% and as a third variation echo %PYTHONPATH%

Those will skip Python entirely and let us see what your PATHs are set to prior to launching Python.

If you can uninstall your other Python and try Gaffer again it might help sort out the problem too, but I realize that might be a big hassle if you have lots of other modules installed so don't worry about it if it's troublesome.