ERROR: Unsatisfiable requirements detected for package Mux [a975b10e]: - error-handling

I am trying to install the PlotlyJS package, but I get the following error:
julia> Pkg.add("PlotlyJS")
Resolving package versions...
ERROR: Unsatisfiable requirements detected for package Mux [a975b10e]:
Mux [a975b10e] log:
├─possible versions are: 0.4.0-1.0.1 or uninstalled
├─restricted by compatibility requirements with HTTP [cd3eb016] to versions: 1.0.0-1.0.1 or uninstalled
│ └─HTTP [cd3eb016] log:
│ ├─possible versions are: 0.6.10-1.6.2 or uninstalled
│ ├─restricted to versions 1 by Genie [c43c736e], leaving only versions 1.0.0-1.6.2
│ │ └─Genie [c43c736e] log:
│ │ ├─possible versions are: 5.13.0 or uninstalled
│ │ └─Genie [c43c736e] is fixed to version 5.13.0
│ └─restricted by compatibility requirements with LoggingExtras [e6f89c97] to versions: [0.6.10-0.9.17, 1.5.4-1.6.2] or uninstalled, leaving only versions: 1.5.4-1.6.2
│ └─LoggingExtras [e6f89c97] log:
│ ├─possible versions are: 0.1.0-1.0.0 or uninstalled
│ └─restricted to versions 1 by Genie [c43c736e], leaving only versions 1.0.0
│ └─Genie [c43c736e] log: see above
└─restricted by compatibility requirements with Blink [ad839575] to versions: 0.7.0-0.7.6 — no versions left
└─Blink [ad839575] log:
├─possible versions are: 0.8.0-0.12.5 or uninstalled
└─restricted by compatibility requirements with Reexport [189a3867] to versions: 0.12.5 or uninstalled, leaving only versions: 0.12.5
└─Reexport [189a3867] log:
├─possible versions are: 0.2.0-1.2.2 or uninstalled
└─restricted to versions 1 by Genie [c43c736e], leaving only versions 1.0.0-1.2.2
└─Genie [c43c736e] log: see above
Stacktrace:
[1] propagate_constraints!(graph::Pkg.Resolve.Graph, sources::Set{Int64}; log_events::Bool)
# Pkg.Resolve /Applications/Julia-1.8.app/Contents/Resources/julia/share/julia/stdlib/v1.8/Pkg/src/Resolve/graphtype.jl:1072
[2] propagate_constraints! (repeats 2 times)
# /Applications/Julia-1.8.app/Contents/Resources/julia/share/julia/stdlib/v1.8/Pkg/src/Resolve/graphtype.jl:1008 [inlined]
[3] simplify_graph!(graph::Pkg.Resolve.Graph, sources::Set{Int64}; clean_graph::Bool)
# Pkg.Resolve /Applications/Julia-1.8.app/Contents/Resources/julia/share/julia/stdlib/v1.8/Pkg/src/Resolve/graphtype.jl:1533
[4] simplify_graph! (repeats 2 times)
# /Applications/Julia-1.8.app/Contents/Resources/julia/share/julia/stdlib/v1.8/Pkg/src/Resolve/graphtype.jl:1532 [inlined]
[5] resolve_versions!(env::Pkg.Types.EnvCache, registries::Vector{Pkg.Registry.RegistryInstance}, pkgs::Vector{Pkg.Types.PackageSpec}, julia_version::VersionNumber)
# Pkg.Operations /Applications/Julia-1.8.app/Contents/Resources/julia/share/julia/stdlib/v1.8/Pkg/src/Operations.jl:352
[6] targeted_resolve(env::Pkg.Types.EnvCache, registries::Vector{Pkg.Registry.RegistryInstance}, pkgs::Vector{Pkg.Types.PackageSpec}, preserve::Pkg.Types.PreserveLevel, julia_version::VersionNumber)
# Pkg.Operations /Applications/Julia-1.8.app/Contents/Resources/julia/share/julia/stdlib/v1.8/Pkg/src/Operations.jl:1254
[7] tiered_resolve(env::Pkg.Types.EnvCache, registries::Vector{Pkg.Registry.RegistryInstance}, pkgs::Vector{Pkg.Types.PackageSpec}, julia_version::VersionNumber)
# Pkg.Operations /Applications/Julia-1.8.app/Contents/Resources/julia/share/julia/stdlib/v1.8/Pkg/src/Operations.jl:1239
[8] _resolve(io::Base.TTY, env::Pkg.Types.EnvCache, registries::Vector{Pkg.Registry.RegistryInstance}, pkgs::Vector{Pkg.Types.PackageSpec}, preserve::Pkg.Types.PreserveLevel, julia_version::VersionNumber)
# Pkg.Operations /Applications/Julia-1.8.app/Contents/Resources/julia/share/julia/stdlib/v1.8/Pkg/src/Operations.jl:1260
[9] add(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}, new_git::Set{Base.UUID}; preserve::Pkg.Types.PreserveLevel, platform::Base.BinaryPlatforms.Platform)
# Pkg.Operations /Applications/Julia-1.8.app/Contents/Resources/julia/share/julia/stdlib/v1.8/Pkg/src/Operations.jl:1276
[10] add(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; preserve::Pkg.Types.PreserveLevel, platform::Base.BinaryPlatforms.Platform, kwargs::Base.Pairs{Symbol, Base.TTY, Tuple{Symbol}, NamedTuple{(:io,), Tuple{Base.TTY}}})
# Pkg.API /Applications/Julia-1.8.app/Contents/Resources/julia/share/julia/stdlib/v1.8/Pkg/src/API.jl:275
[11] add(pkgs::Vector{Pkg.Types.PackageSpec}; io::Base.TTY, kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
# Pkg.API /Applications/Julia-1.8.app/Contents/Resources/julia/share/julia/stdlib/v1.8/Pkg/src/API.jl:156
[12] add(pkgs::Vector{Pkg.Types.PackageSpec})
# Pkg.API /Applications/Julia-1.8.app/Contents/Resources/julia/share/julia/stdlib/v1.8/Pkg/src/API.jl:145
[13] #add#27
# /Applications/Julia-1.8.app/Contents/Resources/julia/share/julia/stdlib/v1.8/Pkg/src/API.jl:144 [inlined]
[14] add
# /Applications/Julia-1.8.app/Contents/Resources/julia/share/julia/stdlib/v1.8/Pkg/src/API.jl:144 [inlined]
[15] #add#26
# /Applications/Julia-1.8.app/Contents/Resources/julia/share/julia/stdlib/v1.8/Pkg/src/API.jl:143 [inlined]
[16] add(pkg::String)
# Pkg.API /Applications/Julia-1.8.app/Contents/Resources/julia/share/julia/stdlib/v1.8/Pkg/src/API.jl:143
[17] top-level scope
# REPL[18]:1
I am using Julia version 1.8.3:
julia> VERSION
v"1.8.3"
I tried using registry rm General like in this question "Unsatisfiable requirements detected for the package" in Julia, but that doesn't work. So I was wondering if anyone knows how to fix this error?

The answer you linked is unfortunately not very helpful for the majority of "unsatisfiable requirements detected" errors - as you can see there, the error is actually that no version of a package are being found, even thought the package has a number of releases. This is indeed indicative of a corrupt local package registry.
Your case however is different: multiple different versions for all packages in the error message are being found, so there clearly isn't an issue with the registry.
Your question is basically a duplicate of the question I answered here:
Julia "Unsatisfiable requirements detected for package" error when installing multiple packages
which is the more common scenario for "unsatisfiable requirements" issues: you actually have unsatisfiable requirements in the sense that you are trying to install a set of packages into an environment which require incompatible versions of shared dependencies.
However, your issue seems to have a slight twist compared to the linked question above, check out what happens when I do what I did in the other answer and install the packages you're trying to install here (PlotlyJS and Genie) into a new environment:
(#v1.8) pkg> activate --temp
Activating new project at `/tmp/jl_4HTNUi`
(jl_ox50Zr) pkg> add PlotlyJS Genie
Updating registry at `~/.julia/registries/General.toml`
Resolving package versions...
(...)
Updating `/tmp/jl_ox50Zr/Project.toml`
⌃ [c43c736e] + Genie v5.2.2
[f0f68f2c] + PlotlyJS v0.18.10
No error, the operation resolved successfully and I now have Genie installed alongside PlotlyJS. Based on the error message above and my answer in the linked question above, I would have expected this to error so what's going on?
The clue is in two things:
Note the little caret before the Genie entry in the Project.toml of the temporary environment above: ⌃ [c43c736e] + Genie v5.2.2 - this tells us that the Genie version installed is not the latest available version (a feature introduced in Julia 1.8); and
Note this additional bit of info in your error message:
│ │ └─Genie [c43c736e] log:
│ │ ├─possible versions are: 5.13.0 or uninstalled
│ │ └─Genie [c43c736e] is fixed to version 5.13.0
So the issue you're facing is not installing PlotlyJS and Genie per se, but rather adding PlotlyJS to an environment in which you specifically require Genie at version 0.5.13`. Let's confirm that that's the issue in a new temp environment:
(#v1.8) pkg> activate --temp
Activating new project at `/tmp/jl_4HTNUi`
(jl_4HTNUi) pkg> add PlotlyJS Genie#5.13
Updating registry at `~/.julia/registries/General.toml`
Resolving package versions...
ERROR: Unsatisfiable requirements detected for package Mux [a975b10e]:
Mux [a975b10e] log:
├─possible versions are: 0.4.0-1.0.1 or uninstalled
├─restricted by compatibility requirements with HTTP [cd3eb016] to versions: 1.0.0-1.0.1 or uninstalled
│ └─HTTP [cd3eb016] log:
│ ├─possible versions are: 0.6.10-1.6.2 or uninstalled
│ └─restricted by compatibility requirements with Genie [c43c736e] to versions: 1.0.0-1.6.2
│ └─Genie [c43c736e] log:
│ ├─possible versions are: 0.9.4-5.13.0 or uninstalled
│ └─restricted to versions 5.13 by an explicit requirement, leaving only versions 5.13.0
└─restricted by compatibility requirements with Blink [ad839575] to versions: 0.4.0-0.7.6 — no versions left
└─Blink [ad839575] log:
├─possible versions are: 0.8.0-0.12.5 or uninstalled
Which is a version of the error you're seeing. So indeed you are trying to do something that doesn't work: Genie 0.5.13 isn't compatible with PlotlyJS based on their respective dependencies, so you'll either have to work with an older Genie version, or a different plotting package, or change the compatibility bounds for PlotlyJS's dependencies to make things work (this is non-trivial, if you do so and things work you should consider making a PR upstream to allow everyone to access the updated version).

Related

`conda search PKG --info` shows different dependencies than what conda wants to install?

I'm building a new conda environment using python=3.9 for the
osx-arm64 architecture.
conda create -n py39 python=3.9 numpy
conda list
...
numpy 1.21.1 py39h1a24bff_2
...
python 3.9.7 hc70090a_1
So far so good: numpy=1.21.1 is the one i want. Now I want to add
scipy, and the first one seems to fit the bill:
conda search scipy --info
scipy 1.7.1 py39h2f0f56f_2
--------------------------
file name : scipy-1.7.1-py39h2f0f56f_2.conda
name : scipy
version : 1.7.1
build : py39h2f0f56f_2
build number: 2
size : 14.8 MB
license : BSD 3-Clause
subdir : osx-arm64
url : https://repo.anaconda.com/pkgs/main/osx-arm64/scipy-1.7.1-py39h2f0f56f_2.conda
md5 : edbd5a5399e973d1d0325147b7118f79
timestamp : 2021-08-25 16:12:39 UTC
dependencies:
- blas * openblas
- libcxx >=12.0.0
- libgfortran 5.*
- libgfortran5 >=11.1.0
- libopenblas >=0.3.17,<1.0a0
- numpy >=1.19.5,<2.0a0
- python >=3.9,<3.10.0a0
in particular, python >=3.9 and numpy >=1.19 seems just right.
but when i try the install
conda install scipy
...
The following packages will be DOWNGRADED:
numpy 1.21.1-py39h1a24bff_2 --> 1.19.5-py39habd9f23_3
(I have bumped into various constraints with numpy=1.19 (numba,
pandas,) and am trying to avoid it.)
Why isn't the scipy package happy with the numpy=1.21 version I
have?!
The only possible clue is that conda reports a different python
version (3.8.11) than the v3.9 I specified for this environment:
conda info
active environment : py39
active env location : .../miniconda3/envs/py39
shell level : 1
user config file : .../.condarc
populated config files : .../.condarc
conda version : 4.11.0
conda-build version : not installed
python version : 3.8.11.final.0 <-------------------
virtual packages : __osx=12.1=0
...
but all the environment's pointers seem to be set correctly:
(py39) % which python
.../miniconda3/envs/py39/bin/python
(py39) % python
Python 3.9.7 (default, Sep 16 2021, 23:53:23)
[Clang 12.0.0 ] :: Anaconda, Inc. on darwin
Thanks, any hints as to what's broken will be greatly appreciated!
I now have things working, but I'm afraid I can't point to a satisfying "answer." Others (eg #merv) seem to not be having the same problems and I can't identify the difference.
The one thing that I did find that seemed to create issues in my install was what seems to be some mislabeling of the pandas package: pandas v1.3.5 breaks a numpy==1.19.5 requirement that is the only way i've been able to push it thru. i posted a pandas issue comment

Install Julia behind proxy on my linux box

I am trying to install Julia on a linux box which is behind proxy. The installation of julia is quite easy, but the installation of modules is very exhausting.
I tried setting up https_proxy - Failed
sslVerify: false on git level - Failed
JULIA_SSL_NO_VERIFY and other variables like these - Failed.
.curlrc file with insecure in it - Failed.
searched for documentations about the libgit2 and not really helpful documents are available for this on the official page or on the internet.
Really fed up on this. Can someone help me on this please?
Error:
(v1.6) pkg> add IJulia
Installing known registries into ~/.julia
┌ Warning: could not download https://pkg.julialang.org/registries
└ # Pkg.Types /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Pkg/src/Types.jl:997
┌ Warning: could not download https://pkg.julialang.org/registries
└ # Pkg.Types /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Pkg/src/Types.jl:997
Cloning registry from "https://github.com/JuliaRegistries/General.git" ERROR: failed to clone from https://github.com/JuliaRegistries/General.git, error: GitError(Code:ERROR, Class:SSL, SSL error: 0xffff8e00 - SSL - An invalid SSL record was received)

screen fails on NetBSD, reporting "poll: Invalid argument"

I have installed and used screen many times on several different operating systems. Recently I installed it on a NetBSD-8.0 virtual machine.
$ sudo pkgin install screen
calculating dependencies...done.
1 package to install:
screen-4.8.0nb1
0 to refresh, 0 to upgrade, 1 to install
0B to download, 1098K to install
proceed ? [Y/n] Y
installing screen-4.8.0nb1...
screen-4.8.0nb1: setting permissions on /usr/pkg/bin/screen-4.8.0 (o=root, g=wheel, m=4511)
screen-4.8.0nb1: adding /usr/pkg/bin/screen to /etc/shells
screen-4.8.0nb1: registering info file /usr/pkg/info/screen.info
===========================================================================
$NetBSD: MESSAGE,v 1.5 2005/12/28 17:53:24 reed Exp $
[snip]
===========================================================================
pkg_install warnings: 0, errors: 0
reading local summary...
processing local summary...
marking screen-4.8.0nb1 as non auto-removable
However, when I went to use it, I got an immediate failure.
$ uname -mrs
NetBSD 8.0 amd64
$ ls -l /usr/pkg/bin/screen
lrwxr-xr-x 1 root wheel 12 Apr 6 02:50 /usr/pkg/bin/screen -> screen-4.8.0
$ groups
users wheel
$ screen
poll: Invalid argument
This problem persists even when I first remove, then reinstall the screen package. Any suggestions as to what's wrong?
My guess is that the system used to build binary packages for 8.0 (as of the 8.0_2020Q1 pkgsrc release) is no longer quite compatible with the NetBSD-8.0 release. It is likely running on a newer release, inside a chroot(8) sandbox.
I would recommend using NetBSD-9.0 instead, as that is the latest NetBSD release, or NetBSD-8.2, as that is the latest release in the netbsd-8 branch. Using the latest NetBSD and pkgsrc releases provides better coverage against unpatched vulnerabilities.
However, if you want to keep using NetBSD-8.0, you can get a working screen(1) from the 8.0_2019Q4 pkgsrc release. To have pkgin(1) pull from that release, edit the /usr/pkg/etc/pkgin/repositories.conf file to use this repository URL:
http://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/amd64/8.0_2019Q4/All
There is currently likely just one line in the file that is not commented out, and it points to a URL with just 8.0 in it (which on the server is a symbolic link to the latest pkgsrc release). Just replace that line, or comment it out and add the above line.
Then remove and re-install screen:
sudo pkgin remove screen && sudo pkgin install screen

Error Building TensorFlow in Julia,

Error: Error building `TensorFlow`:
│ ERROR: LoadError: UndefVarError: is_windows not defined
│ Stacktrace:
│ [1] top-level scope at none:0
│ [2] include at ./boot.jl:317 [inlined]
│ [3] include_relative(::Module, ::String) at ./loading.jl:1038
│ [4] include(::Module, ::String) at ./sysimg.jl:29
│ [5] include(::String) at ./client.jl:388
│ [6] top-level scope at none:0
│ in expression starting at
/home/amery/.julia/packages/TensorFlow/TizFt/deps/build.jl:13
└ # Pkg.Operations
/buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/Operations.jl:1068
When I build Mocha in Julia,I got is_apple not defined, some one told me this is because I did not install some module, but which module?
UndefVarError: is_windows not defined in practice means that the module has not been updated from Julia 0.6 to Julia 1.0 yet.
As of today I can recommend you to try Julia 0.7 (you will see some deprecation warnings but otherwise it should work) and wait a few weeks before installing Julia 1.0 for use with TensorFlow.jl.
Looking at this thread you can find it should be very soon:
https://github.com/malmaud/TensorFlow.jl/pull/419
This is a sign that the packages haven't updated for v1.0 yet. You either need to help them update their code or wait.

Unable to import matplotlib._png (pylab)

I am unable to import matplotlib._png:
import matplotlib._png as _png ImportError:
/home/james/opt/python/virtualenvs/work/lib/python2.7/site-packages/matplotlib-1.3.x-py2.7-linux-x86_64.egg/matplotlib/_png.so:
undefined symbol: png_set_longjmp_fn
This error prevents me from running import pylab (sincce this ultimately imports matplotlib._png).
I installed matplotlib from source, and made sure to add the path with local installations (/home/james/local) to basedir in setupext.py before running python setup.py install.
REQUIRED DEPENDENCIES AND EXTENSIONS
numpy: yes [version 1.7.1]
dateutil: yes [using dateutil version 2.1]
tornado: yes [using tornado version 3.0.1]
pyparsing: yes [using pyparsing version 1.5.7]
pycxx: yes [Couldn't import. Using local copy.]
libagg: yes [pkg-config information for 'libagg' could not
be found Using local copy.]
freetype: yes [version 16.0.10]
png: yes [version 1.2.10]
My research so far:
As can be seen above, matplotlib seems to find version 1.2.10 even though the version that I have under /home/james/local is 1.6.2:
$ find . -iname '*libpng*'
./libpng16.so.16.1.0
./libpng16.so
./libpng16.so.16
./libpng16.a
./libpng.a
./libpng.so
./libpng16.la
./pkgconfig/libpng.pc
./pkgconfig/libpng16.pc
./libpng.la
More specifically, I modified the following line in setupext.py with:
return basedir_map.get(sys.platform, ['/home/james/local', '/usr/local', '/usr'])
but matplotlib seems to have found the system version:
$ locate libpng
/usr/lib/libpng.so
/usr/lib/libpng.so.3
/usr/lib/libpng.so.3.10.0
/usr/lib/libpng12.a
/usr/lib/libpng12.so
/usr/lib/libpng12.so.0
/usr/lib/libpng12.so.0.10.0
Could this be the problem? Why am I unable to import matplotlib._png?
Update:
Looking at setupext.py, it looks like python setup install queries pkg-config through the SetupPackage method _check_for_pkg_config to determine the version of libpng I have installed. It turns out that pkg-config is returning the system installation:
$ pkg-config --libs libpng
-lpng12
even though I have updated basedir in matplotlib's setupext.py, and LD_LIBRARY_PATH to make them point to the the more recent version of libpng that I have locally installed.
Any ideas on how to have pkg-config return the right version?
It's a pkg-config issue; matplotlib's installation is (unfortunately, or perhaps not) relying too much on pkg-config's output.
Assuming you have build libpng the normal way, there should be a pkgconfig subdirectory in your /home/james/local/lib, which contains libpng.pc (and libpng16.pc). When setupext.py runs pkg-config, the latter should of course try and pick up the correct .pc file for libpng. For that, use the PKG_CONFIG_PATH variable and point it to the pkgconfig subdirectory:
$ export PKG_CONFIG_PATH=/home/james/local/lib/pkgconfig
Then, install matplotlib again, and see that it now finds the correct libpng version:
$ python setup.py build
basedirlist is: ['/usr/local', '/usr']
============================================================================
BUILDING MATPLOTLIB
matplotlib: 1.1.0
python: 2.7.4 (default, Apr 8 2013, 16:36:47) [GCC 4.4.5]
platform: linux2
REQUIRED DEPENDENCIES
numpy: 1.7.0
freetype2: 12.0.6
OPTIONAL BACKEND DEPENDENCIES
libpng: 1.6.1
Tkinter: Tkinter: 81008, Tk: 8.4, Tcl: 8.4
(For me, with a different PKG_CONFIG_PATH of course. Yes, I may want to upgrade some dependencies.)
Note that I didn't even alter basedirlist; it's just at its default.
In case pkg-config fails to now pick up some other package, just add more directories to PKG_CONFIG_PATH with colons in between. But I guess this should be enough.
Try
export LD_LIBRARY_PATH=/home/james/local/lib
and then execute Matplotlib... that would point matplotlib to your local version.