Powershell - 启动器中的致命错误 - Pip install | Powershell - 启动器中的致命错误 - Pip install视觉工作室代码

发布于 2025-01-17 18:34:42 字数 2213 浏览 1 评论 0原文

我使用 PowerShell 为 python 程序创建了一个虚拟环境。安装了程序所需的各种模块。我安装虚拟环境的原因是因为之前出现的缺少导入的错误。在整个工作中,我使用 Visual Studio Code 来编写代码并进行调试。

当我继续我的程序工作时,我看到 2 个模块显示缺少导入,即“SpeechRecognition”和“wikipedia”。在终端中,将以下代码放入虚拟环境中:

pip install wikipedia

这是输出:

Fatal error in launcher: Unable to create process using '"E:\\School Collage And Files\\visual studio\\QuantumMKI\\quan\\Scripts\\python.exe"  "E:\\SchoolCollageAndFiles\\visualstudio\\QuantumMKI\\quan\\Scripts\\pip.exe" install wikipedia': The system cannot find the file specified.

SpeechRecognition 发生相同的错误

pip install SpeechRecognition

并收到相同的输出:

Fatal error in launcher: Unable to create process using '"E:\School Collage And Files\visual studio\QuantumMKI\quan\Scripts\python.exe"  "E:\SchoolCollageAndFiles\visualstudio\QuantumMKI\quan\Scripts\pip.exe" install SpeechRecognition': The system cannot find the file specified.

这是终端的整个输出以供参考:

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

Try the new cross-platform PowerShell https://aka.ms/pscore6

PS E:\SchoolCollageAndFiles\visualstudio\QuantumMKI> & e:/SchoolCollageAndFiles/visualstudio/QuantumMKI/quan/Scripts/Activate.ps1
(quan) PS E:\SchoolCollageAndFiles\visualstudio\QuantumMKI> pip install wikipedia
Fatal error in launcher: Unable to create process using '"E:\School Collage And Files\visual studio\QuantumMKI\quan\Scripts\python.exe"  "E:\SchoolCollageAndFiles\visualstudio\QuantumMKI\quan\Scripts\pip.exe" install wikipedia': The system cannot find the file specified.

(quan) PS E:\SchoolCollageAndFiles\visualstudio\QuantumMKI> pip install SpeechRecognition
Fatal error in launcher: Unable to create process using '"E:\School Collage And Files\visual studio\QuantumMKI\quan\Scripts\python.exe"  "E:\SchoolCollageAndFiles\visualstudio\QuantumMKI\quan\Scripts\pip.exe" install SpeechRecognition': The system cannot find the file specified.

(quan) PS E:\SchoolCollageAndFiles\visualstudio\QuantumMKI>

我的期望是安装所有这些模块无一例外。

注意:(quan) 是程序的虚拟环境。

I created a virtual environment using PowerShell for a python program. Installed various modules needed for the program. The reason I install the virtual environment is because of the error of missing imports that occurred to me earlier. Throughout this work, I've used Visual Studio Code for writing the code and debugging it.

When I resumed my work on the program, I saw 2 modules showing missing imports i.e. "SpeechRecognition" and "wikipedia". In the terminal put the following code in the virtual environment:

pip install wikipedia

and this was the output:

Fatal error in launcher: Unable to create process using '"E:\\School Collage And Files\\visual studio\\QuantumMKI\\quan\\Scripts\\python.exe"  "E:\\SchoolCollageAndFiles\\visualstudio\\QuantumMKI\\quan\\Scripts\\pip.exe" install wikipedia': The system cannot find the file specified.

The same error occurred for SpeechRecognition

pip install SpeechRecognition

and received the same output:

Fatal error in launcher: Unable to create process using '"E:\School Collage And Files\visual studio\QuantumMKI\quan\Scripts\python.exe"  "E:\SchoolCollageAndFiles\visualstudio\QuantumMKI\quan\Scripts\pip.exe" install SpeechRecognition': The system cannot find the file specified.

Here is the whole output of the terminal for reference:

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

Try the new cross-platform PowerShell https://aka.ms/pscore6

PS E:\SchoolCollageAndFiles\visualstudio\QuantumMKI> & e:/SchoolCollageAndFiles/visualstudio/QuantumMKI/quan/Scripts/Activate.ps1
(quan) PS E:\SchoolCollageAndFiles\visualstudio\QuantumMKI> pip install wikipedia
Fatal error in launcher: Unable to create process using '"E:\School Collage And Files\visual studio\QuantumMKI\quan\Scripts\python.exe"  "E:\SchoolCollageAndFiles\visualstudio\QuantumMKI\quan\Scripts\pip.exe" install wikipedia': The system cannot find the file specified.

(quan) PS E:\SchoolCollageAndFiles\visualstudio\QuantumMKI> pip install SpeechRecognition
Fatal error in launcher: Unable to create process using '"E:\School Collage And Files\visual studio\QuantumMKI\quan\Scripts\python.exe"  "E:\SchoolCollageAndFiles\visualstudio\QuantumMKI\quan\Scripts\pip.exe" install SpeechRecognition': The system cannot find the file specified.

(quan) PS E:\SchoolCollageAndFiles\visualstudio\QuantumMKI>

My expectation was the installation of all these modules without exception.

NOTE: (quan) is the virtual environment of the program.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文