9
votes

I am trying to setup react-native on windows7.

I have following things installed:

C:\Windows\system32>node -v
v6.2.0    
C:\Windows\system32>npm -v
3.8.9    
C:\Windows\system32>javac -version
javac 1.8.0_60

I have not installed Python. When i try react-native init AwesomeProject only 2 things are downloaded in AwesomeProject: node_modules dir and

package.json

{
  "name": "AwesomeProject",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "start": "node node_modules/react-native/local-cli/cli.js start"
  },
  "dependencies": {
    "react-native": "0.41.2"
  }
}

It is incomplete project. ReactNative0.41 Docs says

We recommend installing Node.js and Python2.

Why Python is recommended with react-native? Does react-native requires python to clone the seed project?

I have installed following things as well:

  • Android SDK
  • Android SDK Platform
  • Android Virtual Device
  • Android 6.0 SDK tools
  • Google APIs
  • Intel x86 Atom System Image
  • Intel x86 Atom_64 System Image
  • Google APIs Intel x86 Atom_64 System Image
1

1 Answers

10
votes

Yes, Python is needed. Download the newest Python 2 release and install it.

The reason why it's used is because React Native's build system is 100% based on it. It is used to compile your source code and serve it during development mode. In the same way that some build systems are based in JS using, say, Webpack, theirs is just a collection of Python scripts.

Facebook, in general, relies on Python a lot for build workflows.