I installed python 3.5.1 via ampps and it’s working. However, when i try to use pip, i get the following message:
Fatal error in launcher: Unable to create process using '"'
I already reinstalled ampps into a path which doesn’t include any whitespaces. Note that the «python -m pip» workaround doesn’t work for me too, since i get the following message everytime i use it:
C:UsersMyUserNameDesktopAmppspythonpython.exe: Error while finding spec for 'pip.__main__' (<class 'ImportError'>: No module named 'queue'); 'pip' is a package and cannot be directly executed
How do i get pip to work properly? I hope, there is a way to use the pip command itself without the preceding python command.
EDIT: This is what happens, if i try to run python -c "import pip.__main__"
:
Traceback (most recent call last):
File "C:UsersMyUserNameDesktopAmppspythonlibsite-packagespipcompat__init__.py", line 11, in <module>
from logging.config import dictConfig as logging_dictConfig
File "C:UsersMyUserNameDesktopAmppspythonlibloggingconfig.py", line 30, in <module>
import logging.handlers
File "C:UsersMyUserNameDesktopAmppspythonliblogginghandlers.py", line 28, in <module>
import queue
ImportError: No module named 'queue'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:UsersMyUserNameDesktopAmppspythonlibsite-packagespip__init__.py", line 13, in <module>
from pip.utils import get_installed_distributions, get_prog
File "C:UsersMyUserNameDesktopAmppspythonlibsite-packagespiputils__init__.py", line 18, in <module>
from pip.compat import console_to_str, stdlib_pkgs
File "C:UsersMyUserNameDesktopAmppspythonlibsite-packagespipcompat__init__.py", line 13, in <module>
from pip.compat.dictconfig import dictConfig as logging_dictConfig
File "C:UsersMyUserNameDesktopAmppspythonlibsite-packagespipcompatdictconfig.py", line 22, in <module>
import logging.handlers
File "C:UsersMyUserNameDesktopAmppspythonliblogginghandlers.py", line 28, in <module>
import queue
ImportError: No module named 'queue'
Issue description
I am a first time user of pip and pipenv. pipenv is failing to launch when trying to install a library. I have fully installed and updated pip, and python 3.
Expected result
Expected to have pipenv install the «requests» library. When using the pipenv install requests
command. Note: I am able to get it to run when using the following command: python -m pipenv install requests
Actual result
The following is returned when attempting to run pipenv:
Fatal error in launcher: Unable to create process using '"c:python37python.exe" "C:UsersdrtriAppDataRoamingPythonPython37Scriptspipenv.exe" install requests --verbose
Steps to replicate
Run the following within cmd on windows: pipenv install requests --verbose
Support request:
Fatal error in launcher: Unable to create process using ‘»c:python37python.exe» «C:UsersdrtriAppDataRoamingPythonPython37Scriptspipenv.exe» —support’
Additional notes
I noticed that using python -m pipenv install requests
seems to work. However, once I try and use import requests
within a python script, I get a «No module names ‘requests’ found» error.
Я установил python 3.5.1 через ampps, и он работает. Однако, когда я пытаюсь использовать pip, я получаю следующее сообщение:
Fatal error in launcher: Unable to create process using '"'
Я уже переустановил ampps в путь, который не содержит никаких пробелов. Обратите внимание, что обходной путь «python -m pip» не работает для меня, так как каждый раз, когда я его использую, я получаю следующее сообщение:
C:UsersMyUserNameDesktopAmppspythonpython.exe: Error while finding spec for 'pip.__main__' (<class 'ImportError'>: No module named 'queue'); 'pip' is a package and cannot be directly executed
Как я могу заставить pip работать правильно? Надеюсь, есть способ использовать команду pip без предыдущей команды python.
EDIT: Это то, что происходит, если я пытаюсь запустить python -c "import pip.__main__"
:
Traceback (most recent call last):
File "C:UsersMyUserNameDesktopAmppspythonlibsite-packagespipcompat__init__.py", line 11, in <module>
from logging.config import dictConfig as logging_dictConfig
File "C:UsersMyUserNameDesktopAmppspythonlibloggingconfig.py", line 30, in <module>
import logging.handlers
File "C:UsersMyUserNameDesktopAmppspythonliblogginghandlers.py", line 28, in <module>
import queue
ImportError: No module named 'queue'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:UsersMyUserNameDesktopAmppspythonlibsite-packagespip__init__.py", line 13, in <module>
from pip.utils import get_installed_distributions, get_prog
File "C:UsersMyUserNameDesktopAmppspythonlibsite-packagespiputils__init__.py", line 18, in <module>
from pip.compat import console_to_str, stdlib_pkgs
File "C:UsersMyUserNameDesktopAmppspythonlibsite-packagespipcompat__init__.py", line 13, in <module>
from pip.compat.dictconfig import dictConfig as logging_dictConfig
File "C:UsersMyUserNameDesktopAmppspythonlibsite-packagespipcompatdictconfig.py", line 22, in <module>
import logging.handlers
File "C:UsersMyUserNameDesktopAmppspythonliblogginghandlers.py", line 28, in <module>
import queue
ImportError: No module named 'queue'
при обращении к pip вылетает ошибка Fatal error in launcher: Unable to create process using ‘»d:?????python.exe» «D:?????Scriptspip.exe» install pyinstaller’: ?? ??????? ????? ????????? ????.
-
Вопрос заданболее двух лет назад
-
8324 просмотра
Я посмотрел в инэте нашёл три команды для pip
pip install —user -U pip
pip install —user -U setuptools
pip install wheel
всё работает
Пригласить эксперта
создай новый проект в virtualenv и попробуй снова. Также убедись что в пути нет русских букв
Если вы комментарии не читаете: у вас кириллическое имя пользователя в пути. Убирайте
-
Показать ещё
Загружается…
21 июн. 2023, в 23:43
5000 руб./за проект
21 июн. 2023, в 23:34
10000 руб./за проект
21 июн. 2023, в 22:52
600 руб./за проект
Минуточку внимания
Python is by far one of the easiest programming languages for a complete beginner to learn. That said, it is powerful enough to be used by veterans for just about anything from computer vision to machine learning algorithms.
In this article, we’re talking about the “fatal error in launcher: unable to create process using PiP” error in Python, its causes and what you can do to fix the problem.
What causes this error?
The error is generally triggered when PiP, Python’s built-in package manager cannot install a package. Common causes include:
- Corrupt Python installation.
- Outdated PiP version.
- PiP isn’t installed.
- PiP isn’t added to your environment variables.
Also read: How to fix Fatal error: Python.h: No such file or directory?
How to fix this?
Here are five fixes you can try out.
Update Python and Pip
Python and its package manager Pip both get frequent updates. Using an older version can lead to problems when installing external packages like Wheel.
While updating Python is as simple as running the command in the fix mentioned above, you can update pip by typing the following command in a terminal.
pip install upgrade
Update Pip dependencies
There’s also a chance that Pip’s dependencies may be causing problems. To ensure everything’s up to date, you can update setuptools and wheel using these commands once you’ve updated Pip.
pip install –upgrade wheel
pip install –upgrade setuptools
Set up the environment variables
Even if Python is installed on your computer if you haven’t set up the environment variables correctly, you’re going to run into problems. Here’s how you can set the correct environment variables for Python.
Step 1: Press Windows Key + R to open the Run prompt. Type sysdm.cpl and hit enter.
Step 2: Head over to the Advanced tab and click Environment Variables.
Step 3: Select Path under User variables and click Edit.
Step 4: Enter the installation paths for Python in the Edit environment variable window. The default Python installation paths for version 3.7 and above are as follows.
C:Users<user_name>AppDataLocalProgramsPythonPython39
C:Users<user_name>AppDataLocalProgramsPythonPython39Scripts
Make sure to change the aforementioned file paths according to your Windows user name and your installed Python version. Now restart your computer, and the error should be resolved.
Install packages using a Python script
You can also use a Python script to install the packages required. Here’s a small snippet showing how to install a package using a script.
import sys
import subprocess
python = sys.executable
subprocess.check_call(
[python, '-m', 'pip', 'install', 'package_name']
)
Make sure to replace the package_name placeholder in the script above with the name of the package you’re looking to install and you should be good to go.
Run a clean install
If nothing else works, your best bet is to uninstall Python from your PC and reinstall it again from scratch. This ensures that any wrong variables or modules that might be installed in the wrong places get removed, and everything else is done from the beginning in the correct order.
Check out our detailed guide for additional troubleshooting on PiP not working on your Windows machine.
Also read: How to fix Ray out of memory error in Python?