ERROR: LoadError: ArgumentError: Package FixConda does not have Pkg in its dependencies

Hello, I’m trying to install a package using

Pkg.add(PackageSpec(url="https://bitbucket.org/etjekant/fixconda/src/master/"))

Which yields the following error:

ERROR: LoadError: ArgumentError: Package FixConda does not have Pkg in its dependencies:

  • You may have a partially installed environment. Try Pkg.instantiate()
    to ensure all packages in the environment are installed.
  • Or, if you have FixConda checked out for development and have
    added Pkg as a dependency but haven’t updated your primary
    environment’s manifest file, try Pkg.resolve().
  • Otherwise you may need to report an issue with FixConda

I have seen answers when people have this issue with their own code, but I try to install a package. How can I install this package? Thanks in advance.

1 Like

The package tries to import other packages without declaring them as dependencies, so it’s broken and can’t be installed until it’s fixed.

Hi, and welcome to the Julia community!

The proper solution is indeed to get the maintainer to update the package. But if you just want a workaround, you could dev it and fix it yourself:

using Pkg
# If necessary, first switch to the environment you want to use FixConda in: Pkg.activate("...")
Pkg.develop(PackageSpec(url="https://bitbucket.org/etjekant/fixconda/src/master/"))

Pkg.activate("(...)/.julia/dev/FixConda")  # adjust to path to Julia (when working in the REPL, Pkg.activate("FixConda") might also work)
Pkg.add("Pkg")  # If it tries precompiling now, it still fails
Pkg.update("CSV")  # Precompilation should work

Pkg.activate("...")  # Switch back to the original env
Pkg.resolve()

using FixConda

Thank you, with ‘path’ do you mean the path that you get when you type ‘where julia’ in cmd? Because that results in a StackOverflowError. Same for Pkg.activate(“FixConda”).

Oh, my bad, that was quite unclear. I didn’t mean the path of the Julia executable (or of a symlink pointing to it), but the Julia directory, normally C:\Users\<username>\.julia on Windows, /home/<username>/.julia on Linux.