I am having issues installing fastai-v1 on Windows 8.1. I have built pytorch with Visual Studio Community 2017 and the steps exactly as detailed on the website
GitHub - pytorch/pytorch: Tensors and Dynamic neural networks in Python with strong GPU acceleration
I had to install the 14.11 toolset, because it wasn’t installed by default, but this is detailed in the pytorch instructions. I didn’t time the build, but it must have taken at least 3 hours. I tried to use ninja but without any success.
Once installed I had a missing dll error when importing torch but this was fixed with
conda install -c defaults intel-openmp -f
I think my installation may be missing a few components because some of the tests are failing, specifically test\test_torch.py, fails with the below error.
RuntimeError: No CUDA implementation of ‘gesdd’. Install MAGMA and rebuild cutorch (MAGMA) at D:\repos\pytorch\aten\src\thc\generic/THCTensorMathMagma.cu:332
My plan is to address that once I get fastai v1 to “work”(obviously if torch is slightly broken it can’t work 100%).
I can successfully do
import torch
however I cannot install torchvision-nightly. The output from
conda install -c fastai torchvision-nightly
is
Solving environment: failed
PackagesNotFoundError: The following packages are not available from current channels:
- torchvision-nightly
- pytorch-nightly
Current channels:
- Win 64 | Anaconda.org
- https://conda.anaconda.org/fastai/noarch
- Win 64 | Anaconda.org
- Noarch | Anaconda.org
- conda-forge/win-64
- conda-forge/noarch
- Win 64 | Anaconda.org
- Noarch | Anaconda.org
- main/win-64
- main/noarch
- Anaconda packages for Windows x86_64 (64-bit)
- Anaconda packages (noarch)
- r/win-64
- r/noarch
- Anaconda extras for Windows x86_64 (64-bit)
- Anaconda extras (noarch)
- msys2/win-64
- msys2/noarch
I have therefore downloaded torchvision from
and installed following their instructions with
python setup.py install
Following this the below works without any errors
import torchvision
Next I installed fastai and ran the below without any problems.
from fastai import *
however
from fastai.vision import *
is not found and results in the following error
ModuleNotFoundError: No module named ‘fastai.vision’
and
from fastai.text import *
gives me
ModuleNotFoundError Traceback (most recent call last)
in
----> 1 from fastai.text import *~\fastai\courses\dl1\fastai\text.py in
----> 1 from .core import *
2 from .learner import *
3 from .lm_rnn import *
4 from torch.utils.data.sampler import Sampler
5 import spacy~\fastai\courses\dl1\fastai\core.py in
----> 1 from .imports import *
2 from .torch_imports import *
3
4 def sum_geom(a,r,n): return an if r==1 else math.ceil(a(1-r**n)/(1-r))
5~\fastai\courses\dl1\fastai\imports.py in
1 from IPython.lib.deepreload import reload as dreload
----> 2 import PIL, os, numpy as np, math, collections, threading, json, bcolz, random, scipy, cv2
3 import pandas as pd, pickle, sys, itertools, string, sys, re, datetime, time, shutil, copy
4 import seaborn as sns, matplotlib
5 import IPython, graphviz, sklearn_pandas, sklearn, warnings, pdbModuleNotFoundError: No module named ‘bcolz’
Should I be installing fastai from source, will this bring in all the dependencies?
Additionally I get the following output
=== Software ===
python version : 3.6.6
fastai version : 1.0.6
torch version : 1.0.0a0+7edfe11
torch cuda ver : 9.2
torch cuda is : available
torch cudnn ver : 7301
torch cudnn is : enabled=== Hardware ===
torch available : 1
- gpu0 : GeForce GTX 980M
=== Environment ===
platform : Windows-8.1-6.3.9600-SP0
conda env : test_fastai
python : D:\c_progs\Anaconda3\envs\test_fastai\python.exe
sys.path :
D:\c_progs\Anaconda3\envs\test_fastai\python36.zip
D:\c_progs\Anaconda3\envs\test_fastai\DLLs
D:\c_progs\Anaconda3\envs\test_fastai\lib
D:\c_progs\Anaconda3\envs\test_fastai
C:\Users\b8\AppData\Roaming\Python\Python36\site-packages
D:\c_progs\Anaconda3\envs\test_fastai\lib\site-packages
D:\c_progs\Anaconda3\envs\test_fastai\lib\site-packages\torchvision-0.2.1-py3.6.egg
D:\c_progs\Anaconda3\envs\test_fastai\lib\site-packages\win32
D:\c_progs\Anaconda3\envs\test_fastai\lib\site-packages\win32\lib
D:\c_progs\Anaconda3\envs\test_fastai\lib\site-packages\Pythonwin
D:\c_progs\Anaconda3\envs\test_fastai\lib\site-packages\IPython\extensions
from
python -c “import fastai; fastai.show_install(0)”