General registry for newbies

I know this is utter newbie but can someone explain to me why

Pkg.activate(mktempdir())

results in my general registry being cancelled and having to wait 10 mins for all the packages to be downloaded again?

thanks and apologies for the utter baseness of this question

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?

1 Like

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

Not really , but looks like a Pluto bug, so you should probably report it to https://github.com/fonsp/Pluto.jl/issues/new

1 Like

fab. thanks