Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error installing TensorFlow on Ubuntu #510

Open
oren-bm opened this issue Jun 26, 2019 · 5 comments
Open

Error installing TensorFlow on Ubuntu #510

oren-bm opened this issue Jun 26, 2019 · 5 comments

Comments

@oren-bm
Copy link

oren-bm commented Jun 26, 2019

Trying to install TensorFlow on clean ubuntu docker image and building the package is failing

How to reproduce:
run ubuntu docker image
docker run -it ubuntu:18.04
install julia and run it on the container

apt-get -q update && apt-get -q install -y wget
JULIA_VER=1.1
JULIA_VER_UPDATE=1
JULIA_DOWNLOAD_URL=https://julialang-s3.julialang.org/bin/linux/x64/${JULIA_VER}/julia-${JULIA_VER}.${JULIA_VER_UPDATE}-linux-x86_64.tar.gz
wget -q --no-check-certificate ${JULIA_DOWNLOAD_URL} && tar -zxf $(basename $JULIA_DOWNLOAD_URL) --strip-components=1 -C /usr/ && rm $(basename $JULIA_DOWNLOAD_URL)
julia

Add TF Package from the REPL
using Pkg; Pkg.add("TensorFlow"); Pkg.build("TensorFlow"; verbose = true);

I'm getting the following error
_ Building TensorFlow ──────→ ~/.julia/packages/TensorFlow/q9pY2/deps/build.log
┌ Error: Error building TensorFlow:
│ Collecting package metadata (current_repodata.json): ...working... done
│ Solving environment: ...working... failed
│ Collecting package metadata (repodata.json): ...working... done
│ Solving environment: ...working... failed

│ UnsatisfiableError: The following specifications were found to be incompatible with each other:

│ - pip -> python[version='>=3.7,<3.8.0a0']



│ [ Info: Building TensorFlow.jl for CPU use only. To enable the GPU, set the TF_USE_GPU environment variable to 1 and rebuild TensorFlow.jl
│ [ Info: Running conda config --add channels conda-forge --file /root/.julia/conda/3/condarc-julia.yml --force in root environment
│ [ Info: Running conda install -y tensorflow=1.12.0 in root environment
│ ERROR: LoadError: failed process: Process(setenv(/root/.julia/conda/3/bin/conda install -y tensorflow=1.12.0,["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", "PWD=/", "CONDARC=/root/.julia/conda/3/condarc-julia.yml", "SHLVL=1", "CONDA_PREFIX=/root/.julia/conda/3", "JULIA_LOAD_PATH=@:/tmp/tmpT7enOq", "=/usr/bin/julia", "HOME=/root", "TERM=xterm", "LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:.tar=01;31:.tgz=01;31:.arc=01;31:.arj=01;31:.taz=01;31:.lha=01;31:.lz4=01;31:.lzh=01;31:.lzma=01;31:.tlz=01;31:.txz=01;31:.tzo=01;31:.t7z=01;31:.zip=01;31:.z=01;31:.Z=01;31:.dz=01;31:.gz=01;31:.lrz=01;31:.lz=01;31:.lzo=01;31:.xz=01;31:.zst=01;31:.tzst=01;31:.bz2=01;31:.bz=01;31:.tbz=01;31:.tbz2=01;31:.tz=01;31:.deb=01;31:.rpm=01;31:.jar=01;31:.war=01;31:.ear=01;31:.sar=01;31:.rar=01;31:.alz=01;31:.ace=01;31:.zoo=01;31:.cpio=01;31:.7z=01;31:.rz=01;31:.cab=01;31:.wim=01;31:.swm=01;31:.dwm=01;31:.esd=01;31:.jpg=01;35:.jpeg=01;35:.mjpg=01;35:.mjpeg=01;35:.gif=01;35:.bmp=01;35:.pbm=01;35:.pgm=01;35:.ppm=01;35:.tga=01;35:.xbm=01;35:.xpm=01;35:.tif=01;35:.tiff=01;35:.png=01;35:.svg=01;35:.svgz=01;35:.mng=01;35:.pcx=01;35:.mov=01;35:.mpg=01;35:.mpeg=01;35:.m2v=01;35:.mkv=01;35:.webm=01;35:.ogm=01;35:.mp4=01;35:.m4v=01;35:.mp4v=01;35:.vob=01;35:.qt=01;35:.nuv=01;35:.wmv=01;35:.asf=01;35:.rm=01;35:.rmvb=01;35:.flc=01;35:.avi=01;35:.fli=01;35:.flv=01;35:.gl=01;35:.dl=01;35:.xcf=01;35:.xwd=01;35:.yuv=01;35:.cgm=01;35:.emf=01;35:.ogv=01;35:.ogx=01;35:.aac=00;36:.au=00;36:.flac=00;36:.m4a=00;36:.mid=00;36:.midi=00;36:.mka=00;36:.mp3=00;36:.mpc=00;36:.ogg=00;36:.ra=00;36:.wav=00;36:.oga=00;36:.opus=00;36:.spx=00;36:.xspf=00;36:", "PYTHONIOENCODING=UTF-8", "HOSTNAME=d8ac5879ab6b", "OPENBLAS_MAIN_FREE=1"]), ProcessExited(1)) [1]
│ Stacktrace:
│ [1] error(::String, ::Base.Process, ::String, ::Int64, ::String) at ./error.jl:42
│ [2] pipeline_error at ./process.jl:785 [inlined]
│ [3] #run#515(::Bool, ::Function, ::Cmd) at ./process.jl:726
│ [4] run at ./process.jl:724 [inlined]
│ [5] runconda(::Cmd, ::String) at /root/.julia/packages/Conda/kLXeC/src/Conda.jl:113
│ [6] #add#1(::String, ::Function, ::String, ::String) at /root/.julia/packages/Conda/kLXeC/src/Conda.jl:184
│ [7] add at /root/.julia/packages/Conda/kLXeC/src/Conda.jl:183 [inlined] (repeats 2 times)
│ [8] top-level scope at /root/.julia/packages/TensorFlow/q9pY2/deps/build.jl:41
│ [9] include at ./boot.jl:326 [inlined]
│ [10] include_relative(::Module, ::String) at ./loading.jl:1038
│ [11] include(::Module, ::String) at ./sysimg.jl:29
│ [12] include(::String) at ./client.jl:403
│ [13] top-level scope at none:0
│ in expression starting at /root/.julia/packages/TensorFlow/q9pY2/deps/build.jl:39
└ @ Pkg.Operations /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.1/Pkg/src/Operations.jl:1075

I've tried to install Conda and/or PyCall before but there was no difference.

@malmaud
Copy link
Owner

malmaud commented Jun 26, 2019

Weird, seems more like a bug with Conda and/or the official tensorflow conda recipe than anything on the Julia side. I'll take a look later though.

@stalinkay
Copy link

@malmaud Hi. I'm also running into this issue on mac.

 Error: Error building `TensorFlow`:
│ Warning: 'conda-forge' already in 'channels' list, moving to the top
│ Collecting package metadata (current_repodata.json): ...working... done
│ Solving environment: ...working... failed
│ Collecting package metadata (repodata.json): ...working... done
│ Solving environment: ...working... failed
│
│ UnsatisfiableError: The following specifications were found to be incompatible with each other:
│
│   - pip -> python[version='>=3.6,<3.7.0a0']
│
│
│
│ [ Info: Building TensorFlow.jl for CPU use only. To enable the GPU, set the TF_USE_GPU environment variable to 1 and rebuild TensorFlow.jl
│ [ Info: Running `conda config --add channels conda-forge --file /Users/mos/.julia/conda/3/condarc-julia.yml --force` in root environment
│ [ Info: Running `conda install -y tensorflow=1.12.0` in root environment
│ ERROR: LoadError: failed process: Process(setenv(`/Users/mos/.julia/conda/3/bin/conda install -y tensorflow=1.12.0`,["LSCOLORS=Gxfxcxdxbxegedabagacad", "PATH=/Users/mos/.fastlane/bin:/Users/mos/.rbenv/shims:/Users/mos/.pyenv/shims:/Users/mos/bin:/usr/local/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public/:/Library/TeX/texbin:/usr/local/MacGPG2/bin:/opt/puppetlabs/bin:/opt/X11/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Applications/Wireshark.app/Contents/MacOS:/usr/local/share/android-sdk/build-tools/Desktop:/usr/local/share/android-sdk/platform-tools:/usr/local/share/android-sdk/tools:/usr/local/opt/gradle/bin:/usr/local/opt/maven/bin:/usr/local/opt/ant/bin:/usr/local/opt/go/libexec/bin:", "EDITOR=nano", "ZSH_TMUX_TERM=screen-256color", "SPACESHIP_ROOT=/Users/mos/.oh-my-zsh/custom/themes/spaceship-prompt", "HOMEBREW_GITHUB_API_TOKEN=44396503e62180103e3c6fc4b86b7510905dcca9", "GITLAB_API_ENDPOINT=https://gitlab.com/api/v3", "ANT_HOME=/usr/local/opt/ant", "ITERM_PROFILE=Default", "NVM_CD_FLAGS=-q", "SSH_AGENT_PID=1789", "VISUAL=nano", "RPROMPT=\$(spaceship_rprompt)\$(fossil_prompt_info)", "Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.olO8PMEyBf/Render", "USER=mos", "VIRTUALENVWRAPPER_HOOK_DIR=/Users/mos/.virtualenvs", "LESS=-F -g -i -M -R -S -w -X -z-4", "MAVEN_HOME=/usr/local/opt/maven", "VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/python2", "ANDROID_SDK_ROOT=/usr/local/share/android-sdk", "VIRTUAL_ENV_DISABLE_PROMPT=true", "SHELL=/bin/zsh", "COLORFGBG=7;0", "EMACS_PLUGIN_LAUNCHER=/Users/mos/.oh-my-zsh/plugins/emacs/emacsclient.sh", "TMPDIR=/var/folders/k7/0l6sgwvd3qjdz8zndd3bft300000gn/T/", "CONDARC=/Users/mos/.julia/conda/3/condarc-julia.yml", "NVM_DIR=/Users/mos/.nvm", "REACT_EDITOR=code", "GPG_TTY=/dev/ttys005", "ITERM_SESSION_ID=w0t2p0:A8AE296D-7AC2-4147-9EE3-5E5EE2D03CAB", "SPACESHIP_VERSION=3.11.0", "TERM=xterm-256color", "HOME=/Users/mos", "WORKON_HOME=/Users/mos/.virtualenvs", "SPACESHIP_EXIT_CODE_SHOW=true", "COLORTERM=truecolor", "SPACESHIP_TIME_SHOW=true", "PYTHONIOENCODING=UTF-8", "XPC_FLAGS=0x0", "XPC_SERVICE_NAME=0", "PIP_REQUIRE_VIRTUALENV=false", "__CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0", "_ZSH_TMUX_FIXED_CONFIG=/Users/mos/.oh-my-zsh/plugins/tmux/tmux.only.conf", "LC_ALL=en_US.UTF-8", "LC_CTYPE=en_US.UTF-8", "DIRHISTORY_SIZE=30", "BROWSER=open", "_VIRTUALENVWRAPPER_API= mkvirtualenv rmvirtualenv lsvirtualenv showvirtualenv workon add2virtualenv cdsitepackages cdvirtualenv lssitepackages toggleglobalsitepackages cpvirtualenv setvirtualenvproject mkproject cdproject mktmpenv wipeenv allvirtualenv", "LANG=en_US.UTF-8", "PYENV_SHELL=zsh", "LOGNAME=mos", "SHLVL=1", "SSH_AUTH_SOCK=/var/folders/k7/0l6sgwvd3qjdz8zndd3bft300000gn/T//ssh-GHQmbMYSaCVr/agent.1787", "OLDPWD=/Volumes/Reanimation/Work/Stalin Kay/Academia/research/masters/personalised-learning", "RBENV_SHELL=zsh", "ZNT_REPO_DIR=/usr/local/share/zsh-navigation-tools", "AUTOJUMP_SOURCED=1", "_=/usr/local/bin/julia", "PAGER=less", "GRADLE_HOME=/usr/local/opt/gradle", "TERM_PROGRAM_VERSION=3.2.2", "ZSH=/Users/mos/.oh-my-zsh", "PWD=/Volumes/Reanimation/Work/Stalin Kay/Academia/research/masters/personalised-learning/experiment", "DISPLAY=/private/tmp/com.apple.launchd.og2DKnzDyL/org.macosforge.xquartz:0", "VIRTUALENVWRAPPER_PROJECT_FILENAME=.project", "TERM_PROGRAM=iTerm.app", "VIRTUALENVWRAPPER_SCRIPT=/usr/local/bin/virtualenvwrapper.sh", "AUTOJUMP_ERROR_PATH=/Users/mos/Library/autojump/errors.log", "NVM_RC_VERSION=", "INTEL_HAXM_HOME=/usr/local/Caskroom/intel-haxm", "ANDROID_HOME=/usr/local/share/android-sdk", "ZNT_CONFIG_DIR=/Users/mos/.config/znt", "CONDA_PREFIX=/Users/mos/.julia/conda/3", "TERM_SESSION_ID=w0t2p0:A8AE296D-7AC2-4147-9EE3-5E5EE2D03CAB", "VIRTUALENVWRAPPER_WORKON_CD=1", "MARKPATH=/Users/mos/.marks", "JULIA_LOAD_PATH=@:/var/folders/k7/0l6sgwvd3qjdz8zndd3bft300000gn/T/tmpMh0ZXn", "SPACESHIP_VI_MODE_SHOW=false", "ANDROID_NDK_HOME=/usr/local/share/android-ndk", "OPENBLAS_MAIN_FREE=1"]), ProcessExited(1)) [1]
│ Stacktrace:
│  [1] error(::String, ::Base.Process, ::String, ::Int64, ::String) at ./error.jl:42
│  [2] pipeline_error at ./process.jl:785 [inlined]
│  [3] #run#515(::Bool, ::Function, ::Cmd) at ./process.jl:726
│  [4] run at ./process.jl:724 [inlined]
│  [5] runconda(::Cmd, ::String) at /Users/mos/.julia/packages/Conda/kLXeC/src/Conda.jl:113
│  [6] #add#1(::String, ::Function, ::String, ::String) at /Users/mos/.julia/packages/Conda/kLXeC/src/Conda.jl:184
│  [7] add at /Users/mos/.julia/packages/Conda/kLXeC/src/Conda.jl:183 [inlined] (repeats 2 times)
│  [8] top-level scope at /Users/mos/.julia/packages/TensorFlow/q9pY2/deps/build.jl:41
│  [9] include at ./boot.jl:326 [inlined]
│  [10] include_relative(::Module, ::String) at ./loading.jl:1038
│  [11] include(::Module, ::String) at ./sysimg.jl:29
│  [12] include(::String) at ./client.jl:403
│  [13] top-level scope at none:0
│ in expression starting at /Users/mos/.julia/packages/TensorFlow/q9pY2/deps/build.jl:39
└ @ Pkg.Operations /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.1/Pkg/src/Operations.jl:1075

@stalinkay
Copy link

stalinkay commented Jul 2, 2019

@malmaud I'm on running on python3 = Python 3.7.3 and python = Python 2.7.16 on macOS

@nassarhuda
Copy link

Hi, I'm not sure if this will be helpful but I ran into a similar issue and this is what worked for me:

I got an error that had the following text:

│ UnsatisfiableError: The following specifications were found
│ to be incompatible with the existing python installation in your environment:

│ Specifications:

│ - tensorflow=1.12.0 -> python[version='2.7.|3.6.']

│ Your python: python=3.7

And then I found this: tensorflow/tensorflow#17022 -- it recommended staying with Python 3.6, so I reverted my Python installation to 3.6.5

This might be helpful to revert back to Python 3.6.5 (https://stackoverflow.com/questions/52584907/how-to-downgrade-python-from-3-7-to-3-6)

Note that I am not using the Conda python from Julia -- I'm using own python installed on my mac.

This might be helpful to @stalinkay since you said you were on a mac and your python3 version was 3.7.3 and I had the same situation...

@nassarhuda
Copy link

Update... Looks like TensorFlow should work on Python 3.7.x -- someone suggested a solution here: tensorflow/tensorflow#17022 (comment)

Suffice it to say, this is not an issue with TensorFlow.jl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants