Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/293.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python Pyinstaller-Onefile--未将.exe文件保存到正确路径_Python_Pandas_Pyinstaller - Fatal编程技术网

Python Pyinstaller-Onefile--未将.exe文件保存到正确路径

Python Pyinstaller-Onefile--未将.exe文件保存到正确路径,python,pandas,pyinstaller,Python,Pandas,Pyinstaller,为了使用Pyinstaller,我下载了一个较旧版本的python(3.6.4),并将pandas和Pyinstaller重新下载到这个特定版本的python中。在Python3.6.4执行此命令的文件夹中(也是我要转换为.exe文件的.py文件所在的文件夹) 但一旦我执行了它,它就开始将其他版本的python(3.6.6)所在的路径中的文件捆绑起来,这是我不想要的 1062 INFO: Python: 3.6.6 1062 INFO: Platform: Windows-8.1-6.3.96

为了使用Pyinstaller,我下载了一个较旧版本的python(3.6.4),并将pandas和Pyinstaller重新下载到这个特定版本的python中。在Python3.6.4执行此命令的文件夹中(也是我要转换为.exe文件的.py文件所在的文件夹)

但一旦我执行了它,它就开始将其他版本的python(3.6.6)所在的路径中的文件捆绑起来,这是我不想要的

1062 INFO: Python: 3.6.6 
1062 INFO: Platform: Windows-8.1-6.3.9600-SP0
1077 INFO: wrote C:\Users\Patrick\Python364\Python36\dem
1077 INFO: UPX is not available.
1077 INFO: Extending PYTHONPATH with paths
['C:\\Users\\Patrick\\Python364\\Python36',
 'C:\\Users\\Patrick\\Python364\\Python36']
1077 INFO: checking Analysis
1077 INFO: Building Analysis because out00-Analysis.toc

**看看它是如何进入我的另一条路径的,在这条路径中,PYTHON的版本是错误的**

有人知道如何解决这个问题吗


它以“Maximum Recursion Depth Excelled Error”(超过最大递归深度的错误)结束,当您将.exe文件捆绑到较新版本的python中时,会抛出该错误,这就是我下载较旧版本以运行它的全部原因

在运行pyinstaller之前,应该确保两件事

  • 确保pyinstaller已安装并位于python下 3.6.4
  • 您打开的终端(cmd)使用的是python 3.6.4而不是3.6.6,您可以通过在cmd上键入
    python--version
    来检查这一点。若结果显示为3.6.6,则应将python 3.6.4的路径添加到计算机的环境变量中,然后重新打开cmd。希望这对你有帮助
    如何确保PyInstaller安装在3.6.4下?我在路径打开时下载了它(user/python364/Pip install PyInstaller),它安装了@myheartsgoon idk还有什么要做的-这是我的代码:(base)C:\Users\Patrick\python364\Python36>python.exe-m Pip install PyInstaller
    1062 INFO: Python: 3.6.6 
    1062 INFO: Platform: Windows-8.1-6.3.9600-SP0
    1077 INFO: wrote C:\Users\Patrick\Python364\Python36\dem
    1077 INFO: UPX is not available.
    1077 INFO: Extending PYTHONPATH with paths
    ['C:\\Users\\Patrick\\Python364\\Python36',
     'C:\\Users\\Patrick\\Python364\\Python36']
    1077 INFO: checking Analysis
    1077 INFO: Building Analysis because out00-Analysis.toc
    
    29280 INFO: site: retargeting to fake-dir 'c:\\users\\patrick\\anaconda3\\lib\\s
    ite-packages\\PyInstaller\\fake-modules'