-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcopernicus-sdm.qmd
145 lines (102 loc) · 5.57 KB
/
copernicus-sdm.qmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
---
title: "copernicus-sdm"
editor: visual
---
## Goals
- Extract Copernicus env by month
- Predict at historical and future monthly / annual time steps to show change
## Fetch
```{python}
import sys
import platform
print(sys.path)
print(sys.version)
```
Python 3.8.10
\* \[Copernicus Marine Toolbox - Installation \| Copernicus Marine Help Center\](https://help.marine.copernicus.eu/en/articles/7970514-copernicus-marine-toolbox-installation)
> **For now,** **the Copernicus Marine Toolbox works only with a version of Python \>=3.9, \<3.13.**
After initial render:
ModuleNotFoundError: No module named 'nbformat'
Python 3 installation:
Version: 3.8.10
Path: /opt/venv/r-reticulate/bin/python3
Jupyter: (None)
Jupyter is not available in this Python installation.
Install with python3 -m pip install jupyter
[notice] A new release of pip is available: 23.2.1 -> 24.0
[notice] To update, run: python3 -m pip install --upgrade pip
```{bash}
#| eval: false
/opt/venv/r-reticulate/bin/python3 -m pip install jupyter
```
[notice] A new release of pip is available: 23.2.1 -> 24.0
[notice] To update, run: python3 -m pip install --upgrade pip
```{bash}
#| eval: false
/opt/venv/r-reticulate/bin/python3 -m pip install --upgrade pip
/opt/venv/r-reticulate/bin/python3 --version
```
Python 3.8.10
```{r}
#| eval: false
librarian::shelf(reticulate)
install_python(version = "3.12:latest", list = FALSE, force = FALSE)
```
trying URL 'https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer'
Content type 'text/plain; charset=utf-8' length 2827 bytes
==================================================
downloaded 2827 bytes
Installing pyenv ...
Cloning into '/home/admin/.local/share/r-reticulate/pyenv'...
Cloning into '/home/admin/.local/share/r-reticulate/pyenv/plugins/pyenv-doctor'...
Cloning into '/home/admin/.local/share/r-reticulate/pyenv/plugins/pyenv-update'...
Cloning into '/home/admin/.local/share/r-reticulate/pyenv/plugins/pyenv-virtualenv'...
WARNING: seems you still have not added 'pyenv' to the load path.
# Load pyenv automatically by appending
# the following to
# ~/.bash_profile if it exists, otherwise ~/.profile (for login shells)
# and ~/.bashrc (for interactive shells) :
export PYENV_ROOT="$HOME/.pyenv"
[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
# Restart your shell for the changes to take effect.
# Load pyenv-virtualenv automatically by adding
# the following to ~/.bashrc:
eval "$(pyenv virtualenv-init -)"
Done! pyenv has been installed to '/home/admin/.local/share/r-reticulate/pyenv/bin/pyenv'.
Cloning into '/home/admin/.pyenv/plugins/pyenv-update'...
+ /home/admin/.local/share/r-reticulate/pyenv/bin/pyenv update
+ /home/admin/.local/share/r-reticulate/pyenv/bin/pyenv install --skip-existing 3.12.2
Downloading Python-3.12.2.tar.xz...
-> https://www.python.org/ftp/python/3.12.2/Python-3.12.2.tar.xz
Installing Python-3.12.2...
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/admin/.pyenv/versions/3.12.2/lib/python3.12/curses/__init__.py", line 13, in <module>
from _curses import *
ModuleNotFoundError: No module named '_curses'
WARNING: The Python curses extension was not compiled. Missing the ncurses lib?
Traceback (most recent call last):
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'readline'
WARNING: The Python readline extension was not compiled. Missing the GNU readline lib?
Installed Python-3.12.2 to /home/admin/.pyenv/versions/3.12.2
[1] "/home/admin/.pyenv/versions/3.12.2/bin/python3.12"
Added to `~/.profile` and `~/.bashrc`:
# R reticulate::install_python(version = "3.12:latest", list = FALSE, force = FALSE)
export PYENV_ROOT="$HOME/.pyenv"
[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
```{}
```
Python interpreter
- `/home/admin/.pyenv/versions/3.12.2`FAILS
- `/usr/bin/python3.12`WORKS
'/usr/bin/python3.12' '/usr/local/lib/R/site-library/reticulate/config/config.py'
Traceback (most recent call last):
File "/usr/local/lib/R/site-library/reticulate/config/config.py", line 16, in <module>
import imp
ModuleNotFoundError: No module named 'imp'
docker run --hostname=6f2e649c9608 --env=PATH=/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin --env=LANG=C.UTF-8 --env=GPG_KEY=7169605F62C751356D054A26A821E680E5FA6305 --env=PYTHON_VERSION=3.12.2 --env=PYTHON_PIP_VERSION=24.0 --env=PYTHON_GET_PIP_URL=https://github.com/pypa/get-pip/raw/dbf0c85f76fb6e1ab42aa672ffca6f0a675d9ee4/public/get-pip.py --env=PYTHON_GET_PIP_SHA256=dfe9fd5c28dc98b5ac17979a953ea550cec37ae1b47a5116007395bfacff2ab9 --volume=/Users/bbest:/home/bbest --runtime=runc -d copernicusmarine/copernicusmarine:1.0.5
docker run --hostname=6f2e649c9608 --env=PATH=/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin --env=LANG=C.UTF-8 --env=GPG_KEY=7169605F62C751356D054A26A821E680E5FA6305 --env=PYTHON_VERSION=3.12.2 --env=PYTHON_PIP_VERSION=24.0 --env=PYTHON_GET_PIP_URL=https://github.com/pypa/get-pip/raw/dbf0c85f76fb6e1ab42aa672ffca6f0a675d9ee4/public/get-pip.py --env=PYTHON_GET_PIP_SHA256=dfe9fd5c28dc98b5ac17979a953ea550cec37ae1b47a5116007395bfacff2ab9 --volume=/Users/bbest:/bbest --runtime=runc -d copernicusmarine/copernicusmarine:1.0.5
docker run -d -it --volume=/Users/bbest:/bbest copernicusmarine/copernicusmarine:1.0.5 /bin/bash