ADCME.jl
ADCME.jl copied to clipboard
ADCME.jl stuck on Tensorflow Installation [MacOS]
Hi,
I have been struggling with the installation of ADCME.jl
for almost an entire afternoon, when I found in ADSeismic.jl
that it may take up to 20 min. So, I let the installation run with build and the verbose flag. It turns out I can't get past the TensorFlow Library building.
I'm using a clean installation of Julia 1.5.2 (rm -rf ~/.julia
) and then
using Pkg
Pkg.add("ADCME"; verbose = true)
The build log is pasted below
Thanks!
Lucas
PS: I ended cancelling the installation a bunch of times since I always thought "it can't take thaat long". I even cleared out my entire Julia
because I thought I had some old package that didn't install correctly! It would be nice, if it said how long the installation approximately takes since it's longer than the average Julia package!
Verbose Build Output
julia> Pkg.build("ADCME"; verbose = true)
Building Conda ─→ `~/.julia/packages/Conda/x5ml4/deps/build.log`
Building PyCall → `~/.julia/packages/PyCall/BcTLp/deps/build.log`
┌ Info: No system-wide Python was found; got the following error:
│ Base.IOError("could not spawn setenv(`/Users/lucassawade/.julia/adcme/bin/python -c \"import distutils.sysconfig; print(distutils.sysconfig.get_config_var('VERSION'))\"`,[\"CLICOLOR=true\", \"LSCOLORS=Exfxbxdxcxegedabagacad\", \"PATH=/Users/lucassawade/anaconda3/condabin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/usr/local/munki:/opt/X11/bin:/Library/Apple/usr/bin:/Applications/MATLAB_R2018a.app/bin/:/Users/lucassawade/GCMT/sod-3.2.8/bin:/Users/lucassawade/SeisFunc:/Users/lucassawade/MERMAID/bin:/Library/Frameworks/Python.framework/Versions/3.7/bin:/Users/lucassawade/.lisp\", \"XPC_FLAGS=0x0\", \"PWD=/Users/lucassawade\", \"_CE_M=\", \"DISPLAY=/private/tmp/com.apple.launchd.1l6jvW3OkT/org.macosforge.xquartz:0\", \"XPC_SERVICE_NAME=0\", \"TERM_PROGRAM=Apple_Terminal\", \"CONDA_PYTHON_EXE=/Users/lucassawade/anaconda3/bin/python\", \"SHELL=/bin/zsh\", \"__CF_USER_TEXT_ENCODING=0x1F7:0x0:0x0\", \"OPENBLAS_NUM_THREADS=8\", \"TMPDIR=/tmp\", \"LANG=en_US.UTF-8\", \"SHLVL=1\", \"LOGNAME=lucassawade\", \"LaunchInstanceID=90707609-3965-4587-9644-28C8B912CE67\", \"TERM_SESSION_ID=17331E03-9DD4-4875-9ED9-2EAE266DE14A\", \"SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.u9QlMRcDar/Listeners\", \"PYTHONSTARTUP=/Users/lucassawade/OneDrive/Python/lwsspy/startupfiles/python.py\", \"JULIA_LOAD_PATH=@:/tmp/jl_LHEUZA\", \"_=/Applications/Julia-1.5.app/Contents/Resources/julia/bin/julia\", \"_CE_CONDA=\", \"USER=lucassawade\", \"CONDA_SHLVL=0\", \"PROMPT_COMMAND=ps1; echo -ne \\\"\\\\033]0;\\\${USER}@\\\${HOSTNAME}: \\\${PWD}\\\\007\\\"\", \"SECURITYSESSIONID=186a8\", \"CONDA_EXE=/Users/lucassawade/anaconda3/bin/conda\", \"TERM=xterm-256color\", \"HOME=/Users/lucassawade\", \"TERM_PROGRAM_VERSION=433\", \"OPENBLAS_MAIN_FREE=1\", \"PYTHONIOENCODING=UTF-8\"]): no such file or directory (ENOENT)", -2)
└ using the Python distribution in the Conda package
[ Info: Running `conda install -y numpy` in root environment
Collecting package metadata (current_repodata.json): done
Solving environment: done
# All requested packages already installed.
[ Info: PyCall is using /Users/lucassawade/.julia/conda/3/bin/python (Python 3.8.5) at /Users/lucassawade/.julia/conda/3/bin/python, libpython = /Users/lucassawade/.julia/conda/3/lib/libpython3.8.dylib
[ Info: /Users/lucassawade/.julia/packages/PyCall/BcTLp/deps/deps.jl has been updated
[ Info: /Users/lucassawade/.julia/prefs/PyCall has been updated
Building CMake ─→ `~/.julia/packages/CMake/ULbyn/deps/build.log`
Building HDF5 ──→ `~/.julia/packages/HDF5/YX0jU/deps/build.log`
Building FFTW ──→ `~/.julia/packages/FFTW/DMUbN/deps/build.log`
Building ADCME ─→ `~/.julia/packages/ADCME/x8M7v/deps/build.log`
┌ Warning: Pkg.installed() is deprecated
└ @ Pkg /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/Pkg/src/Pkg.jl:554
┌ Warning: Pkg.installed() is deprecated
└ @ Pkg /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/Pkg/src/Pkg.jl:554
[ Info: Your Julia version is 1.5.3, current ADCME version is 0.6.6, ADCME dependencies installation path: /Users/lucassawade/.julia/adcme
[ Info: --------------- (1/6) Install Tensorflow Dependencies ---------------
[ Info: Installing miniconda...
PREFIX=/Users/lucassawade/.julia/adcme
Unpacking payload ...
Collecting package metadata (current_repodata.json): done
Solving environment: done
## Package Plan ##
environment location: /Users/lucassawade/.julia/adcme
added / updated specs:
- ca-certificates==2020.1.1=0
- certifi==2020.4.5.1=py37_0
- cffi==1.14.0=py37hc512035_1
- chardet==3.0.4=py37_1003
- conda-package-handling==1.6.1=py37h1de35cc_0
- conda==4.8.3=py37_0
- cryptography==2.9.2=py37ha12b0ac_0
- idna==2.9=py_1
- libcxx==10.0.0=1
- libedit==3.1.20181209=hb402a30_0
- libffi==3.3=h0a44026_1
- ncurses==6.2=h0a44026_1
- openssl==1.1.1g=h1de35cc_0
- pip==20.0.2=py37_3
- pycosat==0.6.3=py37h1de35cc_0
- pycparser==2.20=py_0
- pyopenssl==19.1.0=py37_0
- pysocks==1.7.1=py37_0
- python.app==2=py37_10
- python==3.7.7=hf48f09d_4
- readline==8.0=h1de35cc_0
- requests==2.23.0=py37_0
- ruamel_yaml==0.15.87=py37h1de35cc_0
- setuptools==46.4.0=py37_0
- six==1.14.0=py37_0
- sqlite==3.31.1=h5c1f38d_1
- tk==8.6.8=ha441bb4_0
- tqdm==4.46.0=py_0
- urllib3==1.25.8=py37_0
- wheel==0.34.2=py37_0
- xz==5.2.5=h1de35cc_0
- yaml==0.1.7=hc338f04_2
- zlib==1.2.11=h1de35cc_3
The following NEW packages will be INSTALLED:
ca-certificates pkgs/main/osx-64::ca-certificates-2020.1.1-0
certifi pkgs/main/osx-64::certifi-2020.4.5.1-py37_0
cffi pkgs/main/osx-64::cffi-1.14.0-py37hc512035_1
chardet pkgs/main/osx-64::chardet-3.0.4-py37_1003
conda pkgs/main/osx-64::conda-4.8.3-py37_0
conda-package-han~ pkgs/main/osx-64::conda-package-handling-1.6.1-py37h1de35cc_0
cryptography pkgs/main/osx-64::cryptography-2.9.2-py37ha12b0ac_0
idna pkgs/main/noarch::idna-2.9-py_1
libcxx pkgs/main/osx-64::libcxx-10.0.0-1
libedit pkgs/main/osx-64::libedit-3.1.20181209-hb402a30_0
libffi pkgs/main/osx-64::libffi-3.3-h0a44026_1
ncurses pkgs/main/osx-64::ncurses-6.2-h0a44026_1
openssl pkgs/main/osx-64::openssl-1.1.1g-h1de35cc_0
pip pkgs/main/osx-64::pip-20.0.2-py37_3
pycosat pkgs/main/osx-64::pycosat-0.6.3-py37h1de35cc_0
pycparser pkgs/main/noarch::pycparser-2.20-py_0
pyopenssl pkgs/main/osx-64::pyopenssl-19.1.0-py37_0
pysocks pkgs/main/osx-64::pysocks-1.7.1-py37_0
python pkgs/main/osx-64::python-3.7.7-hf48f09d_4
python.app pkgs/main/osx-64::python.app-2-py37_10
readline pkgs/main/osx-64::readline-8.0-h1de35cc_0
requests pkgs/main/osx-64::requests-2.23.0-py37_0
ruamel_yaml pkgs/main/osx-64::ruamel_yaml-0.15.87-py37h1de35cc_0
setuptools pkgs/main/osx-64::setuptools-46.4.0-py37_0
six pkgs/main/osx-64::six-1.14.0-py37_0
sqlite pkgs/main/osx-64::sqlite-3.31.1-h5c1f38d_1
tk pkgs/main/osx-64::tk-8.6.8-ha441bb4_0
tqdm pkgs/main/noarch::tqdm-4.46.0-py_0
urllib3 pkgs/main/osx-64::urllib3-1.25.8-py37_0
wheel pkgs/main/osx-64::wheel-0.34.2-py37_0
xz pkgs/main/osx-64::xz-5.2.5-h1de35cc_0
yaml pkgs/main/osx-64::yaml-0.1.7-hc338f04_2
zlib pkgs/main/osx-64::zlib-1.2.11-h1de35cc_3
Preparing transaction: done
Executing transaction: done
installation finished.
Collecting package metadata (repodata.json): done
Solving environment: done
==> WARNING: A newer version of conda exists. <==
current version: 4.8.3
latest version: 4.9.2
Please update conda by running
$ conda update -n base -c defaults conda
Downloading and Extracting Packages
make-4.3 | 249 KB | ################################################################################################################################ | 100%
importlib-metadata-1 | 44 KB | ################################################################################################################################ | 100%
tensorflow-1.15.0 | 4 KB | ################################################################################################################################ | 100%
hdf5-1.10.6 | 3.0 MB | ################################################################################################################################ | 100%
libopenblas-0.3.10 | 8.2 MB | ################################################################################################################################ | 100%
gast-0.2.2 | 10 KB | ################################################################################################################################ | 100%
unzip-6.0 | 149 KB | ################################################################################################################################ | 100%
werkzeug-0.16.1 | 258 KB | ################################################################################################################################ | 100%
llvm-openmp-10.0.1 | 265 KB | ################################################################################################################################ | 100%
clang-10.0.1 | 12.1 MB | ################################################################################################################################ | 100%
openssl-1.1.1g | 1.9 MB | ################################################################################################################################ | 100%
libllvm10-10.0.1 | 20.8 MB | ################################################################################################################################ | 100%
tapi-1000.10.8 | 4.9 MB | ################################################################################################################################ | 100%
tensorboard-1.15.0 | 3.8 MB | ################################################################################################################################ | 100%
tensorflow-probabili | 1.2 MB | ################################################################################################################################ | 100%
wrapt-1.12.1 | 42 KB | ################################################################################################################################ | 100%
grpcio-1.30.0 | 1.9 MB | ################################################################################################################################ | 100%
libgfortran-4.0.0 | 716 KB | ################################################################################################################################ | 100%
cloudpickle-1.5.0 | 22 KB | ################################################################################################################################ | 100%
tensorflow-estimator | 271 KB | ################################################################################################################################ | 100%
openblas-0.3.10 | 9.1 MB | ################################################################################################################################ | 100%
lapack-3.6.1 | 2.1 MB | ################################################################################################################################ | 100%
absl-py-0.9.0 | 162 KB | ################################################################################################################################ | 100%
libgcc-4.8.5 | 785 KB | ################################################################################################################################ | 100%
zipp-3.1.0 | 13 KB | ################################################################################################################################ | 100%
certifi-2020.6.20 | 151 KB | ################################################################################################################################ | 100%
libclang-cpp10-10.0. | 11.7 MB | ################################################################################################################################ | 100%
c-ares-1.16.1 | 91 KB | ################################################################################################################################ | 100%
ld64-530 | 14 KB | ################################################################################################################################ | 100%
ninja-1.10.0 | 108 KB | ################################################################################################################################ | 100%
python_abi-3.7 | 4 KB | ################################################################################################################################ | 100%
liblapack-3.8.0 | 11 KB | ################################################################################################################################ | 100%
scipy-1.5.1 | 19.0 MB | ################################################################################################################################ | 100%
h5py-2.10.0 | 925 KB | ################################################################################################################################ | 100%
libcblas-3.8.0 | 11 KB | ################################################################################################################################ | 100%
keras-applications-1 | 29 KB | ################################################################################################################################ | 100%
_tflow_select-2.3.0 | 3 KB | ################################################################################################################################ | 100%
clangxx-10.0.1 | 123 KB | ################################################################################################################################ | 100%
numpy-1.19.1 | 5.1 MB | ################################################################################################################################ | 100%
libprotobuf-3.12.3 | 2.1 MB | ################################################################################################################################ | 100%
keras-preprocessing- | 36 KB | ################################################################################################################################ | 100%
ld64_osx-64-530 | 1.3 MB | ################################################################################################################################ | 100%
google-pasta-0.2.0 | 42 KB | ################################################################################################################################ | 100%
astor-0.8.1 | 25 KB | ################################################################################################################################ | 100%
protobuf-3.12.3 | 688 KB | ################################################################################################################################ | 100%
decorator-4.4.2 | 14 KB | ################################################################################################################################ | 100%
ca-certificates-2020 | 146 KB | ################################################################################################################################ | 100%
libblas-3.8.0 | 11 KB | ################################################################################################################################ | 100%
opt_einsum-3.3.0 | 51 KB | ################################################################################################################################ | 100%
termcolor-1.1.0 | 6 KB | ################################################################################################################################ | 100%
conda-4.8.4 | 3.0 MB | ################################################################################################################################ | 100%
tensorflow-base-1.15 | 75.8 MB | ################################################################################################################################ | 100%
markdown-3.2.2 | 61 KB | ################################################################################################################################ | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
# $ conda activate base
#
# To deactivate an active environment, use
#
# $ conda deactivate
[ Info: --------------- (2/6) Check Python Version ---------------
┌ Warning: Pkg.installed() is deprecated
└ @ Pkg /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/Pkg/src/Pkg.jl:554
Building Conda ─→ `~/.julia/packages/Conda/x5ml4/deps/build.log`
Building PyCall → `~/.julia/packages/PyCall/BcTLp/deps/build.log`
┌ Info: PyCall Python version: /Users/lucassawade/.julia/adcme/bin/python
└ Conda Python version: /Users/lucassawade/.julia/adcme/bin/python
[ Info: --------------- (3/6) Looking for TensorFlow Dynamic Libraries ---------------
Can you try
using PyCall
tf = pyimport("tensorflow")
Does it get stuck as well?
The command shows no response. Do I need to install TensorFlow manually?
It's really weird I ended up checking whether python installed in the .julia/adcme/bin/python
was able to use the TensorFlow installation.
The snippet below works without an issue
$ ~/.julia/adcme/bin/python
...
>>> import tensorflow as tf
>>>
I'm out of ideas... julia> tf = pyimport("tensorflow")
simply gets stuck.
Unfortunately, this is a known issue long ago. It might be an incompatible version of LLVM on Mac. So I suggest you try another Julia version or machine. https://github.com/JuliaPy/PyCall.jl/issues/762
I got everything installed on a linux cluster, but will try with an older Julia version
Alright, I got it running on my Mac with Julia 1.3 Nevermind. It does not work.
Maybe add a label to your issues 'known issues'? I think that would help users!
Thank you so much for your help either way, I'm going to try it out on the cluster for now.
Sorry for the inconvenience and thanks for the suggestion. We are going to look into the issue and try to find a workaround in the future.
Any update on this?
I also meet with the same problem on Mac OS Big Sur 11.2.1
Changing to Julia 1.3 has fixed this issue for me.
- Julia version: 1.3.1,
- current ADCME version is 0.7.0
Building ADCME ─→ `~/.julia/packages/ADCME/7qIYe/deps/build.log`
[ Info: Your Julia version is 1.3.1, current ADCME version is 0.7.0, ADCME dependencies installation path: /Users/lizhehao/.julia/adcme
[ Info: --------------- (1/6) Install Tensorflow Dependencies ---------------
[ Info: ADCME dependencies have already been installed.
[ Info: Installing conda dependencies...
Collecting package metadata (repodata.json): done
Solving environment: -
The environment is inconsistent, please check the package plan carefully
The following packages are causing the inconsistency:
- conda-forge/noarch::tensorflow-probability==0.8.0=py_0
- defaults/osx-64::tensorflow-base==1.15.0=mkl_py37h032239d_0
- defaults/noarch::tensorflow-estimator==1.15.1=pyh2649769_0
- defaults/osx-64::tensorflow==1.15.0=mkl_py37hb249377_0
done
==> WARNING: A newer version of conda exists. <==
current version: 4.8.4
latest version: 4.9.2
Please update conda by running
$ conda update -n base conda
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
# $ conda activate base
#
# To deactivate an active environment, use
#
# $ conda deactivate
[ Info: --------------- (2/6) Check Python Version ---------------
Building Conda ─→ `~/.julia/packages/Conda/tJJuN/deps/build.log`
Resolving package versions...
Building PyCall → `~/.julia/packages/PyCall/tqyST/deps/build.log`
Resolving package versions...
┌ Info: PyCall Python version: /Users/lizhehao/.julia/adcme/bin/python
└ Conda Python version: /Users/lizhehao/.julia/adcme/bin/python
[ Info: --------------- (3/6) Looking for TensorFlow Dynamic Libraries ---------------
[ Info: --------------- (4/6) Preparing Custom Operator Environment ---------------
[ Info: Downloading dependencies to /Users/lizhehao/.julia/adcme/lib/Libraries...
[ Info: --------------- (5/6) Skipped: Installing GPU Dependencies ---------------
[ Info: --------------- (6/6) Write Dependency Files ---------------
[ Info: --------------- Finished: /Users/lizhehao/.julia/packages/ADCME/7qIYe/deps/deps.jl ---------------