PhysicalConstants package with Julia




I’ve been using thePhysicalConstants.jl package for some time now, and greatly appreciate the ability to define CGS or MKS units. We use CGS units in astrophysics.

The PhysicalConstants package was developed about 3 years ago - I think Julia was in beta? I’ve been able to install and use it up to Julia 1.0.1.

However, I can’t seem to install it with Julia Is there a way around this error? Also, I would appreciate any recommendations for similar packages.

package installation issue: julia 1.0.1 (pro)
Julia 1.0.2 after installed JuliaPro

That package seems to be abandoned, however there is another package with the same name that is still under active development:

This new package fully hooks into the Unitful.jl ecosystem, so it should be possible to convert the constants into whichever unit system suits you best.


My download experience for Unitful:

Press Enter to start Julia.
Starting Julia...
   _       _ _(_)_     |  Documentation:
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.0.1 (2018-09-29)
 _/ |\__'_|_|_|\__'_|  |  Official release
|__/                   |

(JuliaPro_v1.0.1.1) pkg> st
    Status `J:\JuliaPro-\pkgs-\environments\JuliaPro_v1.0.1.1\Project.toml`
  [c52e3926] Atom v0.7.6
  [682c06a0] JSON v0.19.0
  [e5e0dc1b] Juno v0.5.3

(JuliaPro_v1.0.1.1) pkg> add Unitful
  Updating registry at `J:\JuliaPro-\pkgs-\registries\JuliaPro`
  Updating git-repo ``
ERROR: The following package names could not be resolved:
 * Unitful (not found in project, manifest or registry)
Please specify by known `name=uuid`.

(JuliaPro_v1.0.1.1) pkg>



Windows 10 - x64


Apparently JuliaPro does not come with the General package registry, so you only have access to a subset of packages.


Yes, JuliaRun uses a smaller registry of supported packages. We do need to

a) document this better
b) document the list of packages
c) document a way to switching to the General registry.

All of this is forthcoming. Apologies for the trouble, but we wanted to get the bits out while we round out the documentation around it.



Unsatisfiable requirements detected. And now?

Where does the Julia Computing registry live?


So can I change the Julia_Pkg_Server in JuliaPro?


It appears that you can switch to the General registry in JuliaPro by deleting the following folder:


Next time you use add <package> it will clone the General registry before attempting to install the requested package.


It really, really, really, really would be a good idea to flag the specialist package registry to Juliapro users. I have just spent half a day wondering what had gone wrong.

I am a bit bewildered as to what the logic for a different registry is?


Everytime I see the headline Julia I think there has been a new minor-minor release of Julia. Then I realize it’s just JuliaPro.


We do want JuliaPro to track the version of Julia it is bundled with, but yet also have something distinguish it from base Julia. Hence the slightly longer version number. But I’m happy to hear suggestions of doing that better – I realise four digits makes it a bit too long and awkward.


In Debian they use x.y.z-r, where x.y.z is the version of the unmodified upstream package, r is the Debian revision: 1.0.1-1. The - in place of the . makes it a bit clearer the difference. Another option, always stolen from Debian packages naming, is to append “+pro” and then the revision number: 1.0.1+pro1. A bit more verbose, but unambiguous.

What is nice is that, contrary to, both 1.0.1-1 and 1.0.1+pro1 are valid VersionNumber:

julia> dump(v"1.0.1-1")
  major: UInt32 0x00000001
  minor: UInt32 0x00000000
  patch: UInt32 0x00000001
  prerelease: Tuple{UInt64}
    1: UInt64 0x0000000000000001
  build: Tuple{} ()

julia> dump(v"1.0.1+pro1")
  major: UInt32 0x00000001
  minor: UInt32 0x00000000
  patch: UInt32 0x00000001
  prerelease: Tuple{} ()
  build: Tuple{String}
    1: String "pro1"

julia> dump(v"")
ERROR: LoadError: ArgumentError: invalid version string:
 [1] VersionNumber(::String) at ./version.jl:111
 [2] @v_str(::LineNumberNode, ::Module, ::Any) at ./version.jl:138
in expression starting at REPL[10]:100: