I released a package, and now it stopped building

package

#1

I just released the package ASDF.jl. I was using it in another project by pointing to its Github repository, and this worked fine. Now that it has been released (without any other changes), it doesn’t build any more.

The error is:

(HelloWorld) pkg> build ASDF
  Building ASDF → `~/.julia/packages/ASDF/6FkAs/deps/build.log`
┌ Error: Error building `ASDF`: 
│ ERROR: LoadError: ArgumentError: Package PyCall not found in current path:
│ - Run `import Pkg; Pkg.add("PyCall")` to install the PyCall package.

The PyCall package is definitively listed in ASDF’s Project.toml:

name = "ASDF"
uuid = "c960a2f4-9f0f-11e8-3f7c-470e5e0ab716"
authors = ["Erik Schnetter <schnetter@gmail.com>"]
version = "1.0.1"

[deps]
Conda = "8f4d0f93-b110-5947-807f-2305c1781a2d"
PyCall = "438e738f-606a-5dbb-bf0a-cddfbfd45ab0"
URIParser = "30578b45-9adc-5946-b283-645ec420af67"

[extras]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Test"]

What could be wrong?

-erik


#2

Unfortunately, correct REQUIRE files are still needed until the transition to only using Project files is complete. So you would need to add PyCall & co to your REQUIRE file and tag a new version


#3

I seem to hit the same (or similar) issue with installing PyPlot:

(v1.0) pkg> add PyPlot
 Resolving package versions...
 Installed LaTeXStrings ─ v1.0.3
 Installed PyPlot ─────── v2.6.3
 Installed PyCall ─────── v1.18.4
  Updating `~/.julia/environments/v1.0/Project.toml`
  [d330b81b] + PyPlot v2.6.3
  Updating `~/.julia/environments/v1.0/Manifest.toml`
  [b964fa9f] + LaTeXStrings v1.0.3
  [1914dd2f] + MacroTools v0.4.4
  [438e738f] + PyCall v1.18.4
  [d330b81b] + PyPlot v2.6.3
  Building PyCall → `~/.julia/packages/PyCall/rUul9/deps/build.log`

julia> using PyCall
ERROR: ArgumentError: Package PyCall not found in current path:
- Run `import Pkg; Pkg.add("PyCall")` to install the PyCall package.

Manually adding PyCall fixes it:

julia> using Pkg

