Prevent inadvertent Conda ROOTENV initialization

Conda._installed_packages_dict() always runs Conda._install_conda(),
even when using an external conda installation (e.g. via Anaconda).
This commit is contained in:
Oliver Schulz 2017-04-18 17:46:38 +02:00
parent 1ee6affcb3
commit 6b250d1ab6

View File

@ -89,6 +89,7 @@ function _initialize_backend(::PyPlotBackend)
@eval begin @eval begin
# avoid Conda update that causes Segfault with qt >=4.8.6 on Ubuntu https://github.com/JuliaPy/PyPlot.jl/issues/234 # avoid Conda update that causes Segfault with qt >=4.8.6 on Ubuntu https://github.com/JuliaPy/PyPlot.jl/issues/234
import Conda import Conda
if isfile(Conda.conda) # Using Conda-internal conda (instead of an external conda)
kw = Conda._installed_packages_dict() kw = Conda._installed_packages_dict()
if (!haskey(kw,"qt") || (qt_version=get(kw,"qt",0)[1]!=v"4.8.5")) if (!haskey(kw,"qt") || (qt_version=get(kw,"qt",0)[1]!=v"4.8.5"))
print("\n If the code has a Segmentation fault error switch to qt v4.8.5 by pasting the following code into julia: \n \n") print("\n If the code has a Segmentation fault error switch to qt v4.8.5 by pasting the following code into julia: \n \n")
@ -96,6 +97,7 @@ function _initialize_backend(::PyPlotBackend)
end end
end end
end end
end
# we don't want every command to update the figure # we don't want every command to update the figure
PyPlot.ioff() PyPlot.ioff()
end end