Home Assistant source code analysis (1)

Run the source code in PyCharm

1. Operating environment

1.win10
2.Python3.7.5
3.PyCharm

2. Download the Home Assistant source code

Starting from a novice user, to becoming a master who transforms the space around him into a smart space at will.
The latest download address of Home Assistant source code: https://github.com/home-assistant/core

3. Open the Home Assistant source code

Insert picture description here

4. Install all required libraries

Open the Terminal in the lower left corner of PyCharm and enter pip install -r requirements.txtEnter in the terminal. The
Insert picture description here
following errors may occur:

Insert picture description here
Solution: Download Microsoft Visual C++ 14.0 (installation package) and install it. Since you need points to download on this website, I put the tool in the network disk.
Link: https://pan.baidu.com/s/1JgAiLFpvirPOoPOjJ2HGcw extraction code :
If the yxoz link fails, please contact VX: 17614785487 Send it for free.
After the installation is complete, use the pip install -r requirements.txtcommand to install the required libraries and everything is OK
Insert picture description here

5. Run the __main__.py file

Will complain about here means "not called 'atomicwrites' modules', using the pip install 模块名installed modules.
For example pip install atomicwrites, if you run it again after installation, a similar error will be reported, which are all solved in this way. There are about seven or eight modules.
Insert picture description here
Until the following content appears on the console, the operation is successful.
Insert picture description here

Open the browser and enter http://localhost:8123 and the registration page appears. So far, the source code has been successfully run in PyCharm.
Insert picture description here

Guess you like

Origin blog.csdn.net/qq_25886111/article/details/108749105