如何让pyinstaller在Ubuntu上运行? [英] How can I get pyinstaller to working on Ubuntu?

查看:144
本文介绍了如何让pyinstaller在Ubuntu上运行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Ubuntu 16并安装了Python 3.5,还安装了pip3,并且使用pip3我安装了PyInstaller.我无法运行 PyInstaller.每当我在终端中输入pyinstaller时,都会出现以下错误?我必须添加路径吗?如果是这样,我该怎么做?谢谢

I am using Ubuntu 16 and installed Python 3.5, also installed pip3 and with pip3 I installed PyInstaller. I am not able to run PyInstaller. Whenever I type in pyinstaller in the the terminal, I got the below error? Do I have to add a path? If so, how do I do that? Thanks

pyinstaller: command not found

推荐答案

首先,您需要找到pip安装PyInstaller的位置:

First you need to find where pip installed PyInstaller:

sudo find / -name pyinstaller

然后,您可以使用完整路径运行它,也可以将其添加到您的.bashrc文件中.要添加到.bashrc中,请创建以下行或将您的路径添加到.bashrc中的任何现有"export PATH =行(位于主目录中):

Then you can either run it using the full path or add it to your .bashrc file. To add to .bashrc, create the following line or add your path to any existing "export PATH=" line in your .bashrc (found in your home directory):

export PATH="/path/to/pyinstaller:$PATH"

保存该文件并注销/登录以使其生效.

Save that file and logout/login to have it take effect.

要使所有用户都可以使用该路径,请将其添加到您的/etc/environment 文件中(必须进行 sudo 编辑).

To make the path available to all users, add it to your /etc/environment file (must be sudo edited).

这篇关于如何让pyinstaller在Ubuntu上运行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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