- Q: 安装过程
A1: 自己的方式
首先新建环境conda create -n fastaiV0
安装旧版本的pytorchconda install pytorch=0.3.1 -c pytorch
然后安装0.7版本的fastaipip install fastai==0.7.0 -i https://pypi.tuna.tsinghua.edu.cn/simple/
注意要将torchtext改为低版本的pip install torchtext==0.2.3
p.s. 因为我没有改源,所以用-i
这种方式临时使用清华的源
A2: 官网的方式
首先下载它的整个文件夹,然后用conda create -f environment.yml
完成环境创建
p.s.这种可能会下载一些自己暂时用不到的东西,此外本身没有安装fastai库,它借助每个课程目录下的fastai文件夹来import,所以局限在课程学习使用。
Q: read_feather() got an unexpected keyword argument 'nthreads'
A: 换库:import feather
,然后用df_raw = feather.read_dataframe('tmp/bulldozers-raw')
读取Q: failed to execute ['dot', '-Tsvg'], make sure the Graphviz executables …
A: 卸载原来pip安装的pip uninstall graphviz
,用conda安装新版本conda install graphviz
,发现还是没解决
于是brew install graphviz
,很顺利,所以mac直接这样就行
也有可能是少安装了conda install -c conda-forge pydotplus
,但我没试,非Mac的可以试下
- Q: ImportError: Python is not installed as a framework. The Mac OS X backend will not be able to function correctly if Python is not installed as a framework. See the Python documentation for more information on installing Python as a framework on Mac OS X. Please either reinstall Python as a framework, or try one of the other backends. If you are using (Ana)Conda please install python.app and replace the use of 'python' with 'pythonw'. See 'Working with Matplotlib on OSX' in the Matplotlib FAQ for more information.
A: 在终端用vim之类的工具编辑~/.matplotlib/matplotlibrc
,默认里面没有东西,然后增加一行backend: TkAgg
并保存
-Q: AttributeError: module ‘torch’ has no attribute ‘float32’
A: 一开始的安装过程就说过了要 pip install torchtext==0.2.3
- LOG: 如果用官方的方式安装完想补充fastai本身,可能会报matplotlib版本的警告,所以建议用我的方式来安装
plotnine 0.5.1 has requirement matplotlib>=3.0.0, but you'll have matplotlib 2.2.3 which is incompatible.
Installing collected packages: descartes, palettable, mizani, plotnine, fastai
Successfully installed descartes-1.1.0 fastai-0.7.0 mizani-0.5.3 palettable-3.1.1 plotnine-0.5.1
- LOG: 官网的方式安装完是这样的
Name Version Build Channel
appnope 0.1.0 py36_1000 conda-forge
asn1crypto 0.24.0 py36_1003 conda-forge
attrs 18.2.0 py_0 conda-forge
backcall 0.1.0 py_0 conda-forge
backports.os 0.1.1 py36_1000 conda-forge
bcolz 1.2.1 py36hf8a1672_1 conda-forge
beautifulsoup4 4.6.3
blas 1.1 openblas conda-forge
bleach 3.0.2 py_1 conda-forge
blosc 1.15.1 hfc679d8_0 conda-forge
bokeh 1.0.3 py36_1000 conda-forge
bzip2 1.0.6 1 conda-forge
ca-certificates 2018.11.29 ha4d7672_0 conda-forge
certifi 2018.11.29 py36_1000 conda-forge
cffi 1.11.5 py36h5e8e0c9_1 conda-forge
chardet 3.0.4 py36_1003 conda-forge
click 7.0 py_0 conda-forge
cliff 2.8.2
cloudpickle 0.6.1 py_0 conda-forge
cmd2 0.9.6
colorama 0.4.1
configparser 3.5.0
cryptography 2.3.1 py36hdffb7b8_0 conda-forge
cryptography-vectors 2.3.1 py36_1000 conda-forge
cssselect 1.0.3
cycler 0.10.0 py_1 conda-forge
cymem 2.0.2 py36h04f5b5a_0 defaults
cytoolz 0.9.0.1 py36h470a237_1 conda-forge
dask 1.0.0 py_0 conda-forge
dask-core 1.0.0 py_0 conda-forge
decorator 4.3.0 py_0 conda-forge
defusedxml 0.5.0 py_1 conda-forge
descartes 1.1.0
dill 0.2.8.2 py36_1000 conda-forge
distributed 1.25.2 py36_1000 conda-forge
entrypoints 0.2.3 py36_1002 conda-forge
expat 2.2.5 hfc679d8_2 conda-forge
fastai 0.7.0
feather-format 0.4.0
freetype 2.9.1 h6debe1e_4 conda-forge
graphviz 0.10.1
hdf5 1.10.4 nompi_h5598ddc_1105 conda-forge
heapdict 1.0.0 py36_1000 conda-forge
html5lib 1.0.1 py_0 conda-forge
icu 58.2 hfc679d8_0 conda-forge
idna 2.8 py36_1000 conda-forge
importlib_metadata 0.6 py36_0 conda-forge
intel-openmp 2019.1 144 defaults
ipykernel 5.1.0 py36h24bf2e0_1001 conda-forge
ipython 7.2.0 py36h24bf2e0_1000 conda-forge
ipython_genutils 0.2.0 py_1 conda-forge
ipywidgets 7.4.2 py_0 conda-forge
isoweek 1.3.3
jedi 0.13.2 py36_1000 conda-forge
jinja2 2.10 py_1 conda-forge
jpeg 9c h470a237_1 conda-forge
jsonschema 3.0.0a3 py36_1000 conda-forge
jupyter 1.0.0 py_1 conda-forge
jupyter_client 5.2.4 py_0 conda-forge
jupyter_console 6.0.0 py_0 conda-forge
jupyter_contrib_core 0.3.3 py_2 conda-forge
jupyter_contrib_nbextensions 0.5.1 py36_0 conda-forge
jupyter_core 4.4.0 py_0 conda-forge
jupyter_highlight_selected_word 0.2.0 py36_1000 conda-forge
jupyter_latex_envs 1.4.4 py36_1000 conda-forge
jupyter_nbextensions_configurator 0.4.1 py36_0 conda-forge
kaggle-cli 0.12.13
kiwisolver 1.0.1 py36h2d50403_2 conda-forge
libcxx 7.0.0 h2d50403_2 conda-forge
libffi 3.2.1 hfc679d8_5 conda-forge
libgfortran 3.0.0 1001 conda-forge
libiconv 1.15 h470a237_3 conda-forge
libpng 1.6.36 ha92aebf_0 conda-forge
libsodium 1.0.16 h470a237_1 conda-forge
libtiff 4.0.10 he6b73bb_1 conda-forge
libxml2 2.9.8 h422b904_5 conda-forge
libxslt 1.1.32 h88dbc4e_2 conda-forge
llvm-meta 7.0.0 0 conda-forge
locket 0.2.0 py_2 conda-forge
lxml 4.2.5 py36hc9114bc_0 conda-forge
lxml 4.0.0
markupsafe 1.1.0 py36h470a237_0 conda-forge
matplotlib 2.2.3 py36h0e0179f_0 conda-forge
MechanicalSoup 0.8.0
mistune 0.8.4 py36h470a237_0 conda-forge
mizani 0.5.3
mkl 2019.1 144 defaults
msgpack-numpy 0.4.3.2 py_0 conda-forge
msgpack-python 0.6.0 py36h2d50403_0 conda-forge
murmurhash 1.0.0 py36hfc679d8_0 conda-forge
nbconvert 5.4.0 1 conda-forge
nbformat 4.4.0 py_1 conda-forge
ncurses 6.1 hfc679d8_2 conda-forge
notebook 5.7.4 py36_1000 conda-forge
numexpr 2.6.9 py36hf8a1672_0 conda-forge
numpy 1.15.4 py36_blas_openblashb06ca3d_0 [blas_openblas] conda-forge
olefile 0.46 py_0 conda-forge
openblas 0.3.3 ha44fe06_1 conda-forge
opencv-python 3.4.5.20
openssl 1.0.2p h470a237_2 conda-forge
packaging 18.0 py_0 conda-forge
palettable 3.1.1
pandas 0.23.4 py36hf8a1672_0 conda-forge
pandas-summary 0.0.6
pandoc 1.19.2 0 conda-forge
pandocfilters 1.4.2 py_1 conda-forge
parso 0.3.1 py_0 conda-forge
partd 0.3.9 py_0 conda-forge
path.py 11.5.0 py_0 conda-forge
patsy 0.5.1 py_0 conda-forge
pbr 5.1.1
pcre 8.41 hfc679d8_3 conda-forge
pexpect 4.6.0 py36_1000 conda-forge
pickleshare 0.7.5 py36_1000 conda-forge
pillow 5.4.0 py36hc736899_0 conda-forge
pip 18.1 py36_1000 conda-forge
plac 0.9.6 py_1 conda-forge
plotnine 0.5.1
preshed 2.0.1 py36h0a44026_0 defaults
prettytable 0.7.2
progressbar2 3.34.3
prometheus_client 0.5.0 py_0 conda-forge
prompt_toolkit 2.0.7 py_0 conda-forge
psutil 5.4.8 py36h470a237_0 conda-forge
ptyprocess 0.6.0 py36_1000 conda-forge
pyarrow 0.11.1
pycparser 2.19 py_0 conda-forge
pygments 2.3.1 py_0 conda-forge
pyopenssl 18.0.0 py36_1000 conda-forge
pyparsing 2.3.0 py_0 conda-forge
pyperclip 1.7.0
pyqt 5.6.0 py36h8210e8a_8 conda-forge
pyrsistent 0.14.8 py36h470a237_0 conda-forge
pysocks 1.6.8 py36_1002 conda-forge
pytables 3.4.4 py36hd74fe2c_4 conda-forge
python 3.6.7 h5001a0f_1 conda-forge
python-dateutil 2.7.5 py_0 conda-forge
python-utils 2.3.0
pytorch 0.3.1 py36_cuda0.0_cudnn0.0_2 pytorch
pytz 2018.7 py_0 conda-forge
pyyaml 3.13 py36h470a237_1 conda-forge
pyzmq 17.1.2 py36hae99301_1 conda-forge
qt 5.6.2 h4e759b2_11 conda-forge
qtconsole 4.4.3 py_0 conda-forge
readline 7.0 haf1bffa_1 conda-forge
regex 2018.01.10 py36h470a237_0 conda-forge
requests 2.21.0 py36_1000 conda-forge
scikit-learn 0.20.2
scipy 1.2.0 py36_blas_openblashb06ca3d_200 [blas_openblas] conda-forge
seaborn 0.9.0 py_0 conda-forge
send2trash 1.5.0 py_0 conda-forge
setuptools 40.6.3 py36_0 conda-forge
simplegeneric 0.8.1 py_1 conda-forge
sip 4.18.1 py36hfc679d8_0 conda-forge
six 1.12.0 py36_1000 conda-forge
sklearn-pandas 1.8.0
sortedcontainers 2.1.0 py_0 conda-forge
spacy 2.0.18 py36hfc679d8_0 conda-forge
sqlite 3.26.0 hb1c47c0_0 conda-forge
statsmodels 0.9.0 py36h7eb728f_0 conda-forge
stevedore 1.30.0
tblib 1.3.2 py_1 conda-forge
terminado 0.8.1 py36_1001 conda-forge
testfixtures 6.4.1 py_0 conda-forge
testpath 0.4.2 py36_1000 conda-forge
thinc 6.12.1 py36hf8a1672_0 conda-forge
tk 8.6.9 ha92aebf_0 conda-forge
toolz 0.9.0 py_1 conda-forge
torchtext 0.2.3
torchvision 0.1.9
tornado 4.5.3 py36h470a237_1 conda-forge
tqdm 4.28.1 py_0 conda-forge
traitlets 4.3.2 py36_1000 conda-forge
treeinterpreter 0.2.2
ujson 1.35 py36h470a237_1 conda-forge
urllib3 1.24.1 py36_1000 conda-forge
wcwidth 0.1.7 py_1 conda-forge
webencodings 0.5.1 py_1 conda-forge
wheel 0.32.3 py36_0 conda-forge
widgetsnbextension 3.4.2 py36_1000 conda-forge
wrapt 1.10.11 py36h470a237_1 conda-forge
xz 5.2.4 h470a237_1 conda-forge
yaml 0.1.7 h470a237_1 conda-forge
zeromq 4.2.5 hfc679d8_6 conda-forge
zict 0.1.3 py_0 conda-forge
zlib 1.2.11 h470a237_3 conda-forge