greta-dev / greta

simple and scalable statistical modelling in R
https://greta-stats.org
Other
538 stars 63 forks source link

Install issue - permission problem? #254

Closed lenthomas closed 5 years ago

lenthomas commented 6 years ago

Sorry to be a bother, but: different computer, different install issue. Full transcript below. Appears to be a permission issue, which is strange since Anacaonda installed itself into a user directory where there should be no such issues. Any suggestions on this one? Thanks!

Win 10; R 3.5.1.

Transcript starts:

R version 3.5.1 (2018-07-02) -- "Feather Spray" Copyright (C) 2018 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R.

library(greta)

greta requires TensorFlow (>=1.10.0) and Tensorflow Probability (>=0.5.0), but you have TensorFlow version 1.4.0 and TensorFlow Probability isn't installed. Use:

install_tensorflow(method = "conda")
reticulate::conda_install("r-tensorflow", "tensorflow-probability", pip = TRUE)

to install the latest version.

Attaching package: ‘greta’

The following objects are masked from ‘package:stats’:

binomial, cov2cor, poisson

The following objects are masked from ‘package:base’:

%*%, apply, backsolve, beta, chol2inv, colMeans, colSums, diag, eigen, forwardsolve, gamma,
identity, rowMeans, rowSums, sweep, tapply

install_tensorflow(method = "conda")

Package plan for package removal in environment C:\Users\len\ANACON~1\envs\r-tensorflow:

The following packages will be REMOVED:

asn1crypto:      0.22.0-py36_0      conda-forge
bleach:          1.5.0-py36_0       conda-forge
ca-certificates: 2017.11.5-0        conda-forge
certifi:         2017.11.5-py36_0   conda-forge
cffi:            1.11.2-py36_0      conda-forge
chardet:         3.0.4-py36_0       conda-forge
cryptography:    2.1.4-py36_0       conda-forge
freetype:        2.8.1-vc14_0       conda-forge [vc14]
h5py:            2.7.1-py36_2       conda-forge
hdf5:            1.10.1-vc14_1      conda-forge [vc14]
html5lib:        0.9999999-py36_0   conda-forge
idna:            2.6-py36_1         conda-forge
jpeg:            9b-vc14_2          conda-forge [vc14]
libpng:          1.6.34-vc14_0      conda-forge [vc14]
libtiff:         4.0.9-vc14_0       conda-forge [vc14]
markdown:        2.6.9-py36_0       conda-forge
mkl:             2017.0.3-0                    
numpy:           1.13.1-py36_0                 
olefile:         0.44-py36_0        conda-forge
openssl:         1.0.2n-vc14_0      conda-forge [vc14]
pillow:          5.0.0-py36_0       conda-forge
pip:             9.0.1-py36_1                  
protobuf:        3.5.1-py36_vc14_3  conda-forge [vc14]
pycparser:       2.18-py36_0        conda-forge
pyopenssl:       17.2.0-py36_0      conda-forge
pysocks:         1.6.8-py36_1       conda-forge
python:          3.6.2-0                       
pyyaml:          3.12-py36_1        conda-forge
requests:        2.18.4-py36_1      conda-forge
scipy:           0.19.1-np113py36_0            
setuptools:      36.4.0-py36_1                 
six:             1.11.0-py36_1      conda-forge
tensorboard:     0.4.0rc3-py36_2    conda-forge
tensorflow:      1.4.0-py36_0       conda-forge
urllib3:         1.22-py36_0        conda-forge
vc:              14-0                          
vs2015_runtime:  14.0.25420-0                  
webencodings:    0.5-py36_0         conda-forge
werkzeug:        0.14.1-py_0        conda-forge
wheel:           0.29.0-py36_0                 
win_inet_pton:   1.0.1-py36_1       conda-forge
wincertstore:    0.2-py36_0                    
yaml:            0.1.7-vc14_0       conda-forge [vc14]
zlib:            1.2.11-vc14_0      conda-forge [vc14]

Unlinking packages ... [ COMPLETE ]|##################################################| 100% Creating r-tensorflow conda environment for TensorFlow installation... Fetching package metadata ....... Solving package specifications: ..........

Package plan for installation in environment C:\Users\len\ANACON~1\envs\r-tensorflow:

The following NEW packages will be INSTALLED:

certifi:        2016.2.28-py36_0
pip:            9.0.1-py36_1    
python:         3.6.2-0         
setuptools:     36.4.0-py36_1   
vc:             14-0            
vs2015_runtime: 14.0.25420-0    
wheel:          0.29.0-py36_0   
wincertstore:   0.2-py36_0      

Linking packages ... [ COMPLETE ]|##################################################| 100% #

To activate this environment, use:

$ source activate r-tensorflow

#

To deactivate this environment, use:

$ source deactivate

# Fetching package metadata ......... Solving package specifications: ..........

Package plan for installation in environment C:\Users\len\ANACON~1\envs\r-tensorflow:

The following packages will be downloaded:

package                    |            build
---------------------------|-----------------
blas-1.0                   |              mkl           6 KB
ca-certificates-2018.10.15 |       ha4d7672_0         170 KB  conda-forge
vs2015_win-64-14.0.25123   |       h17c34da_3           5 KB  conda-forge
libgpuarray-0.7.6          |           vc14_0         317 KB  conda-forge
openssl-1.0.2o             |           vc14_0         5.4 MB  conda-forge
hdf5-1.10.3                |    he51fdeb_1001        34.9 MB  conda-forge
jpeg-9c                    |    hfa6e2cd_1001         314 KB  conda-forge
libprotobuf-3.5.2          |           vc14_0        10.2 MB  conda-forge
tk-8.6.8                   |           vc14_0         3.8 MB  conda-forge
asn1crypto-0.24.0          |        py36_1003         154 KB  conda-forge
backports-1.0              |             py_2           4 KB  conda-forge
certifi-2018.10.15         |        py36_1000         138 KB  conda-forge
chardet-3.0.4              |        py36_1003         209 KB  conda-forge
cryptography-vectors-2.3.1 |        py36_1000        30.4 MB  conda-forge
freetype-2.9.1             |    he8b6a0d_1004         470 KB  conda-forge
idna-2.7                   |        py36_1002         131 KB  conda-forge
markdown-2.6.11            |             py_0          56 KB  conda-forge
markupsafe-1.1.0           |py36hfa6e2cd_1000          27 KB  conda-forge
olefile-0.46               |             py_0          31 KB  conda-forge
pycparser-2.19             |             py_0          87 KB  conda-forge
pyreadline-2.1             |        py36_1000         140 KB  conda-forge
pyyaml-3.13                |py36hfa6e2cd_1001         147 KB  conda-forge
six-1.11.0                 |        py36_1001          20 KB  conda-forge
webencodings-0.5.1         |             py_1          12 KB  conda-forge
win_inet_pton-1.0.1        |        py36_1002           5 KB  conda-forge
absl-py-0.6.1              |        py36_1000         151 KB  conda-forge
backports.weakref-1.0.post1|        py36_1000           7 KB  conda-forge
cffi-1.11.5                |py36hfa6e2cd_1001         211 KB  conda-forge
h5py-2.8.0                 |py36h54c06b0_1004         824 KB  conda-forge
mako-1.0.7                 |             py_1          57 KB  conda-forge
pillow-5.3.0               |py36h9a613e6_1000         778 KB  conda-forge
pysocks-1.6.8              |        py36_1002          22 KB  conda-forge
cryptography-2.3.1         |   py36h74b6da3_0         508 KB  conda-forge
protobuf-3.5.2             |      py36_vc14_0         513 KB  conda-forge
pygpu-0.7.6                |py36h452e1ab_1000         583 KB  conda-forge
pyopenssl-18.0.0           |        py36_1000          80 KB  conda-forge
tensorboard-1.5.1          |           py36_1         3.0 MB  conda-forge
theano-1.0.3               |py36h6538335_1001         3.7 MB  conda-forge
tensorflow-1.5.1           |           py36_0        27.1 MB  conda-forge
urllib3-1.23               |        py36_1001         152 KB  conda-forge
requests-2.20.1            |        py36_1000          84 KB  conda-forge
tensorflow-hub-0.1.1       |             py_0          39 KB  conda-forge
keras-applications-1.0.4   |             py_1          26 KB  conda-forge
keras-2.2.4                |           py36_0         458 KB  conda-forge
keras-preprocessing-1.0.2  |             py_1          26 KB  conda-forge
------------------------------------------------------------
                                       Total:       125.3 MB

The following NEW packages will be INSTALLED:

absl-py:              0.6.1-py36_1000          conda-forge
asn1crypto:           0.24.0-py36_1003         conda-forge
backports:            1.0-py_2                 conda-forge
backports.weakref:    1.0.post1-py36_1000      conda-forge
blas:                 1.0-mkl                             
bleach:               1.5.0-py36_0             conda-forge
ca-certificates:      2018.10.15-ha4d7672_0    conda-forge
cffi:                 1.11.5-py36hfa6e2cd_1001 conda-forge
chardet:              3.0.4-py36_1003          conda-forge
cryptography:         2.3.1-py36h74b6da3_0     conda-forge
cryptography-vectors: 2.3.1-py36_1000          conda-forge
freetype:             2.9.1-he8b6a0d_1004      conda-forge
h5py:                 2.8.0-py36h54c06b0_1004  conda-forge
hdf5:                 1.10.3-he51fdeb_1001     conda-forge
html5lib:             0.9999999-py36_0         conda-forge
idna:                 2.7-py36_1002            conda-forge
jpeg:                 9c-hfa6e2cd_1001         conda-forge
keras:                2.2.4-py36_0             conda-forge
keras-applications:   1.0.4-py_1               conda-forge
keras-preprocessing:  1.0.2-py_1               conda-forge
libgpuarray:          0.7.6-vc14_0             conda-forge [vc14]
libpng:               1.6.34-vc14_0            conda-forge [vc14]
libprotobuf:          3.5.2-vc14_0             conda-forge [vc14]
libtiff:              4.0.9-vc14_0             conda-forge [vc14]
mako:                 1.0.7-py_1               conda-forge
markdown:             2.6.11-py_0              conda-forge
markupsafe:           1.1.0-py36hfa6e2cd_1000  conda-forge
mkl:                  2017.0.3-0                          
numpy:                1.13.1-py36_0                       
olefile:              0.46-py_0                conda-forge
openssl:              1.0.2o-vc14_0            conda-forge [vc14]
pillow:               5.3.0-py36h9a613e6_1000  conda-forge
protobuf:             3.5.2-py36_vc14_0        conda-forge [vc14]
pycparser:            2.19-py_0                conda-forge
pygpu:                0.7.6-py36h452e1ab_1000  conda-forge
pyopenssl:            18.0.0-py36_1000         conda-forge
pyreadline:           2.1-py36_1000            conda-forge
pysocks:              1.6.8-py36_1002          conda-forge
pyyaml:               3.13-py36hfa6e2cd_1001   conda-forge
requests:             2.20.1-py36_1000         conda-forge
scipy:                0.19.1-np113py36_0                  
six:                  1.11.0-py36_1001         conda-forge
tensorboard:          1.5.1-py36_1             conda-forge
tensorflow:           1.5.1-py36_0             conda-forge
tensorflow-hub:       0.1.1-py_0               conda-forge
theano:               1.0.3-py36h6538335_1001  conda-forge
tk:                   8.6.8-vc14_0             conda-forge [vc14]
urllib3:              1.23-py36_1001           conda-forge
vs2015_win-64:        14.0.25123-h17c34da_3    conda-forge
webencodings:         0.5.1-py_1               conda-forge
werkzeug:             0.14.1-py_0              conda-forge
win_inet_pton:        1.0.1-py36_1002          conda-forge
yaml:                 0.1.7-vc14_0             conda-forge [vc14]
zlib:                 1.2.11-vc14_0            conda-forge [vc14]

The following packages will be UPDATED:

certifi:              2016.2.28-py36_0                     --> 2018.10.15-py36_1000 conda-forge

