朱莉娅Julia中的设置熊猫错误:找不到键“ _IXIndexer”

问题描述

我是docker或julia的新手,我需要在Linux(ubuntu 20.04)上构建dockerfile并需要帮助。
我的dockerfile运行RUN julia /julia/setup.jl并收到以下错误:

错误:LoadError:InitError:KeyError:找不到键“ _IXIndexer”

这是setup.jl代码:

Pkg.init()
Pkg.add("Pandas")
Pkg.add("JLD")
# Force compile
using Pandas
using JLD

Pkg.add("ArgParse")

这是我的错误的完整日志;
(对不起,我太宽泛了,因为我没有任何背景知识)

Info: Attempting to create directory /root/.julia/v0.6/CMakeWrapper/deps/downloads
Info: Downloading file https://cmake.org/files/v3.7/cmake-3.7.2-Linux-x86_64.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 29.2M  100 29.2M    0     0   973k      0  0:00:30  0:00:30 --:--:-- 4718k
Info: Done downloading file https://cmake.org/files/v3.7/cmake-3.7.2-Linux-x86_64.tar.gz
Info: Attempting to create directory /root/.julia/v0.6/CMakeWrapper/deps
Info: Directory /root/.julia/v0.6/CMakeWrapper/deps already exists
Info: Attempting to create directory /root/.julia/v0.6/CMakeWrapper/deps/usr/bin
cmake version 3.7.2

CMake suite maintained and supported by Kitware (kitware.com/cmake).
INFO: Building Blosc
Info: Downloading https://github.com/stevengj/BloscBuilder/releases/download/v1.14.3+5/Blosc.v1.14.3.x86_64-linux-gnu.tar.gz to /root/.julia/v0.6/Blosc/deps/usr/downloads/Blosc.v1.14.3.x86_64-linux-gnu.tar.gz...
[01:15:50] #####################################################################[01:15:50] #                                                                    [01:15:50] ####                                                                 [01:15:50] ###########                                                          [01:15:50] #########################                                            [01:15:51] ###############################################                      [01:15:51] #####################################################################[01:15:51] ######################################################################## 100.0%
INFO: Building HDF5
INFO: Package database updated
WARNING: Implicit vectorized function is deprecated in favor of compact broadcast syntax.
Stacktrace:
 [1] depwarn(::String,::Symbol) at ./deprecated.jl:70
 [2] @dep_vectorize_1arg(::ANY,::ANY) at /root/.julia/v0.6/Compat/src/deprecated.jl:18
 [3] include_from_node1(::String) at ./loading.jl:576
 [4] include(::String) at ./sysimg.jl:14
 [5] include_from_node1(::String) at ./loading.jl:576
 [6] include(::String) at ./sysimg.jl:14
 [7] anonymous at ./<missing>:2
 [8] eval(::Module,::Any) at ./boot.jl:235
 [9] process_options(::Base.JLOptions) at ./client.jl:286
 [10] _start() at ./client.jl:371
while loading /root/.julia/v0.6/Colors/src/algorithms.jl,in expression starting on line 152
WARNING: Implicit vectorized function is deprecated in favor of compact broadcast syntax.
Stacktrace:
 [1] depwarn(::String,in expression starting on line 153
WARNING: Implicit vectorized function is deprecated in favor of compact broadcast syntax.
Stacktrace:
 [1] depwarn(::String,in expression starting on line 154
ERROR: LoadError: InitError: KeyError: key "_IXIndexer" not found
Stacktrace:
 [1] getindex(::PyCall.PyObject,::String) at /root/.julia/v0.6/PyCall/src/PyCall.jl:289
 [2] (::Pandas.##21#24)() at /root/.julia/v0.6/Pandas/src/Pandas.jl:194
 [3] __init__() at /root/.julia/v0.6/Pandas/src/Pandas.jl:26
 [4] _include_from_serialized(::String) at ./loading.jl:157
 [5] _require_from_serialized(::Int64,::Symbol,::String,::Bool) at ./loading.jl:200
 [6] _require(::Symbol) at ./loading.jl:498
 [7] require(::Symbol) at ./loading.jl:405
 [8] include_from_node1(::String) at ./loading.jl:576
 [9] include(::String) at ./sysimg.jl:14
 [10] process_options(::Base.JLOptions) at ./client.jl:305
 [11] _start() at ./client.jl:371
during initialization of module Pandas
while loading /julia/setup.jl,in expression starting on line 5
The command '/bin/sh -c julia /julia/setup.jl' returned a non-zero code: 1

我认为这在using Pandas上是有问题的(如第5行所示),所以我尝试在dockerfile RUN pip install --upgrade pandas的setup.jl前面插入一行,但是仍然无法正常工作。我想念什么?

解决方法

您有一个非常旧的Julia版本(0.6)。 直到今天,这些软件包都停止使用该版本的语言。

尝试升级Julia-即使用当前版本1.5.0。升级时,Pandas将立即可用-您甚至不需要iPhone命令。

相关问答

依赖报错 idea导入项目后依赖报错,解决方案:https://blog....
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下...
错误1:gradle项目控制台输出为乱码 # 解决方案:https://bl...
错误还原:在查询的过程中,传入的workType为0时,该条件不起...
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct...