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

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)

Related

Robotframework: SessionNotCreatedException: Message: Error: NS_BINDING_ABORTED

I am getting the below error when trying to execute the robotframework test scripts.
Parent suite setup failed:
SessionNotCreatedException: Message: Error: NS_BINDING_ABORTED
Stacktrace:
#checkLoadingState#chrome://remote/content/shared/Navigate.jsm:209:28
onStateChange#chrome://remote/content/shared/Navigate.jsm:254:28
Tests.Suites.Layer2.Dhl.Dhl Session | FAIL |
Suite setup failed:
SessionNotCreatedException: Message: Error: NS_BINDING_ABORTED
Stacktrace:
#checkLoadingState#chrome://remote/content/shared/Navigate.jsm:209:28
onStateChange#chrome://remote/content/shared/Navigate.jsm:254:28
Below are the list of files installed:
I installed python 3.10.5
C:\aoswebtest>pip list
Package Version
async-generator 1.10
attrs 21.4.0
bcrypt 3.2.2
certifi 2022.5.18.1
cffi 1.15.0
cryptography 36.0.1
et-xmlfile 1.1.0
h11 0.13.0
idna 3.3
openpyxl 3.0.9
outcome 1.1.0
paramiko 2.11.0
pip 22.0.4
pycparser 2.21
pydevd 2.7.0
PyNaCl 1.5.0
pyOpenSSL 22.0.0
PyYAML 6.0
robotframework 4.1.3
robotframework-pythonlibcore 3.0.0
robotframework-seleniumlibrary 6.0.0
robotframework-sshlibrary 3.8.0
scapy 2.4.5
scp 0.14.4
selenium 4.1.0
setuptools 58.1.0
six 1.16.0
sniffio 1.2.0
sortedcontainers 2.4.0
trio 0.20.0
trio-websocket 0.9.2
urllib3 1.26.9
webcolors 1.11.1
wsproto 1.1.0
xlrd 2.0.1
Can you anyone help my with this?
I have the same error. I used my pc and run selenium with firefox then it works fine. But when I copy code and run other pc, it shows error NS_BINDING_ABORTED.
I fix it by: downgrade firefox version(from 103.x.x -> 92.x.x)

How to install R language version 4 in AWS EMR - Amazon linux 2

We have an AWS EMR cluster. By default it comes with
Amazon Linux version 2
R version 3.4.3 (2017-11-30) -- "Kite-Eating Tree"
I like to install latest R version 4..
Tried following :
yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum -y install R
But it doesn't upgrade R version to v4.0. It only offers to upgrade it to 3.4.3-1.amzn2.0.1
Amazon Linux 2 - uses EPEL version 7. EPEL v7 doesn't seem to have R v4.
But EPEL version 8 has R v4
I am planning to install R from source. But like to know if this is a way to install binary.
Is there any option to install latest R binary on AWS Linux 2 ?
Found a way to install the R v4 binary from AWS extras repo
sudo amazon-linux-extras install R4
In future, if some one is hunting for AWS Linux specific software package., this command list the packages that can be installed from AWS extras
amazon-linux-extras list
Reference - Amazon Linux User Guide
Install miniconda https://docs.conda.io/en/latest/miniconda.html
conda install r-base or conda install r-essentials

Some problems with installing JupyterLab

Installed JupiterLab, but ran into a problem in the terminal.
> Terminals not available (error was No module named 'winpty.cywinpty')
Tried the following commands:
First
pip install pywinpty
Requirement already satisfied: pywinpty in c:\python38\lib\site-packages (0.5.7)
Second (version)
Python --version 3.8.3
jupyter-lab --version
2.1.5
ipython --version
7.16.1
Third
import winpty
conda install pywinpty
and others don't get rid of startup errors
On Windows it can be solved by installing pywinpty from the wheel provided here: https://www.lfd.uci.edu/~gohlke/pythonlibs/ .
Just download (the wheel) and install it via:
pip install -I the_wheel_name_you_have_downloaded

Parallel Group setup & mpi4py/OpenMDAO 2.2.X

I am trying to use the parallelization with mpi/openmdao.
I have tried on various ubuntu computers as well as ubuntu bash on windows (a windows 10 feature)
The dependencies work fine independently (i.e. import petsc4py and import mpi4py works fine and I can run the tests of these similar to the links: https://openmdao.readthedocs.io/en/1.7.3/getting-started/mpi_linux.html &
http://mpi4py.scipy.org/docs/usrman/install.html)
But the Paralel Group code in the openmdao 2.2. manual does not work.
For each attempt (varying computers) i seem to get another error most of them seemed like compatibility errors (i.e. I install petsc4py which breaks numpy or mpi4py installation causing proble in the existing openmdao core. )
On some computers I had my own openmpi and petsc installed but conda install command already installs those as far as I see.
Eventually I have tried these steps on a newly started amazon instance
but had similar problems.
sudo apt-get install build-essential
wget http://repo.continuum.io/archive/Anaconda3-5.2.0-Linux-x86_64.sh
bash Anacond*
sudo apt-get install libibnetdisc-dev
sudo apt-get install libblas-dev libatlas-dev liblapack-dev
conda install mpi4py
conda install -c conda-forge petsc4py
if i check ''conda list'' onone of the computers the abbreviated output is ;
mpi 1.0 mpich conda-forge
mpi4py 3.0.0 py36_mpich_1 conda-forge
mpich 3.2.1 1 conda-forge
mpich2 1.4.1p1 0 anaconda
mpmath 1.0.0 py36hfeacd6b_2
msgpack-python 0.5.1 py36h6bb024c_0
multipledispatch 0.4.9 py36h41da3fb_0
mumps 5.0.2 blas_openblas_208 [blas_openblas]
conda-forge
numpy 1.14.3 py36_blas_openblas_200 [blas_openblas] conda-forge
numpydoc 0.7.0 py36h18f165f_0
openblas 0.2.20 8 conda-forge
openmdao 2.2.1 <pip>
openpyxl 2.4.10 py36_0
openssl 1.0.2o 0 conda-forge
petsc 3.9.1 blas_openblas_0 [blas_openblas]
conda-forge
petsc4py 3.9.1 py36_0 conda-forge
pexpect 4.3.1 py36_0
pickleshare 0.7.4 py36h63277f8_0
pillow 5.0.0 py36h3deb7b8_0
pip 10.0.1 <pip
On the same system if try to run
mpirun -n 2 python my_par_model.py
based on the manual code this is what i get
Does anyone have a suggestion where it could be failing or what steps i could follow for ubuntu implementation of anconda/openmdao/petsc/mpi4py and succesful run of paralel openmdao ?
You could take a look at the installation implementation for linux that exists in our .travis.yml file? https://github.com/OpenMDAO/OpenMDAO/blob/master/.travis.yml
This works for installing and testing OpenMDAO from scratch on Trusty Tahr instances on Travis CI. One difference I see at first glance would be our use of pip to install mpi and PETSc into the conda-installed python.
I think MPI compatibility was the main issue. I was not aware that it had to be openmpi and indeed conda install command installs the mpich and possibly causing a problem with openmdao.
I will continue doing more tests but for a working system starting from a brand new installation of ubuntu-16.04.4-desktop-amd64.iso I followed these steps;
(Steps that take time are the openmpi installation and petsc4py pip instalattion.)
1 ) For some dependencies (taken from https://gist.github.com/mrosemeier/088115b2e34f319b913a)
sudo apt-get install libibnetdisc-dev
sudo apt-get install libblas-dev libatlas-dev liblapack-dev
2) Download/Install OpenMPI (mostly taken from http://lsi.ugr.es/jmantas/pdp/ayuda/datos/instalaciones/Install_OpenMPI_en.pdf)
wget https://download.open-mpi.org/release/open-mpi/v3.1/openmpi-3.1.0.tar.gz
tar -xzf openmpi-3.1.0.tar.gz
cd openmpi-*
./configure --prefix="/home/$USER/.openmpi"
make
sudo make install
echo export PATH="$PATH:/home/$USER/.openmpi/bin" >> /home/$USER/.bashrc
echo export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/home/$USER/.openmpi/lib/" >> /home/$USER/.bashrc
3) MINICONDA & Rest (mostly taken from https://github.com/OpenMDAO/OpenMDAO/blob/master/.travis.yml)
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
sh Minicond* # agree to add to the path etc.
conda install --yes python=3.6
conda install --yes numpy==1.14 scipy=0.19.1 nose sphinx mock swig pip;
pip install --upgrade pip;
pip install mpi4py
pip install petsc4py==3.9.1
#petsc4py Gives an error failed building wheel for petsc but then installs petsc itself, afterwards, petsc4py is also installed
sudo apt install git # in the cases git does not exist
# not sure why we need this part but i followed
pip install redbaron;
pip install git+https://github.com/OpenMDAO/testflo.git;
pip install coverage;
pip install git+https://github.com/swryan/coveralls-python#work;
# pyoptsparse and openmdao
git clone https://github.com/mdolab/pyoptsparse.git;
cd pyoptsparse;
python setup.py install;
cd ..;
conda install --yes matplotlib;
git clone http://github.com/OpenMDAO/OpenMDAO
cd OpenMDAO
pip install .
# optional
conda install spyder
4) Check the versions
mpirun --version : Open MPI 3.1.0
python --version : 3.6.5
pip --version :
pip 10.0.1 from /home/user/miniconda3/lib/python3.6/site-packages/pip (python 3.6)
conda list : (note that there is no mpich or similar in the conda list)
openmdao 2.2.1 <pip>
mpi4py 3.0.0 <pip>
petsc 3.9.2 <pip>
petsc4py 3.9.1 <pip>

How to install Julia in an anaconda environment?

One of the main features of Anaconda is that it is language agnostic as stated in their blog:
You can create environments of any binary dependency tree (different
versions of Python, R, Julia, etc.).
Recently I switched from using virtualenv to Anaconda in Python, so I was curious to try Julia in an Anaconda environment. However, I couldn't find instructions explicit enough to install Julia successfully. First, I tried naively conda create -n julia-test julia. Obviously, it didn't work. Then I found at binstar.org a Julia package (version 0.3) with the code
conda install -c https://conda.binstar.org/wakari1 julia
However, I don't want to install Julia outside of a specific virtual environment, so I changed it to:
conda create -n julia-test -c https://conda.binstar.org/wakari1 julia
It didn't throw errors but ultimately failed to start the Julia interpreter.
So, what is the correct way of installing Julia (0.2, preferably) in an anaconda environment?
UPDATE
As of March 2018, Julia v0.6.1 is available for linux-64 on the conda-forge channel:
https://anaconda.org/conda-forge/julia
It has been set up to install packages inside <env_prefix>/share/julia/site, to maintain isolation from the user's ~/.julia user's home directory.
conda create -n julia -c conda-forge julia
As of August 2017, Julia v0.5.2 is available on the conda-forge channel:
https://anaconda.org/conda-forge/julia
It has been set up to install packages inside <env_prefix>/share/julia/site, to maintain isolation from the user's ~/.julia user's home directory.
conda create -n julia -c conda-forge julia
The blog post was indicating that conda is general enough to allow packages of any type. There are no packages for Julia yet (except for the one you found in the Wakari channel, which is specific to Wakari).
Building a conda package for Julia and probably isn't difficult. Building a streamlined way to convert Julia packages into conda packages is a bit more work.
Julia 0.4.5 (not the current latest 0.5.0) is now available from the bioconda channel.
Using anaconda (python 3.6 version) and following instructions in bioconda :
# In this order
conda config --add channels conda-forge
conda config --add channels defaults
conda config --add channels r
conda config --add channels bioconda
conda install julia
So to create the corresponding virtual environment:
conda create -n julia-env julia
Nonetheless, I did not see any additional julia libraries available yet.
As of Jan 2022, Anaconda suggests using;
conda install -c conda-forge julia
See: https://anaconda.org/conda-forge/julia

Resources