我想为Python 3 安装cx_Freeze。我的Ubuntu 14.04具有Python 2.7和Python 3.4。对于Python 2,我可以使用以下命令非常方便地安装cx_Freeze:
sudo apt install cx-freeze
但是,这只会为Python 2安装cx-freeze,而不会为Python 3安装cx-freeze。另外,正式的cx_Freeze网站不包含安装提示。我不是很确定从头开始构建软件。我也尝试过pip3
(版本1.5.5),但无济于事:
pip3 install cx-freeze
could not find any downloads that satisfy the requirement
因此,问题是:
有没有简单的方法(一行)来为Python 3安装cx_Freeze?
如果没有,有人可以指导我逐步完成最简单的选择吗?
编辑:按照Dumindu Mahawela的回答,我得到以下输出:
Selecting previously unselected package cx-freeze-python3.
(Reading database ... 163736 files and directories currently installed.)
Preparing to unpack cx-freeze-python3_4.3-0ubuntu0px0pre2_amd64.deb ...
Unpacking cx-freeze-python3 (4.3-0ubuntu0px0pre2) ...
dpkg: dependency problems prevent configuration of cx-freeze-python3:
cx-freeze-python3 depends on libpython3.2 (>= 3.2~a4); however:
Package libpython3.2 is not installed.
cx-freeze-python3 depends on python3 (<< 3.3); however:
Version of python3 on system is 3.4.0-0ubuntu2.
cx-freeze-python3 depends on python3.2; however:
Package python3.2 is not installed.
cx-freeze-python3 depends on cx-freeze-common; however:
Package cx-freeze-common is not installed.
dpkg: error processing package cx-freeze-python3 (--install):
dependency problems - leaving unconfigured
这可能意味着链接的debian软件包不适用于最新的Ubuntu版本(需要python3 << 3.3)。我不想为此返回到Python 3.2。
我什至在搜索更复杂的安装建议时也没有发现任何问题。可能是因为cx_Freeze当前在Ubuntu上对Python版本> = 3.3的支持不是很好。如果是这种情况,我将继续尝试其他尝试。感谢您的所有帮助!
sudo pip3 install setuptools
其次是:sudo pip3 install cx_Freeze
为我工作!cxfreeze-quickstart
然后可以使用命令:。