conda - R Essentials missing dependencies on offline private repository - r

I'm currenty trying to install R essentials package for Anaconda on virtual Linux RedHat machine which doesn't have access to internet (that's why usual
conda install c -r r-essentials
won't work). To do that I've downloaded from air gap repository linux-64-pkgs.tar file from 2017-08/anaconda-server-sync-conda/ directory and used only r (r\pkgs\linux-64) directory from it.
Then I followed the instructions from this link. Since the directory contained repodata.json and repodata.json.bz2, it is not necessary to build and index files by following this instruction. After i run
conda install r-essentials
happens this:
Fetching package metadata ....
WARNING: The remote server could not find the noarch directory for the
requested channel with url: file:///home/math/conda-r/repo.continuum.io/pkgs/r
It is possible you have given conda an invalid channel. Please double-check
your conda configuration using `conda config --show`.
If the requested url is in fact a valid conda channel, please request that the
channel administrator create `noarch/repodata.json` and associated
`noarch/repodata.json.bz2` files, even if `noarch/repodata.json` is empty.
$ mkdir noarch
$ echo '{}' > noarch/repodata.json
$ bzip2 -k noarch/repodata.json
.
Solving package specifications:
PackageNotFoundError: Dependencies missing in current linux-64 channels:
- r-essentials -> r 3.2.1* -> r-base 3.2.1 -> ncurses
- r-essentials -> r 3.2.1* -> r-recommended 3.2.1 -> r-boot
- r-essentials -> r 3.2.1* -> r-recommended 3.2.1 -> r-class -> r-mass
- r-essentials -> r 3.2.1* -> r-recommended 3.2.1 -> r-cluster
- r-essentials -> r 3.2.1* -> r-recommended 3.2.1 -> r-codetools
- r-essentials -> r 3.2.1* -> r-recommended 3.2.1 -> r-foreign
- r-essentials -> r 3.2.1* -> r-recommended 3.2.1 -> r-kernsmooth
- r-essentials -> r 3.2.1* -> r-recommended 3.2.1 -> r-lattice
- r-essentials -> r 3.2.1* -> r-recommended 3.2.1 -> r-matrix
- r-essentials -> r 3.2.1* -> r-recommended 3.2.1 -> r-mgcv -> r-nlme >=3.1_64
- r-essentials -> r 3.2.1* -> r-recommended 3.2.1 -> r-nnet
- r-essentials -> r 3.2.1* -> r-recommended 3.2.1 -> r-rpart
- r-essentials -> r 3.2.1* -> r-recommended 3.2.1 -> r-spatial
- r-essentials -> r 3.2.1* -> r-recommended 3.2.1 -> r-survival
- r-essentials -> r-caret -> r-bradleyterry2 -> r-brglm -> r-profilemodel
- r-essentials -> r-caret -> r-bradleyterry2 -> r-gtools
- r-essentials -> r-caret -> r-bradleyterry2 -> r-lme4 >=1.0 -> r-minqa >=1.1.15 -> r-rcpp >=0.9.10
- r-essentials -> r-caret -> r-bradleyterry2 -> r-lme4 >=1.0 -> r-nloptr >=1.0.4 -> nlopt
- r-essentials -> r-caret -> r-bradleyterry2 -> r-lme4 >=1.0 -> r-rcppeigen
- r-essentials -> r-caret -> r-car -> r-pbkrtest >=0.3_2
- r-essentials -> r-caret -> r-car -> r-quantreg -> r-sparsem
- r-essentials -> r-caret -> r-car -> r-quantreg -> r-matrixmodels
- r-essentials -> r-caret -> r-foreach -> r-iterators
- r-essentials -> r-caret -> r-ggplot2 -> r-digest
- r-essentials -> r-caret -> r-ggplot2 -> r-gtable >=0.1.1
- r-essentials -> r-caret -> r-ggplot2 -> r-plyr >=1.7.1
- r-essentials -> r-caret -> r-ggplot2 -> r-proto
- r-essentials -> r-caret -> r-ggplot2 -> r-reshape2 -> r-stringr -> r-magrittr
- r-essentials -> r-caret -> r-ggplot2 -> r-reshape2 -> r-stringr -> r-stringi >=0.4.1
- r-essentials -> r-caret -> r-ggplot2 -> r-scales >=0.2.3 -> r-dichromat
- r-essentials -> r-caret -> r-ggplot2 -> r-scales >=0.2.3 -> r-labeling
- r-essentials -> r-caret -> r-ggplot2 -> r-scales >=0.2.3 -> r-munsell >=0.2 -> r-colorspace
- r-essentials -> r-caret -> r-ggplot2 -> r-scales >=0.2.3 -> r-rcolorbrewer
- r-essentials -> r-caret -> r-ggplot2 -> r-lazyeval
- r-essentials -> r-caret -> r-ggplot2 -> r-tibble -> r-assertthat
- r-essentials -> r-caret -> r-ggplot2 -> r-tibble -> r-rlang
- r-essentials -> r-caret -> r-modelmetrics >=1.1.0
- r-essentials -> r-data.table -> r-chron
- r-essentials -> r-dplyr -> r-bh >=1.58.0_1
- r-essentials -> r-dplyr -> r-dbi >=0.3
- r-essentials -> r-dplyr -> r-r6
- r-essentials -> r-dplyr -> r-bindrcpp -> r-bindr
- r-essentials -> r-dplyr -> r-bindrcpp -> r-plogr
- r-essentials -> r-dplyr -> r-glue
- r-essentials -> r-dplyr -> r-pkgconfig
- r-essentials -> r-glmnet
- r-essentials -> r-jsonlite
- r-essentials -> r-quantmod -> r-ttr >=0.2 -> r-xts >=0.9_3 -> r-zoo >=1.7_10
- r-essentials -> r-quantmod -> r-curl
- r-essentials -> r-randomforest
- r-essentials -> r-rmarkdown -> r-catools -> r-bitops
- r-essentials -> r-rmarkdown -> r-htmltools >=0.2.4
- r-essentials -> r-rmarkdown -> r-knitr >=1.6 -> r-evaluate >=0.6
- r-essentials -> r-rmarkdown -> r-knitr >=1.6 -> r-formatr
- r-essentials -> r-rmarkdown -> r-knitr >=1.6 -> r-highr
- r-essentials -> r-rmarkdown -> r-knitr >=1.6 -> r-markdown -> r-mime >=0.3
- r-essentials -> r-rmarkdown -> r-knitr >=1.6 -> r-yaml >=2.1.5
- r-essentials -> r-rmarkdown -> r-base64enc
- r-essentials -> r-rmarkdown -> r-rprojroot -> r-backports
- r-essentials -> r-rmarkdown -> pandoc >=1.15.0
- r-essentials -> r-shiny -> r-httpuv >=1.3.2
- r-essentials -> r-shiny -> r-rjsonio
- r-essentials -> r-shiny -> r-xtable
- r-essentials -> r-shiny -> r-sourcetools
- r-essentials -> r-tidyr
- r-essentials -> r-irkernel -> ipython-notebook
- r-essentials -> r-irkernel -> r-irdisplay -> r-repr
- r-essentials -> r-irkernel -> r-rzmq >=0.7.0
- r-essentials -> r-irkernel -> r-uuid
- r-essentials -> r-irkernel -> r-pbdzmq >=0.2_1
- r-essentials -> r-irkernel -> r-crayon -> r-memoise
- r-essentials -> r-rbokeh -> r-hexbin
- r-essentials -> r-rbokeh -> r-htmlwidgets
- r-essentials -> r-rbokeh -> r-maps
- r-essentials -> r-rbokeh -> r-gistr -> r-httr >=1.0.0 -> r-openssl >=0.8
- r-essentials -> r-rbokeh -> r-pryr
- r-essentials -> r-broom >=0.4.1 -> r-psych -> r-mnormt
- r-essentials -> r-forcats >=0.1.1
- r-essentials -> r-haven >=1.0.0 -> r-hms
- r-essentials -> r-haven >=1.0.0 -> r-readr >=0.1.0
- r-essentials -> r-lubridate >=1.6.0
- r-essentials -> r-modelr >=0.1.0 -> r-purrr >=0.2.2
- r-essentials -> r-readxl >=0.1.1 -> r-cellranger -> r-rematch
- r-essentials -> r-rvest >=0.3.2 -> r-selectr
- r-essentials -> r-rvest >=0.3.2 -> r-xml2
- r-essentials -> r-tidyverse >=1.0.0
Close matches found; did you mean one of these?
nlopt: r-nloptr
pandoc: pango
(and similarly for the other packages)
I also copied these repodata.* files to /noarch directory, but nothing changed except part between Fetching package metadata .... and Solving package specifications: is now not shown.
Is it conda r package issue or I'm doing something wrong?

I have the same problem.But the difference is that I followed the post and only downloaded the required packages. But unexpectedly, I found the package r-base was not downloaded. So I downloaded it again.
Then I built the conda repo by the command conda index. When I used the following command:
conda install r r-essentials -c file:///opt/kevin/channel --override-channels
It didn't make work.I would update r-base with the default channel(it needs internet)
enter image description here

Related

How to download DESeq2 in miniconda3 environment?

I created an environment using miniconda3 with the following commands:
conda create -n r_ngs r-essentials r-base
source activate r_ngs
I needed to download some extra packages and I managed to download biomart and tximport with the following commands.
conda install -c bioconda bioconductor-tximport
conda install -c bioconda bioconductor-biomart
However, then I tried to install DESeq2 but I am getting errors. The command and errors are shown below.
conda install -c bioconda bioconductor-deseq2
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: \
Found conflicts! Looking for incompatible packages. failed
UnsatisfiableError: The following specifications were found to be incompatible with each other:
Output in format: Requested package -> Available versions
Package libgcc-ng conflicts for:
bioconductor-deseq2 -> libgcc-ng[version='>=10.3.0|>=12|>=9.4.0|>=9.3.0|>=7.5.0|>=7.3.0|>=4.9']
bioconductor-deseq2 -> r-base[version='>=4.2,<4.3.0a0'] -> libgcc-ng[version='7.2.0.*|>=11.2.0|>=7.2.0']
Package libstdcxx-ng conflicts for:
bioconductor-deseq2 -> r-base[version='>=4.2,<4.3.0a0'] -> libstdcxx-ng[version='7.2.0.*|>=11.2.0|>=7.2.0']
bioconductor-deseq2 -> libstdcxx-ng[version='>=10.3.0|>=12|>=9.4.0|>=9.3.0|>=7.5.0|>=7.3.0|>=4.9']
Package xz conflicts for:
python=3.10 -> xz[version='>=5.2.5,<6.0a0|>=5.2.6,<6.0a0']
bioconductor-deseq2 -> r-base[version='>=4.2,<4.3.0a0'] -> xz[version='5.2.*|>=5.2.4,<6.0a0|>=5.2.5,<6.0a0']The following specifications were found to be incompatible with your system:
- feature:/linux-64::__glibc==2.35=0
- feature:|#/linux-64::__glibc==2.35=0
- python=3.10 -> libgcc-ng[version='>=11.2.0'] -> __glibc[version='>=2.17']
Your installed version is: 2.35
The R version I have in the environment is R version 3.6.1 (2019-07-05).
How can I fix this?
Thank you
Bioconda has very specific channel requirements, namely:
conda-forge > bioconda > defaults
The best way to manage Conda environments is with YAMLs. One to use DESeq2 might look something like:
r_ngs.yaml
name: r_ngs
channels:
- conda-forge
- bioconda
- defaults
dependencies:
- r-base=4.2
- bioconductor-deseq2
## additional packages...
and create it with
conda env create -n r_ngs -f r_ngs.yaml
Note, it is almost always preferable to declare all dependencies at time of creation of the environment.

how to manually install the pre-build python package into conda environment

Need to install Azure cosmos-db python sdk via conda. But I can only install up to version 3.1.2 and 4.2.0 is needed in the project. I wonder how can I manually load the prebuild cosmo sdk in to the conda environment?
I have a env.yml file shown as follow, the enviroment is created via conda env create -f <path_to_env.yml>
name: cco_1410
channels:
- conda-forge
dependencies:
- azure-cosmos=4.2.0 (this would lead to fail)
- python=3
- fastapi=0.65.0
- pytest
install 4.2.0 version via conda is not possible. Conda is only able to install up to 3.1.2 version
conda search azure-cosmos
returns
/opt/miniconda3/lib/python3.9/site-packages/requests/__init__.py:89: RequestsDependencyWarning: urllib3 (1.26.2) or chardet (4.0.0) doesn't match a supported version!
warnings.warn("urllib3 ({}) or chardet ({}) doesn't match a supported "
Loading channels: done
# Name Version Build Channel
azure-cosmos 3.0.2 py_0 conda-forge
azure-cosmos 3.1.0 py_0 conda-forge
azure-cosmos 3.1.1 py_0 conda-forge
azure-cosmos 3.1.2 py_0 conda-forge
azure-cosmos 3.1.2 py_0 pkgs/main
In lieu of someone fixing the Conda Forge feedstock so that the newer versions are available on Conda, it is a PyPI package, so one can also install it through Pip:
name: cco_1410
channels:
- conda-forge
dependencies:
- python=3
- fastapi=0.65.0
- pytest
- pip
- pip:
- azure-cosmos==4.2.0
Please read the Conda documentation on installing non-Conda packages.
Microsoft releases Azure SDK packages for conda every three months in Microsoft channel (https://anaconda.org/microsoft).
azure-cosmos 4.2.0 was included in Sep. release.
You can find it from https://anaconda.org/microsoft/azure-cosmos.
(I work in MS in the SDK team)

pipenv and Atom packages

I'm trying to download few Python packages for Atom with pipenv but Atom can't "see it". The pop-ups says it's not installed:
flake8==3.7.8
- entrypoints [required: >=0.3.0,<0.4.0, installed: 0.3]
- mccabe [required: >=0.6.0,<0.7.0, installed: 0.6.1]
- pycodestyle [required: >=2.5.0,<2.6.0, installed: 2.5.0]
- pyflakes [required: >=2.1.0,<2.2.0, installed: 2.1.1]
autopep8==1.4.4
- pycodestyle [required: >=2.4.0, installed: 2.5.0]
Clearly it is installed. What can I do ? Before you ask, I did restart the editor.
install one of Terminal packages for Atom, run it and then :
cd "the_path_to_the_directory"
pipenv shell python3(or python depending on your OS) name_of_your_script.py

conda install r-essentials takes forever

I am unable to install the r-base and r-essentials packages into my conda environment. Whenever I run
conda install -c r r-base r-essentials
I just get the Solving environment message for a good hour or more before I just exit out altogether. This even occurs when I create a brand new environment without any other packages before attempting to install r-base and r-essentials.
What is going on here and is there any way to fix this?
Try that. conda install -c conda-forge r r-essentials.
For some reason there is a conflict when r-essentials and pip are in the same conda environment. You can solve it by creating a new environment that has the package directly:
conda create -n r_env -c r r-essentials

Install a package without updating other unrelated packages (Julia 1.0)

It is possible to install a package in Julia 1.0 without updating other packages? For instance if a install ClusterManagers, the package IJulia (among others) gets updated. The package ClusterManagers has no dependencies.
(v1.0) pkg> add ClusterManagers
Resolving package versions...
Installed IJulia ───────────── v1.12.0
Installed ClusterManagers ──── v0.3.2
Installed ColorTypes ───────── v0.7.5
Installed OrderedCollections ─ v1.0.1
Updating `~/.julia/environments/v1.0/Project.toml`
[34f1f09b] + ClusterManagers v0.3.2
[7073ff75] ↑ IJulia v1.11.1 ⇒ v1.12.0
Updating `~/.julia/environments/v1.0/Manifest.toml`
[34f1f09b] + ClusterManagers v0.3.2
[3da002f7] ↑ ColorTypes v0.7.4 ⇒ v0.7.5
[7073ff75] ↑ IJulia v1.11.1 ⇒ v1.12.0
[bac558e1] ↑ OrderedCollections v1.0.0 ⇒ v1.0.1
Building IJulia → `~/.julia/packages/IJulia/4VL8h/deps/build.log`
I use Julia 1.0.0 (official https://julialang.org/ release) on Linux.
Yes, the intention is that adding a package should not update the other ones. This is a bug (https://github.com/JuliaLang/Pkg.jl/issues/607) that has been fixed (https://github.com/JuliaLang/Pkg.jl/pull/642) and will be included in Julia v1.0.1.

Resources