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

Python packages are not available after successful install macOS #754

Closed
adamhsparks opened this issue Dec 18, 2024 · 5 comments
Closed

Comments

@adamhsparks
Copy link

adamhsparks commented Dec 18, 2024

This seems like #572 but it's on macOS.

Installing or reinstalling greta deps still does not result in a usable state for me. This is the start of a new session as per the suggested workflow.

[ins] r$> reinstall_greta_deps()
ℹ removing 'greta-env-tf2' conda environment
+ /Users/283204f/Library/r-miniconda-arm64/bin/conda remove --yes --name greta-env-tf2 --all

Remove all packages in environment /Users/283204f/Library/r-miniconda-arm64/envs/greta-env-tf2:


## Package Plan ##

  environment location: /Users/283204f/Library/r-miniconda-arm64/envs/greta-env-tf2


The following packages will be REMOVED:

  bzip2-1.0.8-h99b78c6_7
  ca-certificates-2024.12.14-hf0a4a13_0
  libffi-3.4.2-h3422bc3_5
  liblzma-5.6.3-h39f12f2_1
  libsqlite-3.47.2-h3f77e49_0
  libzlib-1.3.1-h8359307_2
  ncurses-6.5-h7bae524_1
  openssl-3.4.0-h39f12f2_0
  pip-24.3.1-pyh8b19718_2
  python-3.10.16-h870587a_1_cpython
  readline-8.2-h92ec313_1
  setuptools-75.6.0-pyhff2d567_1
  tk-8.6.13-h5083fa2_1
  tzdata-2024b-hc8b5060_0
  wheel-0.45.1-pyhd8ed1ab_1



Downloading and Extracting Packages:

Preparing transaction: done
Verifying transaction: done
Executing transaction: donegreta-env-tf2 environment removed!
Are you sure you want to delete miniconda from /Users/283204f/Library/r-miniconda-arm64?
1: Nope
2: Yes
3: I forget


[ins] Selection: 2removing 'miniconda' installation'miniconda' successfully removed!miniconda installed!greta-env-tf2 environment created!Python modules installed!Logfile written to /Users/283204f/Library/Application Support/org.R-project.R…
✔ Open with: `open_greta_install_log()` [24ms]
✔ Installation of greta dependencies is complete!
[ins] r$> q()

Start new session.

[ins] r$> library(mgcv)
Loading required package: nlme
This is mgcv 1.9-1. For overview type 'help("mgcv-package")'.

[ins] r$> dat <- gamSim(1, n = 400, dist = "normal", scale = 0.3)
Gu & Wahba 4 term additive model

[ins] r$> library(greta.gam)
          #> Loading required package: greta
          #>
          #> 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
          set.seed(2024 - 02 - 09)
          # setup the linear predictor for the smooth
          linear_predictor <- smooths(~ s(x2), data = dat)
Loading required package: greta

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,
    tapplyInitialising python and checking dependencies, this may take a moment. ... faError in `check_tf_version()`:
!The expected python packages are not availableWe recommend installing them (in a fresh R session) with:
`install_greta_deps()`
or
`reinstall_greta_deps()`
(Note: Your R session should not have initialised Tensorflow yet.)
ℹ For more information, see `?install_greta_deps`
Run `rlang::last_trace()` to see where the error occurred.

[ins] r$>

macOS 15.2, R 4.4.2

@njtierney
Copy link
Collaborator

Thanks for posting this, Adam! Are you able to share the logfile that is written out - perhaps via slack? You should be able to open it with:

greta::open_greta_install_log()

Also are you running this in RStudio / Positron / CLI ? Just out of curiousity!

@adamhsparks
Copy link
Author

This was radian. I'll try just an R console and share the outputs with you via Slack.

@adamhsparks
Copy link
Author

adamhsparks commented Dec 18, 2024

Heh, well, there you go. It appears that radian interferes here!

In just a regular R session it works.

edit also works in my RStudio as well. 😎

@njtierney
Copy link
Collaborator

OK glad to hear it works! That's a bit spooky with Radian, but perhaps there's something going on there with using Radian as it uses Python?

@adamhsparks
Copy link
Author

this was my thinking as well about radian being a Python package as well.

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

No branches or pull requests

2 participants