Python报错:Fatal error in launcher: Unable to create process using “e:\...\python.exe“

发现问题

(python3.7) D:\Desktop\文件夹\Oriental_Fortune_Hot_Post\newwork\data\000725-002045>pyinstaller -F OFHP.py
Fatal error in launcher: Unable to create process using '"e:\anaconda3\envs\tf2.0\python.exe"  "E:\Anaconda3\envs\python3.7\Scripts\pyinstaller.exe" -F OFHP.py': ???????????

报错原因

这里报错说的是两个虚拟环境tf2.0python3.7冲突的问题。
博主之前将自己的一个虚拟环境tf2.0改成了python3.7,但是在装pyinstaller包的时候环境名称还是tf2.0,所以我想应该是更改虚拟环境名称的问题,所以最简单的方法就是把这个包删掉重装,结果果然成功了!

操作演示

# 删除旧的安装包
(python3.7) D:\Desktop\文件夹\Oriental_Fortune_Hot_Post\newwork\data\000725-002045>pip uninstall pyinstaller
Found existing installation: pyinstaller 4.2
Uninstalling pyinstaller-4.2:
  Would remove:
    e:\anaconda3\envs\python3.7\lib\site-packages\pyinstaller-4.2.dist-info\*
    e:\anaconda3\envs\python3.7\lib\site-packages\pyinstaller\*
    e:\anaconda3\envs\python3.7\scripts\pyi-archive_viewer.exe
    e:\anaconda3\envs\python3.7\scripts\pyi-bindepend.exe
    e:\anaconda3\envs\python3.7\scripts\pyi-grab_version.exe
    e:\anaconda3\envs\python3.7\scripts\pyi-makespec.exe
    e:\anaconda3\envs\python3.7\scripts\pyi-set_version.exe
    e:\anaconda3\envs\python3.7\scripts\pyinstaller.exe
Proceed (y/n)? y
  Successfully uninstalled pyinstaller-4.2
# 下载新的安装包
(python3.7) D:\Desktop\文件夹\Oriental_Fortune_Hot_Post\newwork\data\000725-002045>pip install pyinstaller
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting pyinstaller
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/b6/27/a006fcadba0db30819c968eb8decb4937cda398ca7a44d8874172cdc228a/pyinstaller-4.3.tar.gz (3.7 MB)
     |████████████████████████████████| 3.7 MB 726 kB/s
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Requirement already satisfied: setuptools in e:\anaconda3\envs\python3.7\lib\site-packages (from pyinstaller) (46.0.0.post20200309)
Requirement already satisfied: pywin32-ctypes>=0.2.0; sys_platform == "win32" in e:\anaconda3\envs\python3.7\lib\site-packages (from pyinstaller) (0.2.0)
Requirement already satisfied: importlib-metadata; python_version < "3.8" in e:\anaconda3\envs\python3.7\lib\site-packages (from pyinstaller) (1.7.0)
Requirement already satisfied: altgraph in e:\anaconda3\envs\python3.7\lib\site-packages (from pyinstaller) (0.17)
Requirement already satisfied: pefile>=2017.8.1; sys_platform == "win32" in e:\anaconda3\envs\python3.7\lib\site-packages (from pyinstaller) (2019.4.18)
Requirement already satisfied: pyinstaller-hooks-contrib>=2020.6 in e:\anaconda3\envs\python3.7\lib\site-packages (from pyinstaller) (2020.11)
Requirement already satisfied: zipp>=0.5 in e:\anaconda3\envs\python3.7\lib\site-packages (from importlib-metadata; python_version < "3.8"->pyinstaller) (3.1.0)
Requirement already satisfied: future in e:\anaconda3\envs\python3.7\lib\site-packages (from pefile>=2017.8.1; sys_platform == "win32"->pyinstaller) (0.18.2)
Building wheels for collected packages: pyinstaller
  Building wheel for pyinstaller (PEP 517) ... done
  Created wheel for pyinstaller: filename=pyinstaller-4.3-py3-none-any.whl size=2457297 sha256=681ff5e695fb1703f13703b0ed4df8854cd2090ddc11840df1db91633b51fc86
  Stored in directory: c:\users\administrator\appdata\local\pip\cache\wheels\57\04\db\819b14987d2963bddae9092b3345df29263dd675c6d0387b29
Successfully built pyinstaller
Installing collected packages: pyinstaller
Successfully installed pyinstaller-4.3
# 运行成功
(python3.7) D:\Desktop\文件夹\Oriental_Fortune_Hot_Post\newwork\data\000725-002045>pyinstaller -F OFHP.py
942 INFO: PyInstaller: 4.3
942 INFO: Python: 3.7.6 (conda)
945 INFO: Platform: Windows-10-10.0.18362-SP0
952 INFO: wrote D:\Desktop\文件夹\Oriental_Fortune_Hot_Post\newwork\data\000725-002045\OFHP.spec
957 INFO: UPX is not available.
960 INFO: Extending PYTHONPATH with paths
['D:\\Desktop\\文件夹\\Oriental_Fortune_Hot_Post\\newwork\\data\\000725-002045',
 'D:\\Desktop\\文件夹\\Oriental_Fortune_Hot_Post\\newwork\\data\\000725-002045']
  • 4
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 10
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 10
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

南浔Pyer

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值