turbulenz / turbulenz_engine

Turbulenz is a modular 3D and 2D game framework for making HTML5 powered games for browsers, desktops and mobile devices.

Home Page:http://turbulenz.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error in setup

onaryc opened this issue · comments

Hi,

I'm trying to setup turbulenz under windows (win7 64) and i'v a few issues :

  • in setup step 5 it is "source env/Scripts/activate" instead of "source env/bin/activate"
  • in "python manage.py tools" command, i've an error:

$ python manage.py tools

Traceback (most recent call last):
File "manage.py", line 503, in
exit(main())
File "manage.py", line 482, in main
return command_fn(options)
File "c:\Users\Onaryc\Documents\GitHub\turbulenz_engine\scripts\utils.py", line 166, in new
return fn()
File "manage.py", line 173, in command_tools
sh([devenv, project_file, '/build', 'Release'], console=True)
File "c:\Users\Onaryc\Documents\GitHub\turbulenz_engine\scripts\utils.py", line 129, in sh
command_string = ' '.join(command)
TypeError: sequence item 0: expected string, NoneType found

And i can not finish the execution of "python manage.py apps" and " python manage.py samples". It is surely related...

Thanks

I got the same thing after messing with this yesterday. I have the SDK installed and I cloned the repository. I was able to get as far as python manage.py tools and I got the same error, line 166 and line 129. I am running Windows 8 64-bit. My Python version is 2.7.3. Very interested in trying out this engine if I can get it working on this Windows laptop.

The engine works even if i can not execute all the commands, but it is always nice to have some examples to begin :)

commented

You can get the tools to build by hard-coding the path to your devenv.com into the Scripts/utils.py script. If you're not using Visual Studio version 9 on Windows then the current script will fail. If you're using a more recent version you have to migrate the project in tools/cgfx2json and update the name it's referred to as in manage.py (for example cgfx2json.vcproj becomes cgfx2json.vcxproj when using VS10.
This doesn't fix the samples not building for me though. That seems to be something to do with the follow, at least in my case:
__main__.CalledProcessError: Command 'python -m turbulenz_tools.tools.dae2json --version -o _build\assets\dae2json.version' returned non-zero exit status 1

thanks, i did not get to the dependencies part 👶 (https://github.com/turbulenz/turbulenz_engine#id12).

To compile the tools visual studio 2008 and nvdia cg tool kit are needed ... I can not download these ones until next week ;(

@onaryc The env command for windows is: env\scripts\activate.bat

@n- Can you run "dae2json --help" in the environment? If so check the samples/_build/assets folder has been generated as the command would fail if it couldn't create that directory.

@CoryG89 Are you running 64bit python? If so make sure you have the visual studio 64bit compilers installed or install 32bit python: http://stackoverflow.com/questions/4676728/value-error-trying-to-install-python-for-windows-extensions

Everyone: We are going to add visual studio projects for 2010/2011 and update the script to detect which one to run. In the meantime you can do as @n- mentioned or install visual studio 2008.
Update on its way.

On OS X, I get stuck on Executing: env/bin/easy_install PyYAML>=3.10.

Attempt to install PyYAML manually fails too.

Interestingly enough, running python manage.py jslib out of order succeeds.

Is there really a need for the elaborate setup when what most folks need are just ability to rebuild the javascript files?

Can you send us the command you are using and the output of the easy_install pyyaml step you are trying? The env step is required to get you the tools you need to build the jslib from TypeScript, so it sounds like only part of it has succeeded. Do you have a complete /jslib directory?

If you are interested in having the files pre-built, you can find them in the SDKs available at hub.turbulenz.com.

Commands I used are exactly those used in the Setup portion of the Turbulenz repo's README file.

    git clone git://github.com/turbulenz/turbulenz_engine.git
    git submodule update --init
    python manage.py env

Setup used to get stuck here with

    $ python manage.py env
    Executing: env/bin/easy_install simplejson>=2.1.5
    Executing: env/bin/easy_install PyYAML>=3.10

It now doesn't which is perplexing as well. Only difference was a git pull
which updated only RST files.

    $ git pull
    remote: Counting objects: 19, done.
    remote: Compressing objects: 100% (8/8), done.
    remote: Total 13 (delta 8), reused 10 (delta 5)
    Unpacking objects: 100% (13/13), done.
    From git://github.com/turbulenz/turbulenz_engine
       967ebee..3c0d0f1  master     -> origin/master
    Updating 967ebee..3c0d0f1
    Fast-forward
     docs/source/installing.rst                    | 2 +-
     docs/source/starter/getting_started_guide.rst | 8 ++++----
     2 files changed, 5 insertions(+), 5 deletions(-)

I can now build fully so I suspect it was a network issue like easy_install timingout while trying to fetch PyYAML.

I have 64 bit Python setup in C:\Python27. I tried installing 32-bit Python 2.7.5, the current production version, into C:\Program Files (x86)\Python and running it from the command line as C:\PROGRA~2\Python\python I still get the same error. Here is the output:

(env) C:\Users\cory\Desktop\Github\turbulenz_engine>C:\PROGRA~2\Python\python ma
nage.py tools
Traceback (most recent call last):
  File "manage.py", line 503, in <module>
    exit(main())
  File "manage.py", line 482, in main
    return command_fn(options)
  File "C:\Users\cory\Desktop\Github\turbulenz_engine\scripts\utils.py", line 16
6, in new
    return fn()
  File "manage.py", line 173, in command_tools
    sh([devenv, project_file, '/build', 'Release'], console=True)
  File "C:\Users\cory\Desktop\Github\turbulenz_engine\scripts\utils.py", line 12
9, in sh
    command_string = ' '.join(command)
TypeError: sequence item 0: expected string, NoneType found

I downloaded the Windows x86 MSI installer from here: http://www.python.org/download/releases/2.7.5/
I am running 64-bit Windows 8.

@donpark Glad to hear you got it sorted. Unfortunately pypi servers periodically go down. We try and use mirrors where possible.

@CoryG89 I just realised I forgot to check if you even had visual studio installed at all? That is required to build the tools. We made a change friday to add VS2010 & VS2012 support, which we are just testing at the moment. You can try installing VS2008 now if you haven't and hopefully on monday we'll update it so you can use VS2010 or VS2012 instead.

FYI: Once you have setup the environment, you should call python by name so that it uses the python that is part of the environment. i.e.

(env)>python manage.py tools

instead of

(env)>C:\PROGRA~2\Python\python manage.py tools

I have both Visual Studio 2010 and 2012 installed, the redistributable from 2008 is also installed. I just did a git pull to get the latest changes a moment ago and everything seems to be building fine now. I will post my results back later.

I pull the last changes, install Visual express 2012 but i've this error when i try to make the tools (python manage.py tools) :

error MSB8020: The builds tools for v110_xp (Platform Toolset = 'v110_xp') cannot be found. To build using the v110_xp build tools, either click the Project menu or right-click the solution, and then select "Update VC++ Projects...". Install v110_xp to build using the v110_xp build tools. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.Cpp.Platform.targets 44 5 cgfx2json

Can you check that you have installed update 2 as mentioned in the readme.

http://www.microsoft.com/en-us/download/details.aspx?id=38188

I can't setup turbolenz too.
Errors are:
[ERROR] - make -j 5 -C /home/{path}/turbulenz_engine MODULAR=1 jslib
[ERROR] /easy_install -Z PyYAML>=3.10' returned non-zero exit status 1

@andim27 Can you manually try running "easy_install -Z PyYAML>=3.10" so we can see what the error is. Make sure you have completely satisfied the prerequisites: https://github.com/turbulenz/turbulenz_engine#pre-requisites

Installation is very complicated.
problem with yaml solved if do next:
sudo apt-get install python-dev
But have a next error:

This is CGFX.
[ERROR] - could not launch cgfx2json, CGFX support will be unavailable.
[ERROR] /debug.cgfx -o _build/assets/shaders/debug.cgfx.json failed

In file included from stdafx.h:41:0,
from cgfx2json.cpp:3:
/usr/include/Cg/cgGL.h:108:21: fatal error: GL/gl.h: No such file or directory

Note: sudo apt-get install libg1-mesa-dev
done, but have an error: E: Unable to locate package libg1-mesa-dev

How to solve this ?

There appears to be a typo in the docs. That command should read: sudo apt-get install libgl1-mesa-dev
Try that. We'll fix the typo.

Hi,

I installed Python 2.7.6 (64bits) in C root and I have installed the 4 parts of Visual Studio Express 2008.
in the Path, I have a correct C:\Python27;

I have been using TurbulenzSDK-0.28.0.exe for windows (windows 7).
Here is what I get in the shell :

[...]
File "C:\Turbulenz\SDK\0.28.0\env\lib\site-packages\turbulenz_local-1.1.4-py2.7.egg\turbulenz
_local\handlers\localv1\save.py", line 7, in
from turbulenz_local.models.gamelist import get_game_by_slug
File "C:\Turbulenz\SDK\0.28.0\env\lib\site-packages\turbulenz_local-1.1.4-py2.7.egg\turbulenz
_local\models\gamelist.py", line 4, in
import yaml
ImportError: No module named yaml

I tried uninstall and reinstall several times in the right order. No way.
The worse thing is, it once worked (before I installed Visual Studio).
Then I uninstalled the SDK, installed Visual Studio Express, CGtoolkit, reinstall the SDK, then GitHub and some others.
Now it doesn't work any more. I uninstalled the SDK, then Python, suppressed manually all related files in C: , then reinstalled Python, then the SDK, with the exact same installers that I used in the beginning.

If you have a hint, You might make my day.

Sounds like the environment setup is failing to install pyyaml before the local server is initialized.
In your SDK directory, you should have a file called "_install.log", can you send us a copy of that please.

Oh hi, sorry, I have solved the problem since that day, I forgot to post about the solution.
It was because the Visual Studio Express 2008 I installed didn't work with my 64bits version of python 2.7, and so it didn't execute properly the installation scripts . So I installed a 32bits python2.7, re-installed and now it works. Thanks for answering !

Error installing on MAC:

ag010:~ rsantos$ git clone https://github.com/turbulenz/turbulenz_engine
Cloning into 'turbulenz_engine'...
remote: Counting objects: 10764, done.
remote: Total 10764 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (10764/10764), 34.53 MiB | 383.00 KiB/s, done.
Resolving deltas: 100% (7439/7439), done.
Checking connectivity... done.
Checking out files: 100% (1972/1972), done.
ag010:~ rsantos$ cd turbulenz_engine/
ag010:turbulenz_engine rsantos$ git submodule update --init
Submodule 'external/definitelytyped' (git://github.com/borisyankov/DefinitelyTyped.git) registered for path 'external/definitelytyped'
Submodule 'external/tzbuild' (git://github.com/turbulenz/turbulenz_build.git) registered for path 'external/tzbuild'
Submodule 'external/uglifyjs' (git://github.com/mishoo/UglifyJS.git) registered for path 'external/uglifyjs'
Submodule 'tools/NvTriStrip' (git://github.com/turbulenz/NvTriStrip.git) registered for path 'tools/NvTriStrip'
Cloning into 'external/definitelytyped'...
remote: Counting objects: 23507, done.
remote: Compressing objects: 100% (39/39), done.
remote: Total 23507 (delta 17), reused 13 (delta 7)
Receiving objects: 100% (23507/23507), 17.04 MiB | 71.00 KiB/s, done.
Resolving deltas: 100% (11465/11465), done.
Checking connectivity... done.
Submodule path 'external/definitelytyped': checked out '8220ab27e78af9845ce3fb16ffb6ceb4d6ec0a1e'
Cloning into 'external/tzbuild'...
remote: Counting objects: 814, done.
remote: Total 814 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (814/814), 136.61 KiB | 79.00 KiB/s, done.
Resolving deltas: 100% (555/555), done.
Checking connectivity... done.
Submodule path 'external/tzbuild': checked out '5af706df2d2771c884530e704893134c1f0d620f'
Cloning into 'external/uglifyjs'...
remote: Counting objects: 2661, done.
remote: Total 2661 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (2661/2661), 860.98 KiB | 64.00 KiB/s, done.
Resolving deltas: 100% (1091/1091), done.
Checking connectivity... done.
Submodule path 'external/uglifyjs': checked out '9501219eeee29c701c865c0c9c79c222c56546e1'
Cloning into 'tools/NvTriStrip'...
remote: Counting objects: 93, done.
remote: Total 93 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (93/93), 37.55 KiB | 37.00 KiB/s, done.
Resolving deltas: 100% (50/50), done.
Checking connectivity... done.
Submodule path 'tools/NvTriStrip': checked out '658c0852444a775b10318a3bee250d9671fbcc4f'
ag010:turbulenz_engine rsantos$ python manage.py env
PYTHON: python2.7
CMD: virtualenv -p python2.7 --no-site-packages /Users/rsantos/turbulenz_engine/env
Executing: virtualenv -p python2.7 --no-site-packages /Users/rsantos/turbulenz_engine/env
Running virtualenv with interpreter /usr/bin/python2.7
New python executable in /Users/rsantos/turbulenz_engine/env/bin/python
Installing setuptools............done.
Installing pip...............done.
Executing: /Users/rsantos/turbulenz_engine/env/bin/easy_install -Z simplejson>=2.1.5
Executing: /Users/rsantos/turbulenz_engine/env/bin/easy_install -Z PyYAML>=3.10
Executing: /Users/rsantos/turbulenz_engine/env/bin/easy_install -Z pylint==1.2.1
Executing: /Users/rsantos/turbulenz_engine/env/bin/easy_install -Z roman>=1.4.0
Executing: /Users/rsantos/turbulenz_engine/env/bin/easy_install -Z docutils>=0.9.1
Executing: /Users/rsantos/turbulenz_engine/env/bin/easy_install -Z Sphinx>=1.1.3
Executing: /Users/rsantos/turbulenz_engine/env/bin/easy_install -Z turbulenz_tools>=1.0.6
Executing: /Users/rsantos/turbulenz_engine/env/bin/easy_install -Z turbulenz_local>=1.1.5
Executing: /Users/rsantos/turbulenz_engine/env/bin/python /Users/rsantos/turbulenz_engine/scripts/install_nodejs.py --prefix /Users/rsantos/turbulenz_engine/env --typescript -f
Installing nodejs-v0.8.14
Downloading: http://nodejs.org/dist/v0.8.14/node-v0.8.14-darwin-x86.tar.gz -> /var/folders/j6/tvwh31md54q2crwypnt76s8r4vbgk0/T/tmpS_auX1.tar.gz
Executing: tar -xzf /var/folders/j6/tvwh31md54q2crwypnt76s8r4vbgk0/T/tmpS_auX1.tar.gz --strip-components 1 -C /Users/rsantos/turbulenz_engine/env --exclude "ChangeLog" --exclude "LICENSE" --exclude "README*"
Installing typescript-0.9.1
npm ERR! Error: EACCES, open '/Users/rsantos/.npm/beca9bf7-typescript-0-9-1.lock'
npm ERR! { [Error: EACCES, open '/Users/rsantos/.npm/beca9bf7-typescript-0-9-1.lock']
npm ERR! errno: 3,
npm ERR! code: 'EACCES',
npm ERR! path: '/Users/rsantos/.npm/beca9bf7-typescript-0-9-1.lock' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

npm ERR! System Darwin 13.3.0
npm ERR! command "/Users/rsantos/turbulenz_engine/env/bin/node" "/Users/rsantos/turbulenz_engine/env/bin/npm" "install" "-g" "typescript@0.9.1"
npm ERR! cwd /Users/rsantos/turbulenz_engine
npm ERR! node -v v0.8.14
npm ERR! npm -v 1.1.65
npm ERR! path /Users/rsantos/.npm/beca9bf7-typescript-0-9-1.lock
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, open '/Users/rsantos/.npm/beca9bf7-typescript-0-9-1.lock'
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/rsantos/turbulenz_engine/npm-debug.log
npm ERR! not ok code 0
Traceback (most recent call last):
File "/Users/rsantos/turbulenz_engine/scripts/install_nodejs.py", line 215, in
exit(main())
File "/Users/rsantos/turbulenz_engine/scripts/install_nodejs.py", line 210, in main
typescript_install(ts_version, prefix)
File "/Users/rsantos/turbulenz_engine/scripts/install_nodejs.py", line 152, in typescript_install
raise Exception('failed to install typescript via npm')
Exception: failed to install typescript via npm

[ERROR] - Command '/Users/rsantos/turbulenz_engine/env/bin/python /Users/rsantos/turbulenz_engine/scripts/install_nodejs.py --prefix /Users/rsantos/turbulenz_engine/env --typescript -f' returned non-zero exit status 1
ag010:turbulenz_engine rsantos$

Ops...
sudo python manage.py env

works...
next step:
python manage.py jslib
works...
python manage.py tools (Troubles)

Creating: /Users/rsantos/turbulenz_engine/tools/bin/macosx
Executing: make
make -C NvTriStrip/
make -C NvTriStrip
gcc -c -Iinclude -arch i386 -march=pentium4 -msse2 -mfpmath=sse -O2 -fdata-sections -ffunction-sections -c src/NvTriStripObjects.cpp -o obj/release/NvTriStripObjects.o
gcc -c -Iinclude -arch i386 -march=pentium4 -msse2 -mfpmath=sse -O2 -fdata-sections -ffunction-sections -c src/NvTriStrip.cpp -o obj/release/NvTriStrip.o
ar cr lib/release/libNvTriStrip.a obj/release/NvTriStripObjects.o obj/release/NvTriStrip.o
make -C NvTriStripper
g++ -c -I../NvTriStrip/include -arch i386 -march=pentium4 -msse2 -mfpmath=sse -O2 -fdata-sections -ffunction-sections -c main.cpp -o obj/release/main.o
g++ obj/release/main.o -arch i386 -dead-strip -Wl,-L../NvTriStrip/lib/release -Wl,-lNvTriStrip -o bin/release/NvTriStripper
clang: warning: argument unused during compilation: '-dead-strip'
make -C cgfx2json/
g++ -arch x86_64 -arch i386 -I../common -I../../external/boost/1.43/include -O2 -c cgfx2json.cpp -o obj/release/cgfx2json.o
In file included from cgfx2json.cpp:3:
./stdafx.h:40:10: fatal error: 'Cg/cg.h' file not found
#include <Cg/cg.h>
^
1 error generated.
make[1]: *** [obj/release/cgfx2json.o] Error 1
make: *** [cgfx2json/] Error 2

[ERROR] - Command 'make' returned non-zero exit status 2

Dunkan Tebbs - fix <Cg/cg.h$gt;
(env)ag010:turbulenz_engine rsantos$ git pull origin master

(env)ag010:turbulenz_engine rsantos$ python manage.py tools

Works Fine. :D
thank you

I know this is kinda old, but I had the same problem on Ubuntu 14.04 LTS. The problem was in lack of python-dev package installed in my system.

When I tried to manually install pyyaml I caught the exception:

ext/_yaml.c:8:22: fatal error: pyconfig.h: No such file or directory

after that I've realized I needed python headers, then I've got this:

sudo apt-get install python-dev

I have no idea if this will work on Windows or MacOS, but this is worth try.

@nCore That's good to know. Thanks for the information!