Excellent software and practical tutorials
PIP error encountered during installation of stable-diffusion-webui
Stable-diffusion is currently a free and open source AI tool for generating images from text. During the installation of stable-diffusion, I encountered[WinError 10061] Because the target computer actively refuses, unable to connectThe error, in theory, should not occur if you follow the tutorial to install step by step, but it is encountered. After searching for most of the day, I finally found the AI toolClaudeSolved the problem.
The thing is, when I was trying to install stable-diffusion, I installed python 3.11.5 and got an error, so I downgraded and installed 3.10.6. The official recommended installation is also python 3.10.6, so I installed the latest version, and then had to uninstall it and reinstall 3.10.6. During the installation process, I accidentally installed an aliyun mirror proxy.
The correct solution is to use the official installation source.
Workaround
The following is the solution provided by AI. According to this idea, the first thing you need to check is the proxy settings of PIP.
Use the command prompt window, enter the pip config unset global.proxy command, set the file path of the pip file, open the file, delete the proxy settings in it, and then everything is normal!
From the new error information you provided, it seems that the problem still exists even though we switched to Tsinghua University's PyPI mirror. This further suggests that the problem may be related to your system or network settings, especially the proxy settings. Let's try some more in-depth solutions:
1. Clear pip's proxy settings:
Run the following command in the command line to clear possible proxy settings:
pip config unset global.proxy
2. Check the system environment variables:
Make sure that the HTTP_PROXY or HTTPS_PROXY environment variables are not set. You can use set
command to view all environment variables.
3. Temporarily disable all proxies:
Run the following command in the command line and then try to install:
set HTTP_PROXY=
set HTTPS_PROXY=
pip install torch -i https://pypi.tuna.tsinghua.edu.cn/simple --no-proxy
4. Check the pip version:
run pip --version
Make sure you are using the latest version of pip. If not, you can try upgrading:
python -m pip install --upgrade pip
5. Use --verbose
Option to get more information:
pip install torch -i https://pypi.tuna.tsinghua.edu.cn/simple --verbose
This may provide more details about the connection problem.
6. Check the network connection:
Try to ping pypi.tuna.tsinghua.edu.cn to see if you can connect:
ping pypi.tuna.tsinghua.edu.cn
7. Temporarily disable the firewall:
If you have permission, you can try temporarily disabling Windows Firewall to see if that solves the problem.
8. Use the offline installation method:
If the online installation continues to fail, consider downloading the PyTorch wheel file and then installing it offline.
9. Check the installation path of Python and pip:
Make sure the versions of Python and pip you use match your system path settings.
If the above methods do not solve the problem, you may need to further check your network environment or system settings. You may need to consult your network administrator or IT support personnel, as this may involve deeper network or system configuration issues.