John | 曲

Reflection in Transition

Install miniconda within rstudio

曲政 / 2020-05-23


plot(cars)

x = "Hello world"
print(x + "!")
## Hello world!
No non-system installation of Python could be found.
Would you like to download and install Miniconda?
Miniconda is an open source environment management system for Python.
See https://docs.conda.io/en/latest/miniconda.html for more details.


Would you like to install Miniconda? [Y/n]: y
* Downloading 'https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh' ...
trying URL 'https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh'
Content type 'application/x-sh' length 52755183 bytes (50.3 MB)
==================================================
downloaded 50.3 MB

* Installing Miniconda -- please wait a moment ...
PREFIX=/Users/johnqu/Library/r-miniconda
Unpacking payload ...
Collecting package metadata (current_repodata.json): ...working... done                                       
Solving environment: ...working... done

## Package Plan ##

  environment location: /Users/johnqu/Library/r-miniconda

  added / updated specs:
    - asn1crypto==1.3.0=py37_0
    - ca-certificates==2020.1.1=0
    - certifi==2019.11.28=py37_0
    - cffi==1.14.0=py37hb5b8e2f_0
    - chardet==3.0.4=py37_1003
    - conda-package-handling==1.6.0=py37h1de35cc_0
    - conda==4.8.2=py37_0
    - cryptography==2.8=py37ha12b0ac_0
    - idna==2.8=py37_0
    - libcxx==4.0.1=hcfea43d_1
    - libcxxabi==4.0.1=hcfea43d_1
    - libedit==3.1.20181209=hb402a30_0
    - libffi==3.2.1=h475c297_4
    - ncurses==6.2=h0a44026_0
    - openssl==1.1.1d=h1de35cc_4
    - pip==20.0.2=py37_1
    - pycosat==0.6.3=py37h1de35cc_0
    - pycparser==2.19=py37_0
    - pyopenssl==19.1.0=py37_0
    - pysocks==1.7.1=py37_0
    - python.app==2=py37_10
    - python==3.7.6=h359304d_2
    - readline==7.0=h1de35cc_5
    - requests==2.22.0=py37_1
    - ruamel_yaml==0.15.87=py37h1de35cc_0
    - setuptools==45.2.0=py37_0
    - six==1.14.0=py37_0
    - sqlite==3.31.1=ha441bb4_0
    - tk==8.6.8=ha441bb4_0
    - tqdm==4.42.1=py_0
    - urllib3==1.25.8=py37_0
    - wheel==0.34.2=py37_0
    - xz==5.2.4=h1de35cc_4
    - yaml==0.1.7=hc338f04_2
    - zlib==1.2.11=h1de35cc_3


The following NEW packages will be INSTALLED:

  asn1crypto         pkgs/main/osx-64::asn1crypto-1.3.0-py37_0
  ca-certificates    pkgs/main/osx-64::ca-certificates-2020.1.1-0
  certifi            pkgs/main/osx-64::certifi-2019.11.28-py37_0
  cffi               pkgs/main/osx-64::cffi-1.14.0-py37hb5b8e2f_0
  chardet            pkgs/main/osx-64::chardet-3.0.4-py37_1003
  conda              pkgs/main/osx-64::conda-4.8.2-py37_0
  conda-package-han~ pkgs/main/osx-64::conda-package-handling-1.6.0-py37h1de35cc_0
  cryptography       pkgs/main/osx-64::cryptography-2.8-py37ha12b0ac_0
  idna               pkgs/main/osx-64::idna-2.8-py37_0
  libcxx             pkgs/main/osx-64::libcxx-4.0.1-hcfea43d_1
  libcxxabi          pkgs/main/osx-64::libcxxabi-4.0.1-hcfea43d_1
  libedit            pkgs/main/osx-64::libedit-3.1.20181209-hb402a30_0
  libffi             pkgs/main/osx-64::libffi-3.2.1-h475c297_4
  ncurses            pkgs/main/osx-64::ncurses-6.2-h0a44026_0
  openssl            pkgs/main/osx-64::openssl-1.1.1d-h1de35cc_4
  pip                pkgs/main/osx-64::pip-20.0.2-py37_1
  pycosat            pkgs/main/osx-64::pycosat-0.6.3-py37h1de35cc_0
  pycparser          pkgs/main/osx-64::pycparser-2.19-py37_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.6-h359304d_2
  python.app         pkgs/main/osx-64::python.app-2-py37_10
  readline           pkgs/main/osx-64::readline-7.0-h1de35cc_5
  requests           pkgs/main/osx-64::requests-2.22.0-py37_1
  ruamel_yaml        pkgs/main/osx-64::ruamel_yaml-0.15.87-py37h1de35cc_0
  setuptools         pkgs/main/osx-64::setuptools-45.2.0-py37_0
  six                pkgs/main/osx-64::six-1.14.0-py37_0
  sqlite             pkgs/main/osx-64::sqlite-3.31.1-ha441bb4_0
  tk                 pkgs/main/osx-64::tk-8.6.8-ha441bb4_0
  tqdm               pkgs/main/noarch::tqdm-4.42.1-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.4-h1de35cc_4
  yaml               pkgs/main/osx-64::yaml-0.1.7-hc338f04_2
  zlib               pkgs/main/osx-64::zlib-1.2.11-h1de35cc_3


