Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Julia Version 1.0.0 "ERROR: LoadError: UndefVarError: T not defined" #188

Closed
Joel-Mckay opened this issue Sep 14, 2018 · 4 comments
Closed

Comments

@Joel-Mckay
Copy link

I was trying the Queryverse tutorials, and have had several version issues during installation.

Other users reported:
"NamedTuples.jl isn't (and probably won't be) supported on Julia 1.0 as NamedTuple functionality now exists within Julia itself" ( JuliaData/NamedTuples.jl#75 )

And I was curious if julia 1.0 was typically able to sustain it's deprecated APIs?
This is day 3 of the language introduction for myself, and I can't find any obvious workarounds for new users like myself. =)

julia> Pkg.clone("https://github.com/JuliaComputing/IndexedTables.jl.git")

  • Warning: Pkg.clone is only kept for legacy CI script reasons, please use add
  • @ Pkg.API /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/API.jl:445
    Cloning git-repo https://github.com/JuliaComputing/IndexedTables.jl.git
    Updating git-repo https://github.com/JuliaComputing/IndexedTables.jl.git
    Resolving package versions...
    Installed Rotations - v0.9.0
    Installed VegaLite -- v0.5.0
    Updating ~/.julia/environments/v1.0/Project.toml
    [6deec6e2] ? IndexedTables v0.7.4 => v0.7.4+ [~/.julia/dev/IndexedTables]
    Updating ~/.julia/environments/v1.0/Manifest.toml
    [6deec6e2] ? IndexedTables v0.7.4 => v0.7.4+ [~/.julia/dev/IndexedTables]
    [6038ab10] ? Rotations v0.8.0 => v0.9.0
    [112f6efa] ? VegaLite v0.4.0 => v0.5.0
    Building VegaLite -> ~/.julia/packages/VegaLite/Vq1RY/deps/build.log

julia> Pkg.build("IndexedTables")

julia> using NamedTuples
[ Info: Precompiling NamedTuples [73a701b4-84e1-5df0-88ff-1968ee2ee8dc]
ERROR: LoadError: UndefVarError: T not defined
Stacktrace:
[1] top-level scope at none:0
[2] include at ./boot.jl:317 [inlined]
[3] include_relative(::Module, ::String) at ./loading.jl:1038
[4] include(::Module, ::String) at ./sysimg.jl:29
[5] top-level scope at none:2
[6] eval at ./boot.jl:319 [inlined]
[7] eval(::Expr) at ./client.jl:389
[8] top-level scope at ./none:3
in expression starting at /home/groot/.julia/packages/NamedTuples/PjIPJ/src/NamedTuples.jl:119
ERROR: Failed to precompile NamedTuples [73a701b4-84e1-5df0-88ff-1968ee2ee8dc] to /home/groot/.julia/compiled/v1.0/NamedTuples/SN1pr.ji.
Stacktrace:
[1] error(::String) at ./error.jl:33
[2] macro expansion at ./logging.jl:313 [inlined]
[3] compilecache(::Base.PkgId, ::String) at ./loading.jl:1184
[4] macro expansion at ./logging.jl:311 [inlined]
[5] _require(::Base.PkgId) at ./loading.jl:941
[6] require(::Base.PkgId) at ./loading.jl:852
[7] macro expansion at ./logging.jl:311 [inlined]
[8] require(::Module, ::Symbol) at ./loading.jl:834

julia> using IndexedTables
[ Info: Precompiling IndexedTables [6deec6e2-d858-57c5-ab9b-e6ca5bd20e43]
ERROR: LoadError: UndefVarError: T not defined
Stacktrace:
[1] top-level scope at none:0
[2] include at ./boot.jl:317 [inlined]
[3] include_relative(::Module, ::String) at ./loading.jl:1038
[4] include(::Module, ::String) at ./sysimg.jl:29
[5] top-level scope at none:2
[6] eval at ./boot.jl:319 [inlined]
[7] eval(::Expr) at ./client.jl:389
[8] top-level scope at ./none:3
in expression starting at /home/groot/.julia/packages/NamedTuples/PjIPJ/src/NamedTuples.jl:119
ERROR: LoadError: Failed to precompile NamedTuples [73a701b4-84e1-5df0-88ff-1968ee2ee8dc] to /home/groot/.julia/compiled/v1.0/NamedTuples/SN1pr.ji.
Stacktrace:
[1] error(::String) at ./error.jl:33
[2] macro expansion at ./logging.jl:313 [inlined]
[3] compilecache(::Base.PkgId, ::String) at ./loading.jl:1184
[4] _require(::Base.PkgId) at ./logging.jl:311
[5] require(::Base.PkgId) at ./loading.jl:852
[6] macro expansion at ./logging.jl:311 [inlined]
[7] require(::Module, ::Symbol) at ./loading.jl:834
[8] include at ./boot.jl:317 [inlined]
[9] include_relative(::Module, ::String) at ./loading.jl:1038
[10] include(::Module, ::String) at ./sysimg.jl:29
[11] top-level scope at none:2
[12] eval at ./boot.jl:319 [inlined]
[13] eval(::Expr) at ./client.jl:389
[14] top-level scope at ./none:3
in expression starting at /home/groot/.julia/dev/IndexedTables/src/IndexedTables.jl:5
ERROR: Failed to precompile IndexedTables [6deec6e2-d858-57c5-ab9b-e6ca5bd20e43] to /home/groot/.julia/compiled/v1.0/IndexedTables/YIs33.ji.
Stacktrace:
[1] error(::String) at ./error.jl:33
[2] macro expansion at ./logging.jl:313 [inlined]
[3] compilecache(::Base.PkgId, ::String) at ./loading.jl:1184
[4] macro expansion at ./logging.jl:311 [inlined]
[5] _require(::Base.PkgId) at ./loading.jl:941
[6] require(::Base.PkgId) at ./loading.jl:852
[7] macro expansion at ./logging.jl:311 [inlined]
[8] require(::Module, ::Symbol) at ./loading.jl:834

julia> Pkg.status()
Status ~/.julia/environments/v1.0/Project.toml
[6e4b80f9] BenchmarkTools v0.4.1
[5ae59095] Colors v0.9.4
[34da2185] Compat v1.1.0
[a81c6b42] Compose v0.6.1
[8f4d0f93] Conda v1.0.1
[a0b5b9ef] Cxx v0.2.0
[d58978e5] Dagger v0.6.2
[5721bf48] DataVoyager v0.3.0
[f7f18e0c] GLFW v2.2.0
[d57b5e41] GLWindow v0.7.2
[92c85e6c] GSL v0.3.6
[c91e804a] Gadfly v0.8.0
[4c0ca9eb] Gtk v0.16.3
[cd3eb016] HTTP v0.6.14
[7073ff75] IJulia v1.11.1
[916415d5] Images v0.16.0
[6deec6e2] IndexedTables v0.7.4+ [~/.julia/dev/IndexedTables]
[c601a237] Interact v0.9.0
[4076af6c] JuMP v0.18.2
[a93385a2] JuliaDB v0.8.4
[ee78f7c6] Makie v0.9.0
[73a701b4] NamedTuples v5.0.0
[9b87118b] PackageCompiler v0.4.0
[91a5bcdd] Plots v0.20.2
[27ebfcd6] Primes v0.4.0
[438e738f] PyCall v1.18.4
[d330b81b] PyPlot v2.6.3
[612083be] Queryverse v0.1.0
[5d0f9de7] SerialPorts v0.1.0
[24249f21] SymPy v0.8.0
[0ae4a718] VegaDatasets v0.4.1
[0f1e0344] WebIO v0.3.4+ [~/.julia/dev/WebIO]
[37e2e46d] LinearAlgebra

julia> Pkg.update()
Updating registry at ~/.julia/registries/General
Updating git-repo https://github.com/JuliaRegistries/General.git
Resolving package versions...
Updating ~/.julia/environments/v1.0/Project.toml
[no changes]
Updating ~/.julia/environments/v1.0/Manifest.toml
[no changes]

julia> versioninfo()
Julia Version 1.0.0
Commit 5d4eaca0c9 (2018-08-08 20:58 UTC)
Platform Info:
OS: Linux (x86_64-pc-linux-gnu)
CPU: Intel(R) Core(TM) i7-3610QM CPU @ 2.30GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-6.0.0 (ORCJIT, ivybridge)

@usmcamp0811
Copy link

I've got the same problem...

@davidanthoff
Copy link
Contributor

IndexedTables.jl is not yet ported to julia 1.0, we'll just have to wait for that to work...

So either use julia 0.6 for now, or just avoid IndexedTables/JuliaDB on 1.0.

@Joel-Mckay
Copy link
Author

Unfortunately, I can confirm DataVoyager only supports v0.7.0+
IndexedTables and Cxx does indeed work in 0.6.4, but nothing else from the lecture series seems to be usable.

Thanks for the advice, and hopefully the Julia ecosystem can offer a way to avoid API contention caused by permuting Lexicons...

Cheers,
J

##############################################
#These install Julia v0.7.0 instructions were tested on Ubuntu 16.04 LTS
#Most of the notebook data visualization API is functional (not in 0.6.4 or 1.0.0)
#Sept 14, 2018

sudo apt-get -y install ipython ipython-notebook libedit-dev libncurses5-dev ffmpeg cmake xorg-dev
sudo pip install --upgrade pip
sudo easy_install pip
sudo pip install --upgrade pip
sudo pip install xlrd
sudo pip install jupyter
sudo pip install scipy
sudo pip install numpy

sudo apt-get install --reinstall python3-setuptools
sudo easy_install3 pip3
sudo pip3 install xlrd
sudo pip3 install scipy
sudo pip3 install numpy

#run program (setup user server paths)
jupyter notebook
Ctrl+C
Y (to exit)

sudo apt-get install build-essential libatomic1 python gfortran perl wget m4 cmake pkg-config npm nodejs-legacy
#upgrade to current node.js 10
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt-get install -y nodejs
sudo apt-get autoremove
sudo apt-get update
sudo apt-get upgrade

#install data-voyager for demos
npm init
npm update
npm install ajv
npm install webpack
npm install ajv-keywords
npm install css-loader
npm install sass-loader
npm install datavoyager
npm audit fix

#Legacy v0.4 in repo: sudo apt-get install julia julia-common julia-doc
sudo apt-mark hold julia
sudo apt-mark hold julia-common
sudo apt-mark hold julia-doc
sudo apt-get remove --purge julia julia-common julia-doc

#install from tar ball
wget https://julialang-s3.julialang.org/bin/linux/x64/0.7/julia-0.7.0-linux-x86_64.tar.gz
tar -xvf julia-0.7.0-linux-x86_64.tar.gz
sudo chown -R root:root julia-0.7.0/
cd julia-0.7.0/

#To Uninstall artifacts: purge cached user packages and notebook kernel
rm -fr .julia
rm -fr .julia_history
rm -fr .local/share/jupyter/kernels/julia-1.0

#install 0.7.0 binaries
sudo cp -r bin /usr/local/
sudo cp -r etc /usr/local/
sudo cp -r include /usr/local/
sudo cp -r lib /usr/local/
sudo cp -r share /usr/local/

sudo ln -s /usr/local/bin/julia /usr/bin/julia

#run to install libs needed in standard user lectures
julia
ENV["JUPYTER"]="jupyter"
ENV["is_apple"]=false
Pkg.add("IJulia")
Pkg.add("Colors")
Pkg.add("BenchmarkTools")
Pkg.add("Conda")
Pkg.add("PyCall")
Pkg.add("SymPy")
Pkg.add("Images")
Pkg.add("Primes")
Pkg.add("Compose")
Pkg.add("Gadfly")
Pkg.add("Interact")
Pkg.add("VegaDatasets")
Pkg.add("Dagger")
Pkg.add("JuliaDB")
Pkg.add("PyPlot")
Pkg.add("Compat")
Pkg.add("Makie")
Pkg.add("Plots")
Pkg.add("GLFW")
Pkg.add("JuMP")
Pkg.add("Gtk")
Pkg.add("HTTP")
Pkg.add("GLWindow")

Pkg.clone("https://github.com/shashi/WebIO.jl.git")
Pkg.build("WebIO")

Pkg.rm("MacroTools")
Pkg.clone("https://github.com/MikeInnes/MacroTools.jl.git")
Pkg.build("MacroTools")

Pkg.rm("DataVoyager")
Pkg.clone("https://github.com/queryverse/DataVoyager.jl.git")
Pkg.build("DataVoyager")

Pkg.add("Queryverse")
Pkg.add("PackageCompiler")
Pkg.add("SerialPorts")
Pkg.add("GSL")
Pkg.add("Mocha")
Pkg.add("SQLite")
Pkg.add("LibPQ")
Pkg.add("DataFrames")
Pkg.add("FileIO")
Pkg.add("Query")
Pkg.add("CSVFiles")
Pkg.add("Electron")
Pkg.add("IteratorInterfaceExtensions")
Pkg.add("TableTraits")
Pkg.add("DataValues")
Pkg.add("JSON")
Pkg.add("URIParser")
Pkg.add("VegaLite")

#NOTE: most of the tutorial will work, but not all of it.... ;-)
using Queryverse, VegaDatasets, DataVoyager

#By default, the web notebook "dashboard" opens in your home directory
#but you can open the dashboard in a different directory with notebook(dir="/some/path")
using IJulia; notebook(detached=true)

#note thread will continue after local shell quits
exit()

#Deprecated lib will Not work on 0.7.0:
"LoadError: TypeError: in Type{...} expression, expected UnionAll, got typeof(Base.Nullable)
"
#does not work above 0.6.4
#Pkg.rm("IndexedTables")
#Pkg.clone("https://github.com/JuliaComputing/IndexedTables.jl.git")
#Pkg.build("IndexedTables")

@simonbyrne
Copy link
Contributor

Should be fixed now by #182

@JuliaData JuliaData deleted a comment from Mabanya Jun 14, 2020
@JuliaData JuliaData deleted a comment from Mabanya Jun 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants