Basically, it's not much different from installing on Blender 2.8x. I thought that it would not be possible to install it in 2.90, but it was easier than I expected. I don't have much information, but I'll make a note of it.
Blender is assumed to be installed in C: \ Program Files \ Blender Foundation
. It is assumed that the CUDA and GPU drivers are already installed.
Only this.
.powershell
> cd C:\Program Files\Blender Foundation\Blender 2.90\2.90\python\bin
> ./python -m pip install --upgrade pip
Collecting pip
Downloading https://files.pythonhosted.org/packages/cb/28/91f26bd088ce8e22169032100d4260614fc3da435025ff389ef1d396a433/pip-20.2.4-py2.py3-none-any.whl (1.5MB)
|████████████████████████████████| 1.5MB 1.1MB/s
Installing collected packages: pip
Found existing installation: pip 19.2.3
Uninstalling pip-19.2.3:
Successfully uninstalled pip-19.2.3
Successfully installed pip-20.2.4
> ./python -m pip install torch==1.6.0+cu101 torchvision==0.7.0+cu101 -f https://download.pytorch.org/whl/torch_stable.html
Looking in links: https://download.pytorch.org/whl/torch_stable.html
Collecting torch==1.6.0+cu101
Downloading https://download.pytorch.org/whl/cu101/torch-1.6.0%2Bcu101-cp37-cp37m-win_amd64.whl (1021.6 MB)
|████████████████████████████████| 1021.6 MB 750 bytes/s
...
Successfully installed future-0.18.2 pillow-8.0.0 torch-1.6.0+cu101 torchvision-0.7.0+cu101
>
To install Pytorch, just copy and paste the CUDA version etc. from the official page as usual.
In addition, use pip to add necessary items such as matplotlib.
.powershell
> ./python -m pip install matplotlib
Collecting matplotlib
Downloading matplotlib-3.3.2-cp37-cp37m-win_amd64.whl (8.5 MB)
|████████████████████████████████| 8.5 MB 1.3 MB/s
...
Successfully installed certifi-2020.6.20 cycler-0.10.0 kiwisolver-1.2.0 matplotlib-3.3.2 pyparsing-2.4.7 python-dateutil-2.8.1 six-1.15.0
If it's installed successfully, you can run import torch
in Blender's python console.
By the way, when I tried to run pytorch_example / mnist / main.py, I got an error saying that I don't have permission. For the time being, this can be avoided by running blender with administrator privileges. You can also work around this by installing blender in a folder that your users can access.
Recommended Posts