Build a one-hop Python environment and a Python Environment

Source: Internet
Author: User
Tags install matplotlib

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.

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.