The python code is packaged into exe twists

Today whim want python code is packaged into an exe executable file. The result is a practice day, quite tortuous.

In other source

A mostly due to lack of modules. Under the download module hold off all morning, and I know my home network is not good, but also over the wall.

Afternoon occasionally not think you can change the source it?

Oh really the result of check the Internet can result download speed whiz
Here is my source code change

pip install pyinstaller -i https://pypi.tuna.tsinghua.edu.cn/simple

Here is the change Tsinghua source, small partners if they feel this change is slower, then you can try other sources oh
behind the address can be replaced by domestic pip image:

Tsinghua
https://pypi.tuna.tsinghua.edu.cn/simple/

USTC
https://pypi.mirrors.ustc.edu.cn/simple/

Ali cloud
https://mirrors.aliyun.com/pypi/simple/

Watercress
http://pypi.douban.com/simple/

If your network is always there, is not to force, do not want to manually add each time, once and for all can be added in the configuration file.

The .py file is packaged

Everything is ready to go
when I thought that as long as the knock on

pyinstaller -F -w F:\snake.py

Then everything is all right when you can, and the result has a problem
I have successfully installed you give me this?
I have successfully installed you give me this?
The first thought is the path environment variable is not configured, the result of adding on or so, the Internet has a big google noon, the results turned out so ah ~
I begin my investigation pip list

pyinstaller installation state
pyinstaller installation state
pip list list
Here Insert Picture Description
Here Insert Picture Description
also pyinstaller ah! ! !
The result is a command not to go through a series of setbacks:
the right order is packed
Here Insert Picture Description

python -m PyInstaller -F F:\snake.py

Finally succeeded ah! My winter vacation at home bored one day so polished in the past!
Back to school and you can also install a small partner to force the

Reference
link: https: //www.jianshu.com/p/fc272a162b2d
link: https: //blog.csdn.net/qq_44132542/article/details/88564795
link: https: //zhidao.baidu.com/question/247013592459679404 .html

Released two original articles · won praise 0 · Views 126

Guess you like

Origin blog.csdn.net/m0_46073932/article/details/104095624