julia> Pkg.add("PyCall")
  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`
  [438e738f] + PyCall v1.18.4
  Updating `~/.julia/environments/v1.0/Manifest.toml`
 [no changes]

julia> using PyCall

julia> 

I’m on julia 1.0.1 macOS.


#4

No, that is very much intended. Add the package you want to use, don’t rely on other packages bringing them in as a side effect (maybe in the future they won’t depend on them anymore).


#5

I don’t need PyCall directly. The point is that PyPlot didn’t work without me adding PyCall manually.
But that might be because I was in an IJulia session instead of the REPL? I’ll try to reproduce


#6

Meanwhile here’s the IJulia output:

using Plots
pyplot()
┌ Info: Precompiling PyPlot [d330b81b-6aea-500a-939a-2ce795aea3ee]
└ @ Base loading.jl:1189
┌ Info: Installing matplotlib via the Conda matplotlib package...
└ @ PyCall /Users/ken/.julia/packages/PyCall/rUul9/src/PyCall.jl:653
┌ Info: Running `conda install -y matplotlib` in root environment
└ @ Conda /Users/ken/.julia/packages/Conda/hsaaN/src/Conda.jl:112

Solving environment: ...working... done

matplotlib-3.0.0     | 6.8 MB    | ########## | 100% 
cycler-0.10.0        | 14 KB     | ########## | 100% 
pyparsing-2.2.2      | 97 KB     | ########## | 100% 
pytz-2018.5          | 231 KB    | ########## | 100% 
kiwisolver-1.0.1     | 56 KB     | ########## | 100% 
freetype-2.9.1       | 864 KB    | #######5   |  76% 


## Package Plan ##

  environment location: /Users/ken/.julia/packages/Conda/hsaaN/deps/usr

  added / updated specs: 
    - matplotlib


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    matplotlib-3.0.0           |   py37h54f8f79_0         6.8 MB
    cycler-0.10.0              |           py37_0          14 KB
    pyparsing-2.2.2            |           py37_0          97 KB
    pytz-2018.5                |           py37_0         231 KB
    kiwisolver-1.0.1           |   py37h0a44026_0          56 KB
    freetype-2.9.1             |       hb4e5f40_0         864 KB
    ------------------------------------------------------------
                                           Total:         8.0 MB

The following NEW packages will be INSTALLED:

    cycler:     0.10.0-py37_0       
    freetype:   2.9.1-hb4e5f40_0    
    kiwisolver: 1.0.1-py37h0a44026_0
    matplotlib: 3.0.0-py37h54f8f79_0
    pyparsing:  2.2.2-py37_0        
    pytz:       2018.5-py37_0       


Downloading and Extracting Packages
Preparing transaction: ...working... 

freetype-2.9.1       | 864 KB    | ########## | 100% 

done
Verifying transaction: ...working... done
Executing transaction: ...working... done


Fontconfig warning: ignoring UTF-8: not a valid region tag

ArgumentError: Package PyCall not found in current path:
- Run `import Pkg; Pkg.add("PyCall")` to install the PyCall package.


Stacktrace:
 [1] require(::Module, ::Symbol) at ./loading.jl:820
 [2] top-level scope at /Users/ken/.julia/packages/Plots/7o1Vu/src/backends.jl:389
 [3] eval at ./boot.jl:319 [inlined]
 [4] _initialize_backend(::Plots.PyPlotBackend) at /Users/ken/.julia/packages/Plots/7o1Vu/src/backends.jl:388
 [5] backend(::Plots.PyPlotBackend) at /Users/ken/.julia/packages/Plots/7o1Vu/src/backends.jl:196
 [6] backend(::Symbol) at /Users/ken/.julia/packages/Plots/7o1Vu/src/backends.jl:209
 [7] pyplot() at /Users/ken/.julia/packages/Plots/7o1Vu/src/backends.jl:29
 [8] top-level scope at In[10]:2

EDIT: if this is another issue and I’m hijacking this thread, apologies and please split into a new one
EDIT2: I can only replicate on the REPL with Plots, not PyPlot directly:

               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.0.1 (2018-09-29)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

(v1.0) pkg> add IJulia
   Cloning default registries into /Users/ken/.julia/registries
   Cloning registry General from "https://github.com/JuliaRegistries/General.git"
  Updating registry at `~/.julia/registries/General`
  Updating git-repo `https://github.com/JuliaRegistries/General.git`
 Resolving package versions...
 Installed SoftGlobalScope ─ v1.0.7
 Installed JSON ──────────── v0.19.0
 Installed Compat ────────── v1.2.0
 Installed ZMQ ───────────── v1.0.0
 Installed BinaryProvider ── v0.5.1
 Installed IJulia ────────── v1.13.0
 Installed MbedTLS ───────── v0.6.3
 Installed VersionParsing ── v1.1.3
 Installed Conda ─────────── v1.0.2
  Updating `~/.julia/environments/v1.0/Project.toml`
  [7073ff75] + IJulia v1.13.0
  Updating `~/.julia/environments/v1.0/Manifest.toml`
  [b99e7846] + BinaryProvider v0.5.1
  [34da2185] + Compat v1.2.0
  [8f4d0f93] + Conda v1.0.2
  [7073ff75] + IJulia v1.13.0
  [682c06a0] + JSON v0.19.0
  [739be429] + MbedTLS v0.6.3
  [b85f4697] + SoftGlobalScope v1.0.7
  [81def892] + VersionParsing v1.1.3
  [c2297ded] + ZMQ v1.0.0
  [2a0f44e3] + Base64
  [ade2ca70] + Dates
  [8bb1440f] + DelimitedFiles
  [8ba89e20] + Distributed
  [7b1f6079] + FileWatching
  [b77e0a4c] + InteractiveUtils
  [76f85450] + LibGit2
  [8f399da3] + Libdl
  [37e2e46d] + LinearAlgebra
  [56ddb016] + Logging
  [d6f4376e] + Markdown
  [a63ad114] + Mmap
  [44cfe95a] + Pkg
  [de0858da] + Printf
  [3fa0cd96] + REPL
  [9a3f8284] + Random
  [ea8e919c] + SHA
  [9e88b42a] + Serialization
  [1a1011a3] + SharedArrays
  [6462fe0b] + Sockets
  [2f01184e] + SparseArrays
  [10745b16] + Statistics
  [8dfed614] + Test
  [cf7118a7] + UUIDs
  [4ec0a83e] + Unicode
  Building Conda ──→ `~/.julia/packages/Conda/hsaaN/deps/build.log`
  Building ZMQ ────→ `~/.julia/packages/ZMQ/ABGOx/deps/build.log`
  Building MbedTLS → `~/.julia/packages/MbedTLS/mkHpa/deps/build.log`
  Building IJulia ─→ `~/.julia/packages/IJulia/0cLgR/deps/build.log`

