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:
Python is needed to run the React Native build scripts. Run the following command as Administrator if you don't have Python 2. Run the following command as Administrator if you don't have a JDK or have a version older than 8. Install Node.
This is because React uses a very different syntax and data structures than Python, which makes it difficult for Python developers to adapt to. In this article, we'll map out a road plan for getting started with React, as well as the core prerequisites for diving into React as a Python developer.
python3 and python2, both works well with react-native. In Ubuntu default installed python version is 2.7 , and no need to install python 3 separately. :) @avigil It is very easy to try.
Get started with React Native by installing required toolsInstall Visual Studio Code (or your code editor of choice). Install Android Studio for Windows. Android Studio installs the latest Android SDK by default. React Native requires Android 6.0 (Marshmallow) SDK or later.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With