FastAI.jl是否不支持windows

FastAI.jl好在windows下运行示例代码(using FastAI, FastVision
data, blocks = load(datarecipes()[“imagenette2-320”]),下载完后,就出错了,而在Ubuntu下运行就是正常的。

测试环境包括了 win, ubuntu, mac。贴一下报错信息?

Info: Downloading
│   source = "https://s3.amazonaws.com/fast-ai-imageclas/imagenette2-160.tgz"
│   dest = "C:\\Users\\Administrator\\.julia\\datadeps\\fastai-imagenette2-160\\imagenette2-160.tgz"
│   progress = 1.0
│   time_taken = "228.99 s"
│   time_remaining = "0.0 s"
│   average_speed = "422.208 KiB/s"
│   downloaded = "94.417 MiB"
│   remaining = "0 bytes"
└   total = "94.417 MiB"

7-Zip 21.07 (x64) : Copyright (c) 1999-2021 Igor Pavlov : 2021-12-26
Extracting archive:
--
Path =
Type = tar
Code Page = UTF-8
Characteristics = ASCII
Everything is Ok
Folders: 23
Files: 13397
Size:       107794109
Compressed: 6872064
ERROR: IOError: rm("C:\\Users\\Administrator\\.julia\\datadeps\\fastai-imagenette2-160"): resource busy or locked (EBUSY)

Stacktrace:
  [1] uv_error
    @ .\libuv.jl:97 [inlined]
  [2] rm(path::String; force::Bool, recursive::Bool)
    @ Base.Filesystem .\file.jl:306
  [3] checkfor_mv_cp_cptree(src::String, dst::String, txt::String; force::Bool)
    @ Base.Filesystem .\file.jl:330
  [4] #mv#15
    @ .\file.jl:425 [inlined]
  [5] (::FastAI.Datasets.var"#10#11")(f::String)
    @ FastAI.Datasets C:\Users\Administrator\.julia\packages\FastAI\f27xT\src\datasets\fastaidatasets.jl:261
  [6] #16
    @ C:\Users\Administrator\.julia\packages\DataDeps\ae6dT\src\resolution_automatic.jl:122 [inlined]
  [7] cd(f::DataDeps.var"#16#17"{FastAI.Datasets.var"#10#11", String}, dir::String)
    @ Base.Filesystem .\file.jl:101
  [8] run_post_fetch(post_fetch_method::FastAI.Datasets.var"#10#11", fetched_path::String)
    @ DataDeps C:\Users\Administrator\.julia\packages\DataDeps\ae6dT\src\resolution_automatic.jl:119
  [9] download(datadep::DataDeps.DataDep{String, String, typeof(DataDeps.fetch_default), FastAI.Datasets.var"#10#11"}, localdir::String; remotepath::String, i_accept_the_terms_of_use::Nothing, skip_checksum::Bool)
    @ DataDeps C:\Users\Administrator\.julia\packages\DataDeps\ae6dT\src\resolution_automatic.jl:84
 [10] download
    @ C:\Users\Administrator\.julia\packages\DataDeps\ae6dT\src\resolution_automatic.jl:63 [inlined]
 [11] handle_missing
    @ C:\Users\Administrator\.julia\packages\DataDeps\ae6dT\src\resolution_automatic.jl:10 [inlined]
 [12] _resolve
    @ C:\Users\Administrator\.julia\packages\DataDeps\ae6dT\src\resolution.jl:83 [inlined]
 [13] resolve(datadep::DataDeps.DataDep{String, String, typeof(DataDeps.fetch_default), FastAI.Datasets.var"#10#11"}, inner_filepath::String, calling_filepath::String)
    @ DataDeps C:\Users\Administrator\.julia\packages\DataDeps\ae6dT\src\resolution.jl:29
 [14] resolve(datadep_name::String, inner_filepath::String, calling_filepath::String)
    @ DataDeps C:\Users\Administrator\.julia\packages\DataDeps\ae6dT\src\resolution.jl:54
 [15] resolve
    @ C:\Users\Administrator\.julia\packages\DataDeps\ae6dT\src\resolution.jl:73 [inlined]
 [16] makeavailable
    @ C:\Users\Administrator\.julia\packages\FastAI\f27xT\src\datasets\loaders.jl:46 [inlined]
 [17] loaddata(loader::FastAI.Datasets.DataDepLoader)
    @ FastAI.Datasets C:\Users\Administrator\.julia\packages\FastAI\f27xT\src\datasets\loaders.jl:50
 [18] (::FastAI.Registries.var"#8#13")(row::NamedTuple{(:id, :description, :size, :tags, :package, :downloaded, :loader), Tuple{String, Union{Missing, String}, Union{Missing, String}, Vector{String}, Module, Bool, FastAI.Datasets.DatasetLoader}})
    @ FastAI.Registries C:\Users\Administrator\.julia\packages\FastAI\f27xT\src\Registries\datasets.jl:38
 [19] load(entry::FeatureRegistries.RegistryEntry; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ FeatureRegistries C:\Users\Administrator\.julia\packages\FeatureRegistries\69YuP\src\registry.jl:137
 [20] load
    @ C:\Users\Administrator\.julia\packages\FeatureRegistries\69YuP\src\registry.jl:137 [inlined]
 [21] (::FastAI.Registries.var"#loadrecipeentry#35"{FeatureRegistries.Registry{NamedTuple{(:id, :description, :size, :tags, :package, :downloaded, :loader), 
 Tuple{FeatureRegistries.Field{String}, FeatureRegistries.Field{String}, FeatureRegistries.Field{String}, FeatureRegistries.Field{Vector{String}}, 
 FeatureRegistries.Field{Module}, FeatureRegistries.Field{Bool}, FeatureRegistries.Field{FastAI.Datasets.DatasetLoader}}}, 1, 
 StructArrays.StructVector{NamedTuple{(:id, :description, :size, :tags, :package, :downloaded, :loader), Tuple{String, Union{Missing, String}, Union{Missing, String}, 
 Vector{String}, Module, Bool, FastAI.Datasets.DatasetLoader}}, NamedTuple{(:id, :description, :size, :tags, :package, :downloaded, :loader), Tuple{Vector{String}, 
 Vector{Union{Missing, String}}, Vector{Union{Missing, String}}, Vector{Vector{String}}, Vector{Module}, Vector{Bool}, Vector{FastAI.Datasets.DatasetLoader}}}, Int64},
 Dict{Any, Int64}}})(row::NamedTuple{(:id, :blocks, :description, :downloaded, :datasetid, :package, :recipe), 
 Tuple{String, Any, Union{Missing, String}, Bool, String, Module, FastAI.Datasets.DatasetRecipe}})

julia的版本是v1.8.5和v1.9.0都不行,FastAI的版本是v0.5.1

报错字面意义上是说:文件夹被占用了,所以删除失败。
你用的管理员账号,合理怀疑一下是不是 julia 没有删除文件夹的权限。

  • 可以用管理员权限启动 julia 再试一下。
  • 另外还可以手动检查下这个文件见,看看是否存在。如果存在则手动删除后再试试。

都试过了,包括.julia文件夹的所有属性,使用管理员权限运行,降低FastAI的版本都会出现同样问题,这应该是一个Bug,对windows支持不好,在ubuntu下运行正常

半年前在Windows下用过没有问题,后来没试过了