Preparing transaction: ...working... done
Executing transaction: ...working... done
installation finished.
Collecting package metadata (current_repodata.json): ...working... done
Solving environment: ...working... done

## Package Plan ##

  environment location: /Users/johnqu/Library/r-miniconda

  added / updated specs:
    - conda


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    certifi-2020.4.5.1         |           py37_0         155 KB
    conda-4.8.3                |           py37_0         2.8 MB
    conda-package-handling-1.6.1|   py37h1de35cc_0         1.3 MB
    cryptography-2.9.2         |   py37ha12b0ac_0         547 KB
    idna-2.9                   |             py_1          49 KB
    libcxx-10.0.0              |                1         760 KB
    libffi-3.2.1               |       h0a44026_6          39 KB
    ncurses-6.2                |       h0a44026_1         749 KB
    openssl-1.1.1g             |       h1de35cc_0         2.2 MB
    pip-20.0.2                 |           py37_3         1.7 MB
    pycparser-2.20             |             py_0          92 KB
    requests-2.23.0            |           py37_0          92 KB
    setuptools-46.4.0          |           py37_0         522 KB
    sqlite-3.31.1              |       h5c1f38d_1         1.3 MB
    tqdm-4.46.0                |             py_0          60 KB
    xz-5.2.5                   |       h1de35cc_0         240 KB
    ------------------------------------------------------------
                                           Total:        12.5 MB

The following packages will be REMOVED:

  asn1crypto-1.3.0-py37_0
  libcxxabi-4.0.1-hcfea43d_1

The following packages will be UPDATED:

  certifi                                 2019.11.28-py37_0 --> 2020.4.5.1-py37_0
  conda                                        4.8.2-py37_0 --> 4.8.3-py37_0
  conda-package-han~                   1.6.0-py37h1de35cc_0 --> 1.6.1-py37h1de35cc_0
  cryptography                           2.8-py37ha12b0ac_0 --> 2.9.2-py37ha12b0ac_0
  idna                    pkgs/main/osx-64::idna-2.8-py37_0 --> pkgs/main/noarch::idna-2.9-py_1
  libcxx                                   4.0.1-hcfea43d_1 --> 10.0.0-1
  libffi                                   3.2.1-h475c297_4 --> 3.2.1-h0a44026_6
  ncurses                                    6.2-h0a44026_0 --> 6.2-h0a44026_1
  openssl                                 1.1.1d-h1de35cc_4 --> 1.1.1g-h1de35cc_0
  pip                                         20.0.2-py37_1 --> 20.0.2-py37_3
  pycparser          pkgs/main/osx-64::pycparser-2.19-py37~ --> pkgs/main/noarch::pycparser-2.20-py_0
  requests                                    2.22.0-py37_1 --> 2.23.0-py37_0
  setuptools                                  45.2.0-py37_0 --> 46.4.0-py37_0
  sqlite                                  3.31.1-ha441bb4_0 --> 3.31.1-h5c1f38d_1
  tqdm                                          4.42.1-py_0 --> 4.46.0-py_0
  xz                                       5.2.4-h1de35cc_4 --> 5.2.5-h1de35cc_0



Downloading and Extracting Packages
setuptools-46.4.0    | 522 KB    | ########## | 100% 
conda-package-handli | 1.3 MB    | ########## | 100% 
pycparser-2.20       | 92 KB     | ########## | 100% 
pip-20.0.2           | 1.7 MB    | ########## | 100% 
openssl-1.1.1g       | 2.2 MB    | ########## | 100% 
xz-5.2.5             | 240 KB    | ########## | 100% 
idna-2.9             | 49 KB     | ########## | 100% 
sqlite-3.31.1        | 1.3 MB    | ########## | 100% 
certifi-2020.4.5.1   | 155 KB    | ########## | 100% 
ncurses-6.2          | 749 KB    | ########## | 100% 
libcxx-10.0.0        | 760 KB    | ########## | 100% 
tqdm-4.46.0          | 60 KB     | ########## | 100% 
requests-2.23.0      | 92 KB     | ########## | 100% 
cryptography-2.9.2   | 547 KB    | ########## | 100% 
conda-4.8.3          | 2.8 MB    | ########## | 100% 
libffi-3.2.1         | 39 KB     | ########## | 100% 
Preparing transaction: ...working... done
Verifying transaction: ...working... done
Executing transaction: ...working... done
Collecting package metadata (current_repodata.json): ...working... done
Solving environment: ...working... done

## Package Plan ##

  environment location: /Users/johnqu/Library/r-miniconda/envs/r-reticulate

  added / updated specs:
    - numpy
    - python=3.6


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    blas-1.0                   |              mkl           6 KB
    certifi-2020.4.5.1         |           py36_0         155 KB
    intel-openmp-2019.4        |              233         887 KB
    libffi-3.3                 |       h0a44026_1          45 KB
    libgfortran-3.0.1          |       h93005f0_2         426 KB
    mkl-2019.4                 |              233       101.9 MB
    mkl-service-2.3.0          |   py36hfbe908c_0         202 KB
    mkl_fft-1.0.15             |   py36h5e564d8_0         139 KB
    mkl_random-1.1.0           |   py36ha771720_0         287 KB
    numpy-1.18.1               |   py36h7241aed_0           5 KB
    numpy-base-1.18.1          |   py36h3304bdc_1         4.0 MB
    pip-20.0.2                 |           py36_3         1.7 MB
    python-3.6.10              |       hf48f09d_2        17.1 MB
    readline-8.0               |       h1de35cc_0         326 KB
    setuptools-46.4.0          |           py36_0         513 KB
    six-1.14.0                 |           py36_0          26 KB
    wheel-0.34.2               |           py36_0          50 KB
    ------------------------------------------------------------
                                           Total:       127.7 MB

The following NEW packages will be INSTALLED:

  blas               pkgs/main/osx-64::blas-1.0-mkl
  ca-certificates    pkgs/main/osx-64::ca-certificates-2020.1.1-0
  certifi            pkgs/main/osx-64::certifi-2020.4.5.1-py36_0
  intel-openmp       pkgs/main/osx-64::intel-openmp-2019.4-233
  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
  libgfortran        pkgs/main/osx-64::libgfortran-3.0.1-h93005f0_2
  mkl                pkgs/main/osx-64::mkl-2019.4-233
  mkl-service        pkgs/main/osx-64::mkl-service-2.3.0-py36hfbe908c_0
  mkl_fft            pkgs/main/osx-64::mkl_fft-1.0.15-py36h5e564d8_0
  mkl_random         pkgs/main/osx-64::mkl_random-1.1.0-py36ha771720_0
  ncurses            pkgs/main/osx-64::ncurses-6.2-h0a44026_1
  numpy              pkgs/main/osx-64::numpy-1.18.1-py36h7241aed_0
  numpy-base         pkgs/main/osx-64::numpy-base-1.18.1-py36h3304bdc_1
  openssl            pkgs/main/osx-64::openssl-1.1.1g-h1de35cc_0
  pip                pkgs/main/osx-64::pip-20.0.2-py36_3
  python             pkgs/main/osx-64::python-3.6.10-hf48f09d_2
  readline           pkgs/main/osx-64::readline-8.0-h1de35cc_0
  setuptools         pkgs/main/osx-64::setuptools-46.4.0-py36_0
  six                pkgs/main/osx-64::six-1.14.0-py36_0
  sqlite             pkgs/main/osx-64::sqlite-3.31.1-h5c1f38d_1
  tk                 pkgs/main/osx-64::tk-8.6.8-ha441bb4_0
  wheel              pkgs/main/osx-64::wheel-0.34.2-py36_0
  xz                 pkgs/main/osx-64::xz-5.2.5-h1de35cc_0
  zlib               pkgs/main/osx-64::zlib-1.2.11-h1de35cc_3



