There must be something else going on here, Pkg.activate certainly does not mess with the registry for example. Can you provide some more information on what you actually did and what happened?
The full code of the Pluto header follows at the foot of this message. When I load and automatically run the file it throws out a
ERROR: UndefVarError: Pkg not defined.
as output of the Pkg.add command below, even though the kernel still appears to be processing the following:
begin
using Images
using ImageMagick
using Statistics
using LinearAlgebra
using ImageFiltering
end
I already tried to reinstall julia and delete the .julia directory but i still get the same error. Does this help to understand what is going on?
Thanks for your time
Header code:
### A Pluto.jl notebook ###
# v0.11.10
using Markdown
using InteractiveUtils
# This Pluto notebook uses @bind for interactivity. When running this notebook outside of Pluto, the following 'mock version' of @bind gives bound variables a default value (instead of an error).
macro bind(def, element)
quote
local el = $(esc(element))
global $(esc(def)) = Core.applicable(Base.get, el) ? Base.get(el) : missing
el
end
end
# โโโก 877df834-f078-11ea-303b-e98273ef98a4
begin
using Pkg
Pkg.activate(tempname())
end
# โโโก 0316b94c-eef6-11ea-19bc-dbc959901bb5
begin
using Images
using ImageMagick
using Statistics
using LinearAlgebra
using ImageFiltering
end
# โโโก fe19ad0a-ef04-11ea-1e5f-1bfcbbb51302
using PlutoUI
# โโโก e196fa66-eef5-11ea-2afe-c9fcb6c48937
# Poor man's Project.toml
Pkg.add(["Images",
"ImageMagick",
"PlutoUI",
"Hyperscript",
"ImageFiltering"])
# โโโก cb335074-eef7-11ea-24e8-c39a325166a1