1、打开anaconda prompt
2、安装pyinstaller(可以在默认目录,也可以在其他目录)
** 输入命令: pip install pyinstaller 注:如果出现如:
distributed
1.21.8 requires msgpack
, which
is not installed
.
需要安装msgpack: 解决命令如下:
pip install msgpack
如果出现:
You are using pip version
10.0.1, however version
19.1.1 is available
.
You should consider upgrading via the
'python -m pip install --upgrade pip' command
.
解决命令如下:
python
-m pip install
--upgrade pip
**
3、在jupyter notebook中打开***.ipynb文件
下载为.py文件,将文件保存在目录下(默认目录或自己上面选择了的目录)
4、在promt窗口中,输入命令:
pyinstaller -F ***.py
5.在目录下的dict文件夹里面,有.py打包好的exe文件,(其余生成的文件不用管)