Build a one-hop Python environment and a Python Environment
In the latest mini-program, a small game called "One hop" was launched. Once launched, it immediately burst into a circle of friends, and some great gods also through Python to realize the specific code for automatic game see (Github address: https://github.com/wangshub/wechat_jump_game ). I have also successfully set up an environment for this program running through some research, and I have made a slight attempt in the circle of friends to satisfy my vanity. I will share with you the building process below:
1. Install Python. I am using Python3.6.4. Just click here on the specific website and install Baidu. This step is relatively simple.
2, install numpy, note that because scipy depends on numpy and MKL, So download the version with mkl, see the link: https://www.lfd.uci.edu /~ Gohlke/pythonlibs/# numpy
Copy the installation package to the scripts folder under the python installation directory. In the current directory, use pip install + absolute path + version name to directly install numpy.
3. Install scipy, download the corresponding version of scipy (my current scipy-1.0.0-cp36-cp36m-win32.whl), also in the scripts folder
Install the SDK by using pip install + absolute path + version name. After installation, run the impor command to check whether the installation is successful.
4. install matplotlib, download the corresponding version of matplotlib, and put it in the scripts folder. directly use pip install matplotlib to install matplotlib.
5. install Pillow by using pip install pillow.
6. install the adb toolkit, mainly four tools, which can be directly placed in the project code folder, or in the C directory, but you need to configure the environment variables. Here I am directly placed in the project code folder. Connect your computer to your mobile phone (you need to enable developer mode on your mobile phone) and open a command prompt. You can use adb devices to check whether your mobile phone is successfully connected.
7. Run Python code
Open the applet on your phone and jump to the next hop.
Switch to the directory where the source code is located. I put it on the desktop. For example:
Cd C: \ Users \ Administrator \ Desktop \ wechat_jump_game-master
Then run the program
Python wechat_jump_auto.py
You will see the program running on your phone. You can stop it when it jumps to your satisfactory score. Otherwise, it will jump continuously, the score is too high to be easily cleared.