Downloading and Extracting Packages
mkl-2019.4           | 101.9 MB  | #######6   |  77% 
libgfortran-3.0.1    | 426 KB    | ########## | 100% 
libffi-3.3           | 45 KB     | ########## | 100% 
python-3.6.10        | 17.1 MB   | ########## | 100% 
wheel-0.34.2         | 50 KB     | ########## | 100% 
mkl_fft-1.0.15       | 139 KB    | ########## | 100% 
mkl-service-2.3.0    | 202 KB    | ########## | 100% 
blas-1.0             | 6 KB      | ########## | 100% 
numpy-1.18.1         | 5 KB      | ########## | 100% 
numpy-base-1.18.1    | 4.0 MB    | ########## | 100% 
pip-20.0.2           | 1.7 MB    | ########## | 100% 
readline-8.0         | 326 KB    | ########## | 100% 
setuptools-46.4.0    | 513 KB    | ########## | 100% 
six-1.14.0           | 26 KB     | ########## | 100% 
intel-openmp-2019.4  | 887 KB    | ########## | 100% 
certifi-2020.4.5.1   | 155 KB    | ########## | 100% 
mkl_random-1.1.0     | 287 KB    | ########## | 100% 

CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.anaconda.com/pkgs/main/osx-64/mkl-2019.4-233.conda>
Elapsed: -

An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your way.


Error: Error 1 occurred creating conda environment r-reticulate
Collecting package metadata (current_repodata.json): ...working... done
Solving environment: ...working... done

## Package Plan ##

  environment location: /Users/johnqu/Library/r-miniconda/envs/r-reticulate

  added / updated specs:
    - numpy
    - python=3.6


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    mkl-2019.4                 |              233       101.9 MB
    ------------------------------------------------------------
                                           Total:       101.9 MB

The following NEW packages will be INSTALLED:

  blas               pkgs/main/osx-64::blas-1.0-mkl
  ca-certificates    pkgs/main/osx-64::ca-certificates-2020.1.1-0
  certifi            pkgs/main/osx-64::certifi-2020.4.5.1-py36_0
  intel-openmp       pkgs/main/osx-64::intel-openmp-2019.4-233
  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
  libgfortran        pkgs/main/osx-64::libgfortran-3.0.1-h93005f0_2
  mkl                pkgs/main/osx-64::mkl-2019.4-233
  mkl-service        pkgs/main/osx-64::mkl-service-2.3.0-py36hfbe908c_0
  mkl_fft            pkgs/main/osx-64::mkl_fft-1.0.15-py36h5e564d8_0
  mkl_random         pkgs/main/osx-64::mkl_random-1.1.0-py36ha771720_0
  ncurses            pkgs/main/osx-64::ncurses-6.2-h0a44026_1
  numpy              pkgs/main/osx-64::numpy-1.18.1-py36h7241aed_0
  numpy-base         pkgs/main/osx-64::numpy-base-1.18.1-py36h3304bdc_1
  openssl            pkgs/main/osx-64::openssl-1.1.1g-h1de35cc_0
  pip                pkgs/main/osx-64::pip-20.0.2-py36_3
  python             pkgs/main/osx-64::python-3.6.10-hf48f09d_2
  readline           pkgs/main/osx-64::readline-8.0-h1de35cc_0
  setuptools         pkgs/main/osx-64::setuptools-46.4.0-py36_0
  six                pkgs/main/osx-64::six-1.14.0-py36_0
  sqlite             pkgs/main/osx-64::sqlite-3.31.1-h5c1f38d_1
  tk                 pkgs/main/osx-64::tk-8.6.8-ha441bb4_0
  wheel              pkgs/main/osx-64::wheel-0.34.2-py36_0
  xz                 pkgs/main/osx-64::xz-5.2.5-h1de35cc_0
  zlib               pkgs/main/osx-64::zlib-1.2.11-h1de35cc_3



Downloading and Extracting Packages
mkl-2019.4           | 101.9 MB  | ########## | 100% 
Preparing transaction: ...working... done
Verifying transaction: ...working... done
Executing transaction: ...working... done
#
# To activate this environment, use
#
#     $ conda activate /Users/johnqu/Library/r-miniconda/envs/r-reticulate
#
# To deactivate an active environment, use
#
#     $ conda deactivate