Fetching packages ... blas-1.0-mkl.t 100% |###############################| Time: 0:00:00 386.44 kB/s ca-certificate 100% |###############################| Time: 0:00:00 440.73 kB/s vs2015win-64- 100% |###############################| Time: 0:00:00 291.07 kB/s libgpuarray-0. 100% |###############################| Time: 0:00:00 592.26 kB/s openssl-1.0.2o 100% |###############################| Time: 0:00:10 556.72 kB/s hdf5-1.10.3-he 100% |###############################| Time: 0:00:31 1.16 MB/s jpeg-9c-hfa6e2 100% |###############################| Time: 0:00:00 598.39 kB/s libprotobuf-3. 100% |###############################| Time: 0:00:09 1.08 MB/s tk-8.6.8-vc14 100% |###############################| Time: 0:00:04 881.52 kB/s asn1crypto-0.2 100% |###############################| Time: 0:00:00 359.19 kB/s backports-1.0- 100% |###############################| Time: 0:00:00 239.74 kB/s certifi-2018.1 100% |###############################| Time: 0:00:01 77.15 kB/s chardet-3.0.4- 100% |###############################| Time: 0:00:00 438.79 kB/s cryptography-v 100% |###############################| Time: 0:00:22 1.41 MB/s freetype-2.9.1 100% |###############################| Time: 0:00:00 709.39 kB/s idna-2.7-py36_ 100% |###############################| Time: 0:00:00 161.22 kB/s markdown-2.6.1 100% |###############################| Time: 0:00:00 287.98 kB/s markupsafe-1.1 100% |###############################| Time: 0:00:00 241.91 kB/s olefile-0.46-p 100% |###############################| Time: 0:00:00 313.22 kB/s pycparser-2.19 100% |###############################| Time: 0:00:00 418.33 kB/s pyreadline-2.1 100% |###############################| Time: 0:00:00 434.41 kB/s pyyaml-3.13-py 100% |###############################| Time: 0:00:00 451.22 kB/s six-1.11.0-py3 100% |###############################| Time: 0:00:00 177.27 kB/s webencodings-0 100% |###############################| Time: 0:00:00 743.82 kB/s win_inetpton- 100% |###############################| Time: 0:00:00 349.56 kB/s absl-py-0.6.1- 100% |###############################| Time: 0:00:00 294.68 kB/s backports.weak 100% |###############################| Time: 0:00:00 468.25 kB/s cffi-1.11.5-py 100% |###############################| Time: 0:00:00 418.72 kB/s h5py-2.8.0-py3 100% |###############################| Time: 0:00:00 856.79 kB/s mako-1.0.7-py 100% |###############################| Time: 0:00:00 289.54 kB/s pillow-5.3.0-p 100% |###############################| Time: 0:00:00 920.52 kB/s pysocks-1.6.8- 100% |###############################| Time: 0:00:00 220.90 kB/s cryptography-2 100% |###############################| Time: 0:00:00 696.47 kB/s protobuf-3.5.2 100% |###############################| Time: 0:00:01 426.18 kB/s pygpu-0.7.6-py 100% |###############################| Time: 0:00:01 355.05 kB/s pyopenssl-18.0 100% |###############################| Time: 0:00:00 355.49 kB/s tensorboard-1. 100% |###############################| Time: 0:00:02 1.32 MB/s theano-1.0.3-p 100% |###############################| Time: 0:00:03 1.22 MB/s tensorflow-1.5 100% |###############################| Time: 0:00:25 1.10 MB/s urllib3-1.23-p 100% |###############################| Time: 0:00:00 459.37 kB/s requests-2.20. 100% |###############################| Time: 0:00:00 377.37 kB/s tensorflow-hub 100% |###############################| Time: 0:00:00 346.53 kB/s keras-applicat 100% |###############################| Time: 0:00:00 264.23 kB/s keras-2.2.4-py 100% |###############################| Time: 0:00:00 667.43 kB/s keras-preproce 100% |###############################| Time: 0:00:00 230.88 kB/s Extracting packages ... [markupsafe ]|###Using Anaconda Cloud api site https://api.anaconda.org INFO:progress.update:('jpeg', 9) INFO:progress.update:('libpng', 10) INFO:progress.update:('libprotobuf', 11) INFO:progress.update:('tk', 12) INFO:progress.update:('asn1crypto', 13) INFO:progress.update:('backports', 14) [ COMPLETE ]|##################################################| 100% Unlinking packages ... [ COMPLETE ]|##################################################| 100% Linking packages ... [certifi ]|############# | INFO:progress.update:('certifi', 15) INFO:progress.update:('chardet', 16) INFO:progress.update:('cryptography-vectors', 17) INFO:progress.update:('freetype', 18) INFO:progress.update:('idna', 19) INFO:progress.update:('libtiff', 20) INFO:progress.update:('markdown', 21) INFO:progress.update:('markupsafe', 22) INFO:progress.update:('numpy', 23) INFO:progress.update:('olefile', 24) INFO:progress.update:('pycparser', 25) INFO:progress.update:('pyreadline', 26) INFO:progress.update:('pyyaml', 27) INFO:progress.update:('six', 28) INFO:progress.update:('webencodings', 29) INFO:progress.update:('werkzeug', 30) INFO:progress.update:('win_inet_pton', 31) INFO:progress.update:('absl-py', 32) INFO:progress.update:('backports.weakref', 33) INFO:progress.update:('cffi', 34) INFO:progress.update:('h5py', 35) INFO:progress.update:('html5lib', 36) INFO:progress.update:('mako', 37) INFO:progress.update:('pillow', 38) INFO:progress.update:('pysocks', 39) INFO:progress.update:('scipy', 40) INFO:progress.update:('bleach', 41) INFO:progress.update:('cryptography', 42) INFO:progress.update:('protobuf', 43) INFO:progress.update:('pygpu', 44) INFO:progress.update:('pyopenssl', 45) INFO:progress.update:('tensorboard', 46) INFO:progress.update:('theano', 47) INFO:progress.update:('tensorflow', 48) WARNING:conda.install:file already exists: 'C:\Users\len\ANACON~1\envs\r-tensorflow\Scripts/tensorboard.exe' INFO:progress.update:('urllib3', 49) INFO:progress.update:('requests', 50) INFO:progress.update:('tensorflow-hub', 51) INFO:progress.update:('keras-applications', 52) INFO:progress.update:('keras', 53) INFO:progress.update:('keras-preprocessing', 54) INFO:progress.stop:None [ COMPLETE ]|##################################################| 100%

Installation complete.

Restarting R session...

reticulate::conda_install("r-tensorflow", "tensorflow-probability", pip = TRUE)

(r-tensorflow) C:\Users\len\ANACON~1\envs\r-tensorflow\etc\conda\activate.d>python C:\Users\len\ANACON~1\envs\r-tensorflow\etc\keras\load_config.py 1>temp.txt

(r-tensorflow) C:\Users\len\ANACON~1\envs\r-tensorflow\etc\conda\activate.d>set /p KERAS_BACKEND= 0<temp.txt

(r-tensorflow) C:\Users\len\ANACON~1\envs\r-tensorflow\etc\conda\activate.d>del temp.txt

(r-tensorflow) C:\Users\len\ANACON~1\envs\r-tensorflow\etc\conda\activate.d>python -c "import keras" 1>nul 2>&1

(r-tensorflow) C:\Users\len\ANACON~1\envs\r-tensorflow\etc\conda\activate.d>if errorlevel 1 ( ver 1>nul
set "KERAS_BACKEND=theano"
python -c "import keras" 1>nul 2>&1 )

(r-tensorflow) C:\Users\len\ANACON~1\envs\r-tensorflow\etc\conda\activate.d>SET DISTUTILS_USE_SDK=1

(r-tensorflow) C:\Users\len\ANACON~1\envs\r-tensorflow\etc\conda\activate.d>SET MSSdk=1

(r-tensorflow) C:\Users\len\ANACON~1\envs\r-tensorflow\etc\conda\activate.d>SET platform=

(r-tensorflow) C:\Users\len\ANACON~1\envs\r-tensorflow\etc\conda\activate.d>IF /I [AMD64] == [amd64] set "platform=true"

(r-tensorflow) C:\Users\len\ANACON~1\envs\r-tensorflow\etc\conda\activate.d>IF /I [] == [amd64] set "platform=true"

(r-tensorflow) C:\Users\len\ANACON~1\envs\r-tensorflow\etc\conda\activate.d>if defined platform (set "VSREGKEY=HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\14.0" ) ELSE (set "VSREGKEY=HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\14.0" )

(r-tensorflow) C:\Users\len\ANACON~1\envs\r-tensorflow\etc\conda\activate.d>for /F "skip=2 tokens=2,*" %A in ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\14.0" /v InstallDir') do SET "VSINSTALLDIR=%B"

(r-tensorflow) C:\Users\len\ANACON~1\envs\r-tensorflow\etc\conda\activate.d>SET "VSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\"

(r-tensorflow) C:\Users\len\ANACON~1\envs\r-tensorflow\etc\conda\activate.d>if "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\" == "" (set "VSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\" )

(r-tensorflow) C:\Users\len\ANACON~1\envs\r-tensorflow\etc\conda\activate.d>if "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\" == "" ( ECHO "Did not find VS in registry or in VS140COMNTOOLS env var - exiting"
exit 1 )

(r-tensorflow) C:\Users\len\ANACON~1\envs\r-tensorflow\etc\conda\activate.d>echo "Found VS2014 at C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\" "Found VS2014 at C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\"

(r-tensorflow) C:\Users\len\ANACON~1\envs\r-tensorflow\etc\conda\activate.d>SET "VS_VERSION=14.0"

(r-tensorflow) C:\Users\len\ANACON~1\envs\r-tensorflow\etc\conda\activate.d>SET "VS_MAJOR=14"

(r-tensorflow) C:\Users\len\ANACON~1\envs\r-tensorflow\etc\conda\activate.d>SET "VS_YEAR=2015"

(r-tensorflow) C:\Users\len\ANACON~1\envs\r-tensorflow\etc\conda\activate.d>set "MSYS2_ARG_CONV_EXCL=/AI;/AL;/OUT;/out"

(r-tensorflow) C:\Users\len\ANACON~1\envs\r-tensorflow\etc\conda\activate.d>set "MSYS2_ENV_CONV_EXCL=CL"

(r-tensorflow) C:\Users\len\ANACON~1\envs\r-tensorflow\etc\conda\activate.d>set "PY_VCRUNTIME_REDIST=\vcruntime140.dll"

(r-tensorflow) C:\Users\len\ANACON~1\envs\r-tensorflow\etc\conda\activate.d>set "CFLAGS= -MD -GL"

(r-tensorflow) C:\Users\len\ANACON~1\envs\r-tensorflow\etc\conda\activate.d>set "CXXFLAGS= -MD -GL"

(r-tensorflow) C:\Users\len\ANACON~1\envs\r-tensorflow\etc\conda\activate.d>set "LDFLAGS_SHARED= -LTCG ucrt.lib"

(r-tensorflow) C:\Users\len\ANACON~1\envs\r-tensorflow\etc\conda\activate.d>IF /I [] == [win-64] (set "folder=x64" ) else (set "folder=x86" )

(r-tensorflow) C:\Users\len\ANACON~1\envs\r-tensorflow\etc\conda\activate.d>for /F "tokens=" %I in ('dir "C:\Program Files (x86)\Windows Kits*1" /B /O:N') do for %A in (%~I) do if "%A" == "8.1" set win=%A

