1. ImportError: DLL load failed while importing _imaging: The specified module could not be found
Problem Description
An error is reported when running the python file ImportError: DLL load failed while importing _imaging: 找不到指定的模块
. According to the information, the version of pillow does not match the version of python.
The python version is 3.8 and the pillow version is 9.3.0. But it is very strange. According to the description in the table below, it is obviously supported.
However, as a dead horse as a living horse doctor, I tried to reduce the version of pillow to 8.4.0, and it turned out to be successful. To solve a problem by mistake.
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pillow==8.4.0
2、AttributeError: ‘Tensor’ object has no attribute ‘tile’
Problem Description
This error is because the version of PyTorch I am using may be older and does not support the torch.Tensor.tile() method. A newer PyTorch version is required.
Some netizens also encountered the same error. The reason is that the version of pytorch is too low and needs to be updated to 1.9 or above. Please click the link for details. https://github.com/huggingface/transformers/issues/22376
solution
The overall idea: update the pytorch version to 1.9 or above
, but my cuda version is also very low, and the existing cuda version does not support pytorch 1.9 or above. So you need to uninstall cuda and install a new version of cuda.
-
List item The version supported by the driver of my computer is relatively low, and the latest version of the driver needs to be downloaded.
Reference article: Install pytorch and cuda, and install various older versions of cuda, complete in two steps + update the cuda version supported by the driver -
Uninstall the original cuda of the computer and install the new version of cuda.
Reference article: Uninstallation and installation of CUDA under windows
(It seems that different versions of cuda can be switched on the same computer, so that there is no need to uninstall, but I have not tried this method)
- Update pytorch version
I created a new python environment in anaconda and installed a new pytorch gpu.
The installed version is:
You're done!
3.requests.exceptions.ProxyError: HTTPSConnectionPool(host=‘github.com’, port=443)
Problem Description
Use python to crawl project information on github. An error will be reported after connecting to the proxy server, and no error will be reported if the proxy server is not connected.
Solution
It may be a problem with the settings of the computer proxy server.
Reference article: Python's problem with requests.exceptions.ProxyError (solved)
Windows key + R to open the "Run" command box. Type inetcpl.cpl, and the internet option box will pop up. Then follow the steps in the figure below.