New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: No module named pip #6260
Comments
try |
In some cases deleting your "venv" directory and running the .bat again will solve the problem as the program builds a new venv |
Wow that just deleted a whole 2GiB of stuff that has to be redownloaded. |
Worked for me. |
Thanks it works |
worked for me as well |
If it's a user from mainland China it's like this, you have to use a VPN for global proxy to finish the installation properly, reinstall with wireguard and it's normal. The very VPN global proxy will disconnect the network connection. Damn GFW |
how does one do that? this means nothing to me |
Are you using windows education edition? might be because windows defender messes up with py and under education edition user can't turn it off |
No I just didn't realize python3 -m ensurepip just meant "run it through cmd," then it hit me like a baseball bat. |
how can I locate and delete my venv directory? |
It was that easy. I spent a week trying to install SD then i gave up thought it just all nonsense. Then again for photoshop i neede SD so i started trying different ways but still the same problem happened. But then out of couriosity i tried your solution although it seems like unreal and it all worked well then. Thank you so much |
Same problem. I downloaded release 1.1.0, created an environment for webui in conda and activated it. Launching All dependencies are installed without errors, the application starts. On the second run I get an error
Win11x64 |
Didnt work invalid syntax |
Go to stable-diffusion-webui\venv\Scripts folder and open python.exe and use the following code
pip is loading so the problem is solved and you can now run webui.bat |
When run webui-user.bat from CONDA environmentThis solves the problem of initial installation and subsequent launches of the application. pip itself remains broken change webui-user.batset PYTHON=D:\Users\my_username\anaconda3\envs\stable-diffusion-webui\python.exe change webui.bat:launch :accelerate_launch CHANGE LINE 12 AND DROP SECTION |
Delete the venv directory and then restart the webui.bat. |
Solutions that actually work, not the so-called
|
Is there any progress towards creating an adequately launchable installer and running the application on the conda environment? |
answering the question 'Why:' ummm, this is my business requirement, it’s more convenient for me I don’t plan to tear up a virtual machine or even a container for this buggy “product”, nor do I plan to litter my personal host with a carload of Python packages I don’t need I have a conda build based on the current pyTorch for my hardware, which I deploy via Ctrl+C Ctrl+V, I didn’t like it - I deleted it, Ctrl+V again |
In my condition, I changed webui-user.sh, added: |
Is there an existing issue for this?
What happened?
Any error happening after 'commit hash : XXXX' or 'Installing Torch...' bellow is not related to the launcher please report them on Automatic1111's github instead :
☁ https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/new/choose
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Cancel
venv "D:\AI\stable-diffusion-webui\venv\Scripts\Python.exe"
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug 1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Commit hash: c0ee148
Installing torch and torchvision
Traceback (most recent call last):
File "D:\AI\stable-diffusion-webui\launch.py", line 294, in
prepare_environment()
File "D:\AI\stable-diffusion-webui\launch.py", line 206, in prepare_environment
run(f'"{python}" -m {torch_command}', "Installing torch and torchvision", "Couldn't install torch")
File "D:\AI\stable-diffusion-webui\launch.py", line 49, in run
raise RuntimeError(message)
RuntimeError: Couldn't install torch.
Command: "D:\AI\stable-diffusion-webui\venv\Scripts\python.exe" -m pip install torch==1.12.1+cu113 torchvision==0.13.1+cu113 --extra-index-url https://download.pytorch.org/whl/cu113
Error code: 1
stdout:
stderr: D:\AI\stable-diffusion-webui\venv\Scripts\python.exe: No module named pip
请按任意键继续. . .
Steps to reproduce the problem
C:\Users\Administrator>python -m ensurepip
Looking in links: c:\Users\ADMINI~1\AppData\Local\Temp\tmpzpu3l19d
ERROR: Could not install packages due to an OSError: [WinError 5] 拒绝访问。
Consider using the
--user
option or check the permissions.Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in run_code
exec(code, run_globals)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\ensurepip_main.py", line 5, in
sys.exit(ensurepip.main())
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\ensurepip_init.py", line 287, in _main
return bootstrap(
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\ensurepip_init.py", line 203, in _bootstrap
return _run_pip([*args, *PACKAGE_NAMES], additional_paths)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\ensurepip_init.py", line 104, in _run_pip
return subprocess.run(cmd, check=True).returncode
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 524, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['C:\Users\Administrator\AppData\Local\Programs\Python\Python310\python.exe', '-W', 'ignore::DeprecationWarning', '-c', '\nimport runpy\nimport sys\nsys.path = ['C:\\Users\\ADMINI
1\\AppData\\Local\\Temp\\tmpzpu3l19d\\setuptools-63.2.0-py3-none-any.whl', 'C:\\Users\\ADMINI1\\AppData\\Local\\Temp\\tmpzpu3l19d\\pip-22.2.1-py3-none-any.whl'] + sys.path\nsys.argv[1:] = ['install', '--no-cache-dir', '--no-index', '--find-links', 'C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\tmpzpu3l19d', 'setuptools', 'pip']\nrunpy.run_module("pip", run_name="main", alter_sys=True)\n']' returned non-zero exit status 1.What should have happened?
i don't know
Commit where the problem happens
win11 X64
What platforms do you use to access UI ?
Windows
What browsers do you use to access the UI ?
Mozilla Firefox
Command Line Arguments
Additional information, context and logs
Settings file found, loading
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
→ Updating Settings File
✓ SUCCESS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
i Launcher Version 1.5.5
i Python 3.10 path found : C:\Users\Administrator\AppData\Local\Programs\Python\Python310\python.exe
i Git found at C:\Program Files\Git
i Git is in PATH
i Automatic1111 SD WebUI found at D:\AI\stable-diffusion-webui
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Opening A1111 WebUI Launcher
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
i Arguments are now: --xformers --ckpt-dir 'D:\AI\stable-diffusion-webui\models'
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
↓ Updating Webui
fatal: unable to access 'https://github.com/AUTOMATIC1111/stable-diffusion-webui/': Recv failure: Connection was reset
✓ SUCCESS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
i No extension found in the extensions folder
i Arguments are now: --xformers --ckpt-dir 'D:\AI\stable-diffusion-webui\models'
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
WEBUI LAUNCHING VIA EMS LAUNCHER, EXIT THIS WINDOW TO STOP THE WEBUI
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
! Any error happening after 'commit hash : XXXX' or 'Installing Torch...' bellow is not related to the launcher please report them on Automatic1111's github instead :
☁ https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/new/choose
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Cancel
venv "D:\AI\stable-diffusion-webui\venv\Scripts\Python.exe"
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug 1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Commit hash: c0ee148
Installing torch and torchvision
Traceback (most recent call last):
File "D:\AI\stable-diffusion-webui\launch.py", line 294, in
prepare_environment()
File "D:\AI\stable-diffusion-webui\launch.py", line 206, in prepare_environment
run(f'"{python}" -m {torch_command}', "Installing torch and torchvision", "Couldn't install torch")
File "D:\AI\stable-diffusion-webui\launch.py", line 49, in run
raise RuntimeError(message)
RuntimeError: Couldn't install torch.
Command: "D:\AI\stable-diffusion-webui\venv\Scripts\python.exe" -m pip install torch==1.12.1+cu113 torchvision==0.13.1+cu113 --extra-index-url https://download.pytorch.org/whl/cu113
Error code: 1
stdout:
stderr: D:\AI\stable-diffusion-webui\venv\Scripts\python.exe: No module named pip
请按任意键继续. . .
The text was updated successfully, but these errors were encountered: