JuliaPy / Conda.jl

Conda managing Julia binary dependencies
Other
174 stars 57 forks source link

Cannot downgrade Python: operation not permitted #150

Closed aterenin closed 5 years ago

aterenin commented 5 years ago

Conda.jl is unable to downgrade Python, which is required for some packages. Causes an upstream build issue for TensorFlow.jl

https://github.com/malmaud/TensorFlow.jl/issues/500

ERROR conda.core.link:_execute(568): An error occurred while uninstalling package 'defaults::python.app-2-py37_9'.
PermissionError(1, 'Operation not permitted')
Attempting to roll back.

Rolling back transaction: ...working... done

[Errno 1] Operation not permitted: '/Users/aterenin/.julia/conda/3/python.app/Contents/PkgInfo' -> '/Users/aterenin/.julia/conda/3/python.app/Contents/PkgInfo.c~'

Seems to be caused by the following.

  numpy                               1.16.2-py37hacdab7b_0 --> 1.16.2-py36hacdab7b_0
  numpy-base                          1.16.2-py37h6575580_0 --> 1.16.2-py36h6575580_0
  python                                   3.7.1-haf84260_7 --> 3.6.8-haf84260_0
tkf commented 5 years ago

I can install TensorFlow.jl in a fresh Julia environment in Linux (checked with docker run -i -t --rm julia julia --color=yes -e 'run(`apt-get update`); run(`apt-get install -qq bzip2`); ENV["PYTHON"] = ""; using Pkg; pkg"add TensorFlow"'). So, this could be macOS-specific issue in conda the Python program, not Conda.jl. You can check it if conda works with something like this (untested):

source ~/.julia/conda/3/etc/profile.d/conda.sh
conda install -c conda-forge tensorflow==1.12
aterenin commented 5 years ago

I don't know what the problem was, but after updating the TensorFlow Python version to 1.13.1 in TensorFlow.jl, this issue no longer occurs.