Python 如何在没有internet连接的情况下安装pyinstaller?

Python 如何在没有internet连接的情况下安装pyinstaller?,python,pyinstaller,Python,Pyinstaller,我正在尝试在没有internet连接的情况下安装Pyinstaller。我正在尝试在虚拟环境文件夹(venv)中安装,其中包含所有已安装的软件包。我已使用“.whl”文件安装了所有软件包 每当我在cmd中运行此命令时: pip install PyInstaller-3.5.tar.gz 我得到了这个错误: Processing f:\test\venv\pyinstaller-3.5.tar.gz Installing build dependencies ... error Com

我正在尝试在没有internet连接的情况下安装Pyinstaller。我正在尝试在虚拟环境文件夹(
venv
)中安装,其中包含所有已安装的软件包。我已使用“.whl”文件安装了所有软件包

每当我在cmd中运行此命令时:

pip install PyInstaller-3.5.tar.gz
我得到了这个错误:

Processing f:\test\venv\pyinstaller-3.5.tar.gz
  Installing build dependencies ... error
  Complete output from command f:\test\venv\scripts\python.exe f:\test\venv\lib\site-packages\pip install --ignore-installed --no-user --prefix C:
\Users\hello\AppData\Local\Temp\pip-build-env-e63w3s81\overlay --no-warn-script-l
ocation --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- se
tuptools>=40.2.0 wheel:
  Collecting setuptools>=40.2.0
    Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None
)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connecti
on.VerifiedHTTPSConnection object at 0x037D11D0>, 'Connection to pypi.org timed
out. (connect timeout=15)')': /simple/setuptools/
    Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None
)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connecti
on.VerifiedHTTPSConnection object at 0x037D1330>, 'Connection to pypi.org timed
out. (connect timeout=15)')': /simple/setuptools/
    Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None
)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connecti

on.VerifiedHTTPSConnection object at 0x037D17B0>, 'Connection to pypi.org timed
out. (connect timeout=15)')': /simple/setuptools/
    Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None
)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connecti
on.VerifiedHTTPSConnection object at 0x037D1590>, 'Connection to pypi.org timed
out. (connect timeout=15)')': /simple/setuptools/
    Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None
)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connecti
on.VerifiedHTTPSConnection object at 0x037D1F30>, 'Connection to pypi.org timed
out. (connect timeout=15)')': /simple/setuptools/
    Could not find a version that satisfies the requirement setuptools>=40.2.0 (
from versions: )
  No matching distribution found for setuptools>=40.2.0

  ----------------------------------------
Command "f:\test\venv\scripts\python.exe f:\test\venv\lib\site-pac
kages\pip install --ignore-installed --no-user --prefix C:\Users\hello\AppData\Lo
cal\Temp\pip-build-env-e63w3s81\overlay --no-warn-script-location --no-binary :n
one: --only-binary :none: -i https://pypi.org/simple -- setuptools>=40.2.0 wheel
" failed with error code 1 in None
处理f:\test\venv\pyinstaller-3.5.tar.gz
正在安装生成依赖项。。。错误
从命令f:\test\venv\scripts\python.exe f:\test\venv\lib\site packages\pip install--忽略已安装--无用户--前缀C完成输出:
\Users\hello\AppData\Local\Temp\pip-build-env-e63w3s81\overlay--no-warn-script-l
位置--无二进制文件:无:--仅二进制文件:无:-ihttps://pypi.org/simple --硒
tuptools>=40.2.0控制盘:
收集设置工具>=40.2.0
重试(重试(总计=4,连接=无,读取=无,重定向=无,状态=无
))连接被“ConnectTimeoutError(,”中断后,到pypi.org的连接超时
输出。(连接超时=15)'):/simple/setuptools/
重试(重试(总计=3,连接=无,读取=无,重定向=无,状态=无
))连接被“ConnectTimeoutError(,”中断后,到pypi.org的连接超时
输出。(连接超时=15)'):/simple/setuptools/
重试(重试(总计=2,连接=无,读取=无,重定向=无,状态=无
))连接被“ConnectTimeoutError(,”中断后,到pypi.org的连接超时
输出。(连接超时=15)'):/simple/setuptools/
重试(重试(总计=1,连接=无,读取=无,重定向=无,状态=无
))连接被“ConnectTimeoutError(,”中断后,到pypi.org的连接超时
输出。(连接超时=15)'):/simple/setuptools/
重试(重试(总计=0,连接=无,读取=无,重定向=无,状态=无
))连接被“ConnectTimeoutError(,”中断后,到pypi.org的连接超时
输出。(连接超时=15)'):/simple/setuptools/
找不到满足setuptools>=40.2.0要求的版本(
从版本:)
找不到setuptools>=40.2.0的匹配分布
----------------------------------------
命令“f:\test\venv\scripts\python.exe f:\test\venv\lib\site pac
kages\pip安装--忽略已安装--无用户--前缀C:\Users\hello\AppData\Lo
cal\Temp\pip-build-env-e63w3s81\overlay--无警告脚本位置--无二进制文件:n
一:--仅二进制:无:-ihttps://pypi.org/simple --设置工具>=40.2.0车轮
“失败,错误代码1为“无”
关于setuptools,我有错误,但我已在venv中安装了setuptools 40.6.3
如何修复此问题?

要从源代码安装python软件包,您需要先将其解压缩,将当前目录更改为解压缩目录,然后在目录内运行
python setup.py install
,以便在当前环境中构建和安装该软件包

无论如何,PyInstaller需要一些外部软件包,您需要通过获取它们的源代码或使用一个轮子软件包来安装它们。以下是您应该首先安装的顺序(如果使用源代码安装,请使用上述命令):

最后,提取PyInstaller源zip文件,更改当前目录并在终端中运行以下命令:

python setup.py install
要测试它,请使用:

pyintaller script_name.py

pyinstaller错误:需要以下参数:ScriptName在其他电脑上运行.exe文件时出错;说程序入口点urct.terminate不能位于dll.api-msi-WIN中这是另一个您需要作为单独问题询问的错误。我认为这足以在脱机模式下安装Pyinstaller。