pip install pytorch error MemoryError

created at 05-29-2022 views: 11

problem

72, in dumps
    return b",".join([b"cc=4",msgpack.dumps(data,use_bin_type=True)])
MemoryError

reason

According to the red font on the last line, we know that there is a MemoryError, and we know that this problem is related to memory. Because the caching mechanism of pip installation wants to read the entire file into memory before starting the installation, it may cause insufficient memory.

solution

You can instruct not to enable caching during installation, you can use the --no-cache-dir command, as follows

pip install --no-cache-dir torch==1.x.x ...
created at:05-29-2022
edited at: 05-29-2022: