Pip Still not installing

So, i’ve already asked a questoon like 4 days ago here, now continuing my trials with python, when trying to run a “File Batch Windows” it gives me the “no module named pip” even if i’ve installed pip by the get_pip.py file (since python 3.10.6 won’t install it).
Any ideas?

Can you give what command you type and what error/traceback you got:
please type/copy the output here

```
you code here
```

Here’s the whole thing that appears after running the windows batch file

venv "C:\Users\akkm6hb\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: <none>
Installing torch and torchvision
C:\Users\akkm6hb\stable-diffusion-webui\venv\Scripts\python.exe: No module named pip
Traceback (most recent call last):
  File "C:\Users\akkm6hb\stable-diffusion-webui\launch.py", line 360, in <module>
    prepare_environment()
  File "C:\Users\akkm6hb\stable-diffusion-webui\launch.py", line 269, in prepare_environment
    run(f'"{python}" -m {torch_command}', "Installing torch and torchvision", "Couldn't install torch", live=True)
  File "C:\Users\akkm6hb\stable-diffusion-webui\launch.py", line 89, in run
    raise RuntimeError(f"""{errdesc or 'Error running command'}.
RuntimeError: Couldn't install torch.
Command: "C:\Users\akkm6hb\stable-diffusion-webui\venv\Scripts\python.exe" -m pip install torch==1.13.1+cu117 torchvision==0.14.1+cu117 --extra-index-url https://download.pytorch.org/whl/cu117
Error code: 1

Try running the following command to install pip:

"C:\Users\akkm6hb\stable-diffusion-webui\venv\Scripts\python.exe" -m ensurepip --default-pip --upgrade --verbose

The response to this command is:

C:\Users\akkm6hb>"C:\Users\akkm6hb\stable-diffusion-webui\venv\Scripts\python.exe" -m ensurepip --default-pip --upgrade --verbose
Traceback (most recent call last):
  File "C:\Python and Git\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Python and Git\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Python and Git\lib\ensurepip\__main__.py", line 5, in <module>
    sys.exit(ensurepip._main())
  File "C:\Python and Git\lib\ensurepip\__init__.py", line 287, in _main
    return _bootstrap(
  File "C:\Python and Git\lib\ensurepip\__init__.py", line 203, in _bootstrap
    return _run_pip([*args, *_PACKAGE_NAMES], additional_paths)
  File "C:\Python and Git\lib\ensurepip\__init__.py", line 104, in _run_pip
    return subprocess.run(cmd, check=True).returncode
  File "C:\Python and Git\lib\subprocess.py", line 501, in run
    with Popen(*popenargs, **kwargs) as process:
  File "C:\Python and Git\lib\subprocess.py", line 969, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "C:\Python and Git\lib\subprocess.py", line 1438, in _execute_child
    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
OSError: [WinError 225] 

ensurepip spawns a child Python process that runs the bundled pip from a temporary directory in order to install and upgrade pip and setuptools. Something about this command line is being detected as a virus and causing CreateProcess() to fail with ERROR_VIRUS_INFECTED (225). That’s likely a false positive. The peculiar part is that it’s spawning sys.executable, which is the same executable that you ran to begin with, so it’s some heuristic that’s analyzing the command line and any file paths contained in it. I’d try adding an exception in your security settings for the venv executable and also the base Python executable, which should be “C:\Python and Git\python.exe”[1]. Otherwise you can try temporarily disabling realtime protection, but it’s up to you whether or not you want to risk that.


  1. “Python and Git” is a peculiar directory name. Please tell me you don’t have Python and Git sharing the same installation directory. ↩︎

So, upon disabling the realtime protection i re-run the batch file and it succesfully installed torch and torchvision, but later on it said that there was an “error”, here’s the whole thing:

venv "C:\Users\diego_akkm6hb\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: <none>
Installing torch and torchvision
Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/cu117
Collecting torch==1.13.1+cu117
  Using cached https://download.pytorch.org/whl/cu117/torch-1.13.1%2Bcu117-cp310-cp310-win_amd64.whl (2255.4 MB)
Collecting torchvision==0.14.1+cu117
  Using cached https://download.pytorch.org/whl/cu117/torchvision-0.14.1%2Bcu117-cp310-cp310-win_amd64.whl (4.8 MB)
Requirement already satisfied: typing-extensions in c:\users\diego_akkm6hb\stable-diffusion-webui\venv\lib\site-packages (from torch==1.13.1+cu117) (4.5.0)
Collecting requests
  Using cached requests-2.28.2-py3-none-any.whl (62 kB)
Requirement already satisfied: pillow!=8.3.*,>=5.3.0 in c:\users\diego_akkm6hb\stable-diffusion-webui\venv\lib\site-packages (from torchvision==0.14.1+cu117) (9.4.0)
Requirement already satisfied: numpy in c:\users\diego_akkm6hb\stable-diffusion-webui\venv\lib\site-packages (from torchvision==0.14.1+cu117) (1.24.2)
Requirement already satisfied: idna<4,>=2.5 in c:\users\diego_akkm6hb\stable-diffusion-webui\venv\lib\site-packages (from requests->torchvision==0.14.1+cu117) (3.4)
Requirement already satisfied: charset-normalizer<4,>=2 in c:\users\diego_akkm6hb\stable-diffusion-webui\venv\lib\site-packages (from requests->torchvision==0.14.1+cu117) (3.0.1)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\diego_akkm6hb\stable-diffusion-webui\venv\lib\site-packages (from requests->torchvision==0.14.1+cu117) (2022.12.7)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in c:\users\diego_akkm6hb\stable-diffusion-webui\venv\lib\site-packages (from requests->torchvision==0.14.1+cu117) (1.26.14)
Installing collected packages: torch, requests, torchvision
Successfully installed requests-2.28.2 torch-1.13.1+cu117 torchvision-0.14.1+cu117

[notice] A new release of pip available: 22.2.1 -> 23.0.1
[notice] To update, run: C:\Users\diego_akkm6hb\stable-diffusion-webui\venv\Scripts\python.exe -m pip install --upgrade pip
Traceback (most recent call last):
  File "C:\Users\diego_akkm6hb\stable-diffusion-webui\launch.py", line 360, in <module>
    prepare_environment()
  File "C:\Users\diego_akkm6hb\stable-diffusion-webui\launch.py", line 272, in prepare_environment
    run_python("import torch; assert torch.cuda.is_available(), 'Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check'")
  File "C:\Users\diego_akkm6hb\stable-diffusion-webui\launch.py", line 129, in run_python
    return run(f'"{python}" -c "{code}"', desc, errdesc)
  File "C:\Users\diego_akkm6hb\stable-diffusion-webui\launch.py", line 105, in run
    raise RuntimeError(message)
RuntimeError: Error running command.
Command: "C:\Users\diego_akkm6hb\stable-diffusion-webui\venv\Scripts\python.exe" -c "import torch; assert torch.cuda.is_available(), 'Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check'"
Error code: 1
stdout: <empty>
stderr: Traceback (most recent call last):
  File "<string>", line 1, in <module>
AssertionError: Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check

To be honest i have no idea on what to do now XD.
Also don’t worry, the name “python ande git” was a random name i picked for the folder i made, git was outside form that folder

AssertionError: Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check, this error tells that torch cannot use GPU (NVIDIA cuda)
Is your computer use AMD or NVIDIA? cuda is an NVIDIA-proprietary software for parallel processing of machine learning/deep learning models that are meant to run on NVIDIA GPUs, and is a dependency for StableDiffision running on GPUs.

This GitHub issue has some solutions for people without NVIDIA GPU, Link

yeah, my computer uses amd. I’ll try to see the link that you sent next time i can, thank you!