Hi, I’m using cocos command tool and when I try to compile a cocos proyect I’m getting this error: COCOS_FRAMEWORKS not defined. Please define it in your environment.
I tried to define the framework but I can’t see where is my mistake.
The command tool:

The Cocos Studio 2 preferences:

The proyect settings:

One more:

And the one-key configure:

Go to your terminal, type echo $COCOS_FRAMEWORK and see what it returns.
Settings on Cocos Studio do not necessarily change your environment variables as they only affect when you are building your project in studio itself.
If the command does not return a value, you might wanna run setup.py to rectify it. If you are using prebuilt framework, the python file can be found in the framework folder (typically /Applications/Cocos/frameworks)
The echo $COCOS_FRAMEWORK returned nothing, but I run the setup.py in /Applications/Cocos/frameworks and everything works now, thank you!
This issue let me with a doubt. I was running the setup.py but from another folder (I put the prebuilt framework in a personalized path), why this didn’t work and the prebuilt from /Applications/Cocos/frameworks yes?
Glad to know it works for you.
I think for your second question, it depends where you are running setup.py from. For my case, I do not place the prebuilt framework in a personalized path as I am working in a team. It is easier if the frameworks are in a standard path.
In any case, I have never found the need to run setup.py. I assumed that it was run for me when I installed the frameworks from the Cocos app. In fact, it seems to be the case as everytime I installed a new framework, my COCOS_FRAMEWORK path seems to change in my environment variable.