Python PyInstaller";ImportError:没有名为Pyinstaller的模块;

Python PyInstaller";ImportError:没有名为Pyinstaller的模块;,python,pyinstaller,Python,Pyinstaller,这是运行python configure.py时生成的代码 dan@Q430-Q530:~/pyinstaller-2.0/PyInstaller$ python configure.py Traceback (most recent call last): File "configure.py", line 28, in <module> from PyInstaller import HOMEPATH, PLATFORM ImportError: No module

这是运行python configure.py时生成的代码

dan@Q430-Q530:~/pyinstaller-2.0/PyInstaller$ python configure.py
Traceback (most recent call last):
  File "configure.py", line 28, in <module>
    from PyInstaller import HOMEPATH, PLATFORM
ImportError: No module named PyInstaller
dan@Q430-Q530:~/pyinstaller-2.0/pyinstaller$python configure.py
回溯(最近一次呼叫最后一次):
文件“configure.py”,第28行,在
从PyInstaller导入HOMEPATH,平台
ImportError:没有名为PyInstaller的模块
所以,目前,我甚至无法让PyInstaller运行,因为缺少一个名为。。。PyInstaller。这是PyInstaller 2.0,您可以分别找到/PyInstaller-2.0和/PyInstaller-2.0/PyInstaller目录和内部的一些屏幕

这里有人知道发生了什么吗?我尝试将/pyinstaller-2.0目录中的pyinstaller.py文件复制到/pyinstaller-2.0/pyinstaller目录中,但没有成功


这可能是一个非常简单的解决方法,但是。。。这把我难住了。如果需要更多信息,请询问,我将尽力提供。

看起来
configure.py
希望
出现在您的计算机上。您应该能够在
/pyinstaller-2.0
导入pyinstaller
中运行
python
。这应该会像在脚本中一样失败。您可以将
添加到
~/.bashrc
中的环境变量中(确保为其提供源代码或启动新的终端会话以获得更改)。这将类似于:

export PYTHONPATH=.:$PYTHONPATH
或者,您可以将以下内容添加到配置脚本的顶部:

import sys
sys.path.append('.')

无论哪种方式,您都应该能够在
/pyinstaller-2.0
中运行脚本并导入
pyinstaller
模块。

我不认为
configure.py
makespec.py
build.py
文件应该直接在pyinstaller 2.0中运行


在下载中,顶层有一个
pyinstaller.py
文件-运行它。

使用pyinstaller 2.0,您不需要运行configure或pyinstaller文件。(请阅读安装文件附带的PyInstaller 2.0文档。)

建立你的项目;在/your/path/to/pyinstaller/目录中,只需运行:


“python pyinstaller.py[opts]yourprogram.py”

将pyinstaller添加到python路径“export PYTHONPATH=.:$PYTHONPATH”应该放在.bashrc文件中吗?这不重要,因为您通常会将其附加到变量中的任何内容。。除非之前有人使用了错误的表单,并且没有以
:$PYTHONPATH
结束语句。bashrc文件中似乎没有任何与python相关的内容。当然,搜索“python”不会发现任何东西。configure.py中的import sys选项似乎也不起作用。是的,你把它放在
.bashrc
的哪个位置并不重要。将它添加到底部:仍然不起作用。也许我做错了。。。在Linux中设置环境变量时,我似乎完全不懂P