PyCharm适配python解释器及使用

一、IDE配置解释器

PyCharm适配python解释器及使用_第1张图片

二、配置pip镜像 按照软件包

(参考博文:https://www.jianshu.com/p/fa36fe63badc)

pip国内的一些镜像

阿里云 http://mirrors.aliyun.com/pypi/simple/

中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/

豆瓣(douban) http://pypi.douban.com/simple/

清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/

中国科学技术大学 http://pypi.mirrors.ustc.edu.cn/simple/

执行命令】pip install paramiko -i http://mirrors.aliyun.com/pypi/simple/

PyCharm适配python解释器及使用_第2张图片

PyCharm适配python解释器及使用_第3张图片

【配置永久生效】全局配置文件 Window系统下,文件夹路径中输入 %APPDATA%,若没有pip目录创建,并在里面创建文件 pip.ini,内容如下

[global]

timeout = 6000

index-url = https://pypi.mirrors.ustc.edu.cn/simple/

trusted-host = pypi.mirrors.ustc.edu.cn

PyCharm适配python解释器及使用_第4张图片

PyCharm适配python解释器及使用_第5张图片

三、生产EXE执行文件

【可执行文件生成命令】pyinstaller -F .\EasyLoglizer.py -w

PyCharm适配python解释器及使用_第6张图片

PyCharm适配python解释器及使用_第7张图片

获取帮助信息pyinstaller -h

What to generate:

  -D, --onedir          Create a one-folder bundle containing an executable

                        (default)

  -F, --onefile         Create a one-file bundled executable.

  --specpath DIR        Folder to store the generated spec file (default:

                        current directory)

  -n NAME, --name NAME  Name to assign to the bundled app and spec file

                        (default: first script's basename)

-w, --windowed, --noconsole

                        Windows and Mac OS X: do not provide a console window

                        for standard i/o. On Mac OS X this also triggers

                        building an OS X .app bundle. On Windows this option

                        will be set if the first script is a '.pyw' file. This

                        option is ignored in *NIX systems.

你可能感兴趣的:(python系列,python,pip)