(v1.0) pkg> add PyPlot
 Resolving package versions...
 Installed LaTeXStrings ────── v1.0.3
 Installed Reexport ────────── v0.2.0
 Installed PyPlot ──────────── v2.6.3
 Installed FixedPointNumbers ─ v0.5.3
 Installed MacroTools ──────── v0.4.4
 Installed PyCall ──────────── v1.18.5
 Installed ColorTypes ──────── v0.7.5
 Installed Colors ──────────── v0.9.4
  Updating `~/.julia/environments/v1.0/Project.toml`
  [d330b81b] + PyPlot v2.6.3
  Updating `~/.julia/environments/v1.0/Manifest.toml`
  [3da002f7] + ColorTypes v0.7.5
  [5ae59095] + Colors v0.9.4
  [53c48c17] + FixedPointNumbers v0.5.3
  [b964fa9f] + LaTeXStrings v1.0.3
  [1914dd2f] + MacroTools v0.4.4
  [438e738f] + PyCall v1.18.5
  [d330b81b] + PyPlot v2.6.3
  [189a3867] + Reexport v0.2.0
  Building PyCall → `~/.julia/packages/PyCall/0jMpb/deps/build.log`

julia> using PyPlot
[ Info: Precompiling PyPlot [d330b81b-6aea-500a-939a-2ce795aea3ee]
[ Info: Installing matplotlib via the Conda matplotlib package...
[ Info: Running `conda install -y matplotlib` in root environment
Solving environment: done

## Package Plan ##

  environment location: /Users/ken/.julia/packages/Conda/hsaaN/deps/usr

  added / updated specs:
    - matplotlib


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    matplotlib-3.0.0           |   py37h54f8f79_0         6.8 MB
    freetype-2.9.1             |       hb4e5f40_0         864 KB
    cycler-0.10.0              |           py37_0          14 KB
    pyparsing-2.2.2            |           py37_0          97 KB
    pytz-2018.5                |           py37_0         231 KB
    kiwisolver-1.0.1           |   py37h0a44026_0          56 KB
    ------------------------------------------------------------
                                           Total:         8.0 MB

The following NEW packages will be INSTALLED:

    cycler:     0.10.0-py37_0
    freetype:   2.9.1-hb4e5f40_0
    kiwisolver: 1.0.1-py37h0a44026_0
    matplotlib: 3.0.0-py37h54f8f79_0
    pyparsing:  2.2.2-py37_0
    pytz:       2018.5-py37_0


Downloading and Extracting Packages
matplotlib-3.0.0     | 6.8 MB    | ######################################################################################################################################## | 100%
freetype-2.9.1       | 864 KB    | ######################################################################################################################################## | 100%
cycler-0.10.0        | 14 KB     | ######################################################################################################################################## | 100%
pyparsing-2.2.2      | 97 KB     | ######################################################################################################################################## | 100%
pytz-2018.5          | 231 KB    | ######################################################################################################################################## | 100%
kiwisolver-1.0.1     | 56 KB     | ######################################################################################################################################## | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done

julia> using Plots
ERROR: ArgumentError: Package Plots not found in current path:
- Run `import Pkg; Pkg.add("Plots")` to install the Plots package.

Stacktrace:
 [1] require(::Module, ::Symbol) at ./loading.jl:820

(v1.0) pkg> add Plots
 Resolving package versions...
 Installed NaNMath ──────────── v0.3.2
 Installed SortingAlgorithms ── v0.3.1
 Installed OrderedCollections ─ v1.0.2
 Installed StaticArrays ─────── v0.8.3
 Installed Plots ────────────── v0.20.5
 Installed PlotUtils ────────── v0.5.5
 Installed PlotThemes ───────── v0.3.0
 Installed Showoff ──────────── v0.2.1
 Installed Missings ─────────── v0.3.1
 Installed Measures ─────────── v0.3.0
 Installed Requires ─────────── v0.5.2
 Installed DataStructures ───── v0.14.0
 Installed Contour ──────────── v0.5.1
 Installed StatsBase ────────── v0.25.0
 Installed RecipesBase ──────── v0.6.0
 Installed GR ───────────────── v0.34.1
  Updating `~/.julia/environments/v1.0/Project.toml`
  [91a5bcdd] + Plots v0.20.5
  Updating `~/.julia/environments/v1.0/Manifest.toml`
  [d38c429a] + Contour v0.5.1
  [864edb3b] + DataStructures v0.14.0
  [28b8d3ca] + GR v0.34.1
  [442fdcdd] + Measures v0.3.0
  [e1d29d7a] + Missings v0.3.1
  [77ba4419] + NaNMath v0.3.2
  [bac558e1] + OrderedCollections v1.0.2
  [ccf2f8ad] + PlotThemes v0.3.0
  [995b91a9] + PlotUtils v0.5.5
  [91a5bcdd] + Plots v0.20.5
  [3cdcf5f2] + RecipesBase v0.6.0
  [ae029012] + Requires v0.5.2
  [992d4aef] + Showoff v0.2.1
  [a2af1166] + SortingAlgorithms v0.3.1
  [90137ffa] + StaticArrays v0.8.3
  [2913bbd2] + StatsBase v0.25.0
  Building GR ───→ `~/.julia/packages/GR/joQgG/deps/build.log`
  Building Plots → `~/.julia/packages/Plots/7o1Vu/deps/build.log`

julia> using Plots

julia> pyplot()
ERROR: ArgumentError: Package PyCall not found in current path:
- Run `import Pkg; Pkg.add("PyCall")` to install the PyCall package.

Stacktrace:
 [1] require(::Module, ::Symbol) at ./loading.jl:820
 [2] top-level scope at /Users/ken/.julia/packages/Plots/7o1Vu/src/backends.jl:389
 [3] eval at ./boot.jl:319 [inlined]
 [4] _initialize_backend(::Plots.PyPlotBackend) at /Users/ken/.julia/packages/Plots/7o1Vu/src/backends.jl:388
 [5] backend(::Plots.PyPlotBackend) at /Users/ken/.julia/packages/Plots/7o1Vu/src/backends.jl:196
 [6] backend(::Symbol) at /Users/ken/.julia/packages/Plots/7o1Vu/src/backends.jl:209
 [7] pyplot() at /Users/ken/.julia/packages/Plots/7o1Vu/src/backends.jl:29
 [8] top-level scope at none:0

#7

Well what you wrote was

julia> using PyCall
ERROR: ArgumentError: Package PyCall not found in current path:

which is using PyCall, not PyPlot.

Anyway, the error message you showed now is a bug in Plots.jl (https://github.com/JuliaPlots/Plots.jl/blob/d3e1a423fde038f9212d263bb0a3133839e6e3f6/src/backends.jl#L389-L390).


#8

Indeed, this seems to be a known issue with Plots, as mentioned in another thread.

Because this happened during after a package build and gave the same PyCall error, I thought this might be related to the original issue, but it probably isn’t. Don’t mind me then, carry on :slight_smile:


#9

Thanks, this solved my problem.

-erik