我可以使用 Python 2.7 中的 PyInstaller 来编译 Python 3 脚本的可执行文件吗? [英] Can I use PyInstaller from Python 2.7 to compile an executable for a Python 3 script?

查看:38
本文介绍了我可以使用 Python 2.7 中的 PyInstaller 来编译 Python 3 脚本的可执行文件吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,我尝试在我的 Python 3.4 目录中安装 PyInstaller,但是由于某种原因,我遇到了错误并且无法安装它.但是,我的 Python 2.7 目录中确实有一个可用的 PyInstaller.我需要为 Python 3 脚本编译一个可执行文件.所以我想知道 Python 2.7 中的 PyInstaller 是否可以为我做到这一点?

So, I tried installing PyInstaller in my Python 3.4 dir but, for some reason, I've been getting errors and I'm not able to install it. I however, do have a working PyInstaller in my Python 2.7 dir. I need to compile an executable for a Python 3 script. So I was wondering if PyInstaller from Python 2.7 can do that for me?

推荐答案

PyInstaller 仅适用于 Python 2,因此不可以,您不能将其与 Python 3 脚本一起使用.但是,在 Github 上有一个支持 Py3 的实验版本,所以如果你愿意.

The default version of PyInstaller only works with Python 2, so no, you cannot use it with a Python 3 script. However, there is an experimental version with Py3 support on Github, so you can try that if you wish.

这篇关于我可以使用 Python 2.7 中的 PyInstaller 来编译 Python 3 脚本的可执行文件吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