(r-tensorflow) C:\Users\len\ANACON~1\envs\r-tensorflow\etc\conda\activate.d>for %A in (10) do if "%A" == "8.1" set win=%A

(r-tensorflow) C:\Users\len\ANACON~1\envs\r-tensorflow\etc\conda\activate.d>if "10" == "8.1" set win=10

(r-tensorflow) C:\Users\len\ANACON~1\envs\r-tensorflow\etc\conda\activate.d>for %A in (8.1) do if "%A" == "8.1" set win=%A

(r-tensorflow) C:\Users\len\ANACON~1\envs\r-tensorflow\etc\conda\activate.d>if "8.1" == "8.1" set win=8.1

(r-tensorflow) C:\Users\len\ANACON~1\envs\r-tensorflow\etc\conda\activate.d>for /F "tokens=" %I in ('dir "C:\Program Files (x86)\Windows Kits*1" /B /O:N') do for %A in (%~I) do if "%A" == "10" set win=%A

(r-tensorflow) C:\Users\len\ANACON~1\envs\r-tensorflow\etc\conda\activate.d>for %A in (10) do if "%A" == "10" set win=%A

(r-tensorflow) C:\Users\len\ANACON~1\envs\r-tensorflow\etc\conda\activate.d>if "10" == "10" set win=10

(r-tensorflow) C:\Users\len\ANACON~1\envs\r-tensorflow\etc\conda\activate.d>for %A in (8.1) do if "%A" == "10" set win=%A

(r-tensorflow) C:\Users\len\ANACON~1\envs\r-tensorflow\etc\conda\activate.d>if "8.1" == "10" set win=8.1

(r-tensorflow) C:\Users\len\ANACON~1\envs\r-tensorflow\etc\conda\activate.d>setlocal enabledelayedexpansion

(r-tensorflow) C:\Users\len\ANACON~1\envs\r-tensorflow\etc\conda\activate.d>if "10" == "10" ( for /F "tokens=" %I in ('dir "C:\Program Files (x86)\Windows Kits\10\bin\10" /B /O:N') do for %A in (%~I) do set last=%A
set "sdk_bin_path=C:\Program Files (x86)\Windows Kits\10\bin!last!\x86" ) else (set "sdk_bin_path=C:\Program Files (x86)\Windows Kits\8.1\bin\x86" ) File Not Found

(r-tensorflow) C:\Users\len\ANACON~1\envs\r-tensorflow\etc\conda\activate.d>endlocal & set "PATH=C:\Users\len\ANACON~1\envs\r-tensorflow;C:\Users\len\ANACON~1\envs\r-tensorflow\Library\mingw-w64\bin;C:\Users\len\ANACON~1\envs\r-tensorflow\Library\usr\bin;C:\Users\len\ANACON~1\envs\r-tensorflow\Library\bin;C:\Users\len\ANACON~1\envs\r-tensorflow\Scripts;C:\Users\len\Anaconda2\envs\r-tensorflow;C:\Users\len\Anaconda2\envs\r-tensorflow\Scripts;C:\Users\len\Anaconda2\envs\r-tensorflow\Library\bin;C:\Program Files\R\R-3.5.1\bin\x64;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\ProgramData\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files (x86)\Windows Live\Shared;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\Git\cmd;c:\x\Rtools\bin;c:\x\Rtools\gcc-4.6.3\bin;C:\Program Files\nodejs\;C:\Program Files (x86)\Pandoc\;C:\WINDOWS\System32\OpenSSH\;C:\X\MiKTeX 2.9\miktex\bin\x64\;C:\Users\len\Anaconda2;C:\Users\len\Anaconda2\Scripts;C:\Users\len\Anaconda2\Library\bin;C:\Users\len\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Microsoft VS Code\bin;C:\Users\len\AppData\Roaming\npm;C:\Program Files (x86)\Windows Kits\10\bin\x86"

(r-tensorflow) C:\Users\len\ANACON~1\envs\r-tensorflow\etc\conda\activate.d>SET "CMAKE_GENERATOR=Visual Studio 14 2015 Win64"

(r-tensorflow) C:\Users\len\ANACON~1\envs\r-tensorflow\etc\conda\activate.d>CALL "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE....\VC\vcvarsall.bat" amd64
Collecting tensorflow-probability Downloading https://files.pythonhosted.org/packages/a1/ca/6f213618b5f7d0bf6139e6ec928d412a5ca14e4776adfd41a59c74a34021/tensorflow_probability-0.5.0-py2.py3-none-any.whl (680kB) Collecting numpy>=1.13.3 (from tensorflow-probability) Downloading https://files.pythonhosted.org/packages/51/70/7096a735b27359dbc0c380b23b9c9bd05fea62233f95849c43a6b02c5f40/numpy-1.15.4-cp36-none-win_amd64.whl (13.5MB) Collecting six>=1.10.0 (from tensorflow-probability) Downloading https://files.pythonhosted.org/packages/67/4b/141a581104b1f6397bfa78ac9d43d8ad29a7ca43ea90a2d863fe3056e86a/six-1.11.0-py2.py3-none-any.whl Installing collected packages: numpy, six, tensorflow-probability Exception: Traceback (most recent call last): File "C:\Users\len\ANACON~1\envs\r-tensorflow\lib\site-packages\pip\basecommand.py", line 215, in main status = self.run(options, args) File "C:\Users\len\ANACON~1\envs\r-tensorflow\lib\site-packages\pip\commands\install.py", line 342, in run prefix=options.prefix_path, File "C:\Users\len\ANACON~1\envs\r-tensorflow\lib\site-packages\pip\req\req_set.py", line 784, in install **kwargs File "C:\Users\len\ANACON~1\envs\r-tensorflow\lib\site-packages\pip\req\req_install.py", line 851, in install self.move_wheel_files(self.source_dir, root=root, prefix=prefix) File "C:\Users\len\ANACON~1\envs\r-tensorflow\lib\site-packages\pip\req\req_install.py", line 1064, in move_wheel_files isolated=self.isolated, File "C:\Users\len\ANACON~1\envs\r-tensorflow\lib\site-packages\pip\wheel.py", line 345, in move_wheel_files clobber(source, lib_dir, True) File "C:\Users\len\ANACON~1\envs\r-tensorflow\lib\site-packages\pip\wheel.py", line 323, in clobber shutil.copyfile(srcfile, destfile) File "C:\Users\len\ANACON~1\envs\r-tensorflow\lib\shutil.py", line 121, in copyfile with open(dst, 'wb') as fdst: PermissionError: [Errno 13] Permission denied: 'C:\Users\len\ANACON~1\envs\r-tensorflow\Lib\site-packages\numpy\core\multiarray.cp36-win_amd64.pyd' You are using pip version 9.0.1, however version 18.1 is available. You should consider upgrading via the 'python -m pip install --upgrade pip' command. Error: Error 2 occurred installing packages into conda environment r-tensorflow

goldingn commented 6 years ago

It's possible anaconda was installed, or runs with one account (e.g. it might have asked for an administrator password during installation) but R / RStudio is being run with another. If so, you might be able to fix it by running R / RStudio as administrator and trying the conda installation of TF and TFP again.

rdinnager commented 5 years ago

@goldingn I can confirm that running Rstudio as administrator does not solve this issue. I get the exact same error message as @lenthomas running as administrator or not.. in Windows 10.. on two separate machines.

flyaflya commented 5 years ago

Sorry to be late to this discussion, but I now have some experience teaching greta to MBA Business Analytics students. I put together these instructions for install: https://bit.ly/2AXb4Yg

28 students used these instructions successfully on a mix of Windows and Mac machines. Maybe it can help you?

lenthomas commented 5 years ago

thanks for the suggestion @flyaflya. I followed the instructions (below); everything seemed to go well, but when I called library(greta) I got the same error message as before `greta requires TensorFlow (>=1.10.0) and Tensorflow Probability (>=0.3.0), but TensorFlow Probability isn't installed. Use:

install_tensorflow(method = "conda")
reticulate::conda_install("r-tensorflow", "tensorflow-probability", pip = TRUE)

to install the latest version.`

The instructions I followed were:

Failed on the last step :(

flyaflya commented 5 years ago

I have wrestled with this exact issue. The key marker of success is that within the r-tensorflow environment (i.e. reached via activate r-tensorflow from the anaconda prompt) to have conda list show installations of both tensorflow and tensorflow-probability. Knowing this can help debug. Also, do NOT run the reticulate::conda_install(... as that will undo everything you just did.

I have three suggestions to try to get it working in order of effort:

  1. Error message suggests you are only missing tensorflow-probability. Just add tensorflow-probability by rerunning these two lines from the anaconda prompt:

    conda activate r-tensorflow
    pip install --no-dependencies tensorflow-probability==0.4.0
  2. Go through steps again with a clean slate. Run these two lines to delete the r-tensorflow environment and go through the steps you did previously.:

    deactivate
    conda env remove --name r-tensorflow

    In above, use source deactivate if on a Mac.

  3. Full debug: Do step 2, but run conda list after each step. Record what is happening with the tensorflow and tensorflow-probability packages. Try to get to a state where they are both decent versions ... (note: Python will switch up versions for compatibility). My current state is shown below:

image

If you need to get to step 3, try to figure out which step is wiping out tensorflow-probability and we can try to debug from there.

lenthomas commented 5 years ago

Thanks so much for your help with this. I went back to the beginning, deactivating and then removing r-tensorflow, and then worked through steps 2 and 3, running conda list after each one. Here's what happened - bottom line is same problem as before.

afterstep2ii afterstep2iv afterstep2v afterstep2v_secondscreengrab afterstep2vi afterstep3

lenthomas commented 5 years ago

Note that tensorflow and tensorflow-probability are both listed by conda list.

flyaflya commented 5 years ago

Hmmm. Unfortunately, I am starting to swim outside of my depth here and maybe we can get more help on this from others. Seems the key issue now might be either 1) R is not finding your r-tensorflow environment (maybe a Python path?) or 2) something with that eigen... build in your screenshot (I am not familiar with this... Python is still quite foreign to me). The beauty of greta is you do not have to leave R, but these Python config issues sure are frustrating.

These lines run in R might fix the issue by using the right environment or help with debugging:

library(tensorflow)
use_condaenv("r-tensorflow", required = TRUE)
tf_config()  ## should match conda list
reticulate::py_module_available("tensorflow")  ## should return true
reticulate::py_module_available("tensorflow_probability")  ## should return true
library("greta")
lenthomas commented 5 years ago

Thanks. Yup, does seem to be a path issue capture Seemingly I have python in my path twice!

lenthomas commented 5 years ago

Weirdly, if I call tf_config() before use_condaenv, I get further - although it apparently still can't find tensorflow_probability, and I really don't understand why calling tf_config first makes any difference! capture

lenthomas commented 5 years ago

Perhaps a problem is that I'm using Python 3.6 and Tensorflow 1.10.0. I'm not quite sure where they are coming from, since I thought in following your instructions I'd end up with Python 3.6 and Tensorflow 1.11. Urgh!

rdinnager commented 5 years ago

Thanks so much for your help @flyaflya . I eventually got this working, though I had to use a slightly different sequence. This is possibly because I am trying to install the development version of greta which would seem to require tensorflow-probability > 0.5.0. So I just replaced the lines

pip install --no-dependencies tensorflow-probability==0.4.0
conda install tensorflow=1.11

with:

pip install --no-dependencies tensorflow-probability==0.5.0
conda install tensorflow=1.12

Kept everything else the same and it worked! One thing I found helpful while I was debugging was to try reticulate::import("tensorflow_probability"). I found that reticulate::py_module_available would return FALSE not only if a module was not installed but also if it won't load. reticulate::import would then return a more informative error message if the problem was that tensorflow-probability just wasn't loading. It wasn't loading on mine at one point because of a mismatch in the versions of my tensorflow-probability and my tensorflow modules. Perhaps it might help diagnose your problems @lenthomas ?

flyaflya commented 5 years ago

Glad the instructions were helpful for you @rdinnager. Thanks for saying so.

@lenthomas the tf_config() line makes it clear to me that R is finding tensorflow in a different location than the one you set-up using mini-conda (the paths and the tf versions are different). I am sure there is an elegant way to fix this issue, but I only know the brute force way. This is to uninstall all Python installations and start fresh. It seems that you might have both Anaconda and Mini-Conda installed which seems to be a problem: https://stackoverflow.com/questions/51585854/install-both-anaconda-and-miniconda

Since, this is really either: 1) R finding the a workable tensorflow environment with tfp or 2) possibly a Python configuration issue and not a bug with greta, I would recommend either using https://stackoverflow.com/ or the greta forum at https://forum.greta-stats.org/ to dig deeper if the brute force reinstall of Python does not fix things.

@goldingn - I would consider closing this issue as it is not directly a greta issue. However, if there were a way to make greta more robust to these types of Python configuration issues, that would be great enhancement... but even that might be something for the fine people at https://github.com/rstudio/tensorflow/ .

eteppo commented 5 years ago

Thank you. My issue was solved like below.

What greta needs and what it's detecting?

library(greta)
tensorflow::use_condaenv("r-tensorflow")
tensorflow::tf_config()
reticulate::py_module_available("tensorflow")
reticulate::py_module_available("tensorflow_probability")
reticulate::import("tensorflow_probability")

Fix install manually via shell (Ubuntu):

source activate r-tensorflow
pip install tensorflow==<CORRECT VERSION>
pip install tensorflow-probablity==<CORRECT VERSION>
reboot
tiboloic commented 5 years ago

I there, I had exactly the same problem than @lenthomas. I manage to solve it using the instructions provided by @flyaflya. Specifically I had to remove r-tensorflow and recreate it in Anaconda's command line interface. Thanks all

goldingn commented 5 years ago

I'm going to close this, as I think the latest version of r tensorflow (which greta now depends on) does a good job of installing these correctly. Please open a new issue if you have similar problems with the greta 0.3.1 though