How do I install biopython in anaconda? - python

I get SyntaxError: invalid syntax
while trying to install biopython using the following command.
conda install -c anaconda biopython
Could you please help me install biopython in anaconda (3) ?

Package maintainers recommend using (in the terminal):
conda install -c conda-forge biopython
We deliberately recommend using Biopython from the conda-forge channel, as this is usually up to date and covers Windows, Mac OS X and Linux. The default Conda channel does have Biopython, but is often out of date.
https://biopython.org/wiki/Packages

Open the terminal and export your path to anaconda:
export PATH=~/anaconda3/bin:$PATH
Then type:
conda install -c anaconda biopython

Install Anaconda Navigator, go to "Environments" and select the appropriate environment (base or your own) and click "not installed". Scroll down to biopython click the box and then install...

Related

How can I install a particular version of a conda package?

I am trying to install the v2.7.0 of the eccodes package.
But this is not working:
conda install -c conda-forge eccodes=2.7.0
I can see the versions here: https://anaconda.org/conda-forge/eccodes/files?version=2.7.0&page=2
What I am doing wrong with the syntax?
The latest version is 2.13, which I don't want.
If you look through all of the package versions on the first page, you will notice that their label is 'main'. However, the version you want to install has the label 'cf201901'.
You should therefore change your install command to:
conda install -c conda-forge/label/cf201901 eccodes=2.7.0
By including the label in the channel it will be able to find the correct older version.
Alternatively, you can copy the link of the old package directly from the website you were browsing and just run:
conda install https://anaconda.org/conda-forge/eccodes/2.7.0/download/osx-64/eccodes-2.7.0-0.tar.bz2
If you want to install version 2.7.0 for osx

Install Cartopy & dependencies on Windows

I want to install Cartopy on Windows, which has some dependencies according to http://scitools.org.uk/cartopy/docs/latest/installing.html#installing.
When using pip install cartopy in the cmd prompt, it gives an error where it wants me to install GEOS 3.3.3 and Proj4 4.9.0.
I've downloaded geos-3.6.2.tar.bz2, but I cannot figure out how to install it. I've extracted the files, used cd to the right directory.
What can I do to install it correctly?
Is there an easy way to install Cartopy?
Do you have Anaconda?
try:
conda install -c scitools cartopy
When you are installing through pip then better install using Binary file .Whl extension file
You can find all the package binary file below.
Especially in case of Cartopy installation through pip, install cartopy using binary wheel file.
https://www.lfd.uci.edu/~gohlke/pythonlibs/
If you are on Windows and you have installed Anaconda, on your search, type "Anaconda prompt" and then type this command
conda install -c conda-forge cartopy
I tried conda install -c conda-forge cartopy
and tried installing it through Anaconda navigator 1.9.12 and I scoured multitude of ways and tried them all and failed. Only this
conda install -c scitools cartopy
works.
I first ran this conda update -n base -c defaults condo following instructions provided among responses here:Updating Anaconda fails: Environment Not Writable Error

Unable to install Tabula with Anaconda

I am trying to install Tabula for Python, as it seems it is the way of extracting tables from PDFs. However I am unable to install it.
I am using Anaconda and have followed the step on Tabula's Anaconda page (https://anaconda.org/auto/tabula) to attempt to install it:
conda install -c auto tabula
But I just get an error message:
link here
As far as I'm aware, I have added the "auto" channel so it should be able to install it. But I guess I must be missing something. Any help much appreciated!
You could just try:
conda install -c conda-forge tabula-py
It works fine for me.
Since you are using Windows and in the link you provide I just see Linux-64 and Linux-32 I think that installing Tabula with Conda can return errors.
Activate your Conda environment and install Tabula using pip:
pip3 install tabula-py
Note
As pointed out in a comment by chezou the conda-forge way of installing Tabula seems not the best way to go if you want to keep it updated:
Conda package is supported by someone else and it seems not maintained
well.
As of Feb 24th, 2019, conda version is v1.1.1 while the latest
pypi package is 1.3.1.
I would recommend installing via pip.
Conda sources are limited to packages available in the channels you have set up. You will need to either:
Set up a channel in Conda that contains tabula.(I tried this with other pacages but couldn't figure out a working method.)
https://conda.io/docs/user-guide/tasks/manage-environments.html
Install tabula into your Anaconda environment from source.
https://docs.python.org/2/install/
use pip to install tabula in Conda environment.(you will need to install pip first)
https://github.com/ContinuumIO/anaconda-issues/issues/1429
Then:
If tabula is in pipy, this will probably work.
https://anaconda.org/conda-forge/tabula-py
To install this package with conda run one of the following:
> conda install -c conda-forge tabula-py conda install -c
> conda-forge/label/cf201901 tabula-py

how to get opencv_contrib module in anaconda

Can anyone tell me commands to get contrib module for anaconda
I need that module for
matches = flann.knnMatch(des1,des2,k=2)
to run correctly
error thrown is
cv2.error: ......\modules\python\src2\cv2.cpp:163: error: (-215) The data should normally be NULL! in function NumpyAllocator::allocate
Also I am using Anaconda openCV version 3, and strictly dont want to switch to lower versions
P.S. as suggested at many places to edit file cv2.cpp option is not available with anaconda.
I would recommend installing pip in your anaconda environment then just doing: pip install opencv-contrib-python. This comes will opencv and opencv-contrib.
Anaconda supports pip install to install package into conda environment. You can download OpenCV 3.2.0 with opencv_contrib from this well known Unofficial Windows Binaries for Python Extension Packages website. See the filename below for the right version. Then type the command in Anaconda Prompt window to install the package:
For Python 3.5 and 64-bit Windows:
pip install opencv_python‑3.2.0+contrib‑cp35‑cp35m‑win_amd64.whl
For Python 3.6 and 64-bit Windows:
pip install opencv_python‑3.2.0+contrib‑cp36‑cp36m‑win_amd64.whl
Most of the OpenCV 3.2.0 packages in Anaconda repository didn't specific if they come with opencv_contrib. The pip install approach is easier and proven, see one of the SO post. The only drawback is that conda list will not show pip installed package there but actually it's.
However, if you want to have trial on conda install, below is the command for installing OpenCV 3.2.0 for Python 3.5 or 3.6 but likely without opencv_contrib.
conda install -c conda-forge opencv=3.2.0
Hope this help.
You can try this: https://anaconda.org/michael_wild/opencv-contrib
To install this package with conda run:
conda install -c michael_wild opencv-contrib
These anaconda packages include the contrib modules with base OpenCV3. Though the file list says it's currently for Windows only!
The question is old but I thought to update the answer with the latest information. My Anaconda version is 2019.10 and build channel is py_37_0 . I used pip install opencv-python==3.4.2.17 and pip install opencv-contrib-python==3.4.2.17. Now they are also visible as installed packages in Anaconda navigator and I am able to use patented methods like SIFT etc.
Method 1: in Anaconda Prompt write this, will install opencv-contrib v4.6
pip install opencv-contrib-python
Method 2: Install previous version of opencv-contrib v3.3.1
According to https://anaconda.org/michael_wild/opencv-contrib it says it support win64bit only and python 3.6.x.
So, first you need to create new enviroment support python 3.6
conda create --opencv_contrib36 python=3.6.13
then, install the packages
conda install -c michael_wild opencv-contrib
There is repo in conda-forge which includes opencv-contrib: https://github.com/conda-forge/opencv-feedstock
To use it:
conda install --channel=conda-forge libopencv opencv py-opencv
if you run into Numpy error, try pinning more recent version (of Numpy).
This worked for me in Windows 10 on Anaconda 5.3 with python 3.6
conda install -c conda-forge opencv

How to install pyperclip to Anaconda?

I want to install pyperclip from GitHub using pip install but unfortunately it's only installed to pip and not Anaconda. I'm using PyCharm and my interpreter is Anaconda. (Linux)
I want Anaconda to install the package 'pyperclip' as well so I can use it in PyCharm. I've try Googling but can't find any result.
From Anaconda's website, run the following in Terminal/cmd:
conda install -c conda-forge pyperclip
You need to make sure the following command uses the pip in your CONDA_FOLDER/Scripts/pip or CONDA_FOLDER/envs/ENVIRONMENT_NAME/Scripts/pip:
pip install git+https://github.com/asweigart/pyperclip.git
or if a specific branch (instead of the default one is needed) then use:
pip install git+https://github.com/asweigart/pyperclip.git#BRANCHNAME
However you need to make sure your PyCharm actually uses the environment in which you install the package! Otherwise there is no sense in installing it in the wrong one.
I am not sure because I am not running linux and I never tried it but according to the official website
run anaconda prompt
and then type: conda install -c auto pyperclip=1.3
for more info: https://anaconda.org/auto/pyperclip
To install pyperclip from conda run following command.
conda install -c bryanwweber pyperclip
I was having a hard time installing pyperclip on Anaconda Jupyter notebook. I installed pip and also upgraded it to the latest version. I followed your answers but didn't have luck.
If you're a Windows user, here's how I resolved:
1) Open Anaconda terminal (it's your Windows terminal inside Anaconda)
2)It will open showing the C drive and your username like: C:\Users\joe.jacob
3)C:\Users\joe.jacob\ dir (this will show you where you have Jupyter Notebook. Mine was at .jupyter, so I navigated to it using: cd .jupyter
C:\Users\joe.jacob\cd .jupyter
4)Now install pyperclip at your jupyter notebook like this:
C:\Users\joe.jacob\.jupyter>pip install pyperclip
5) It installs pyperclip package. Installing other pip packages is similar.
I hope this helps.
search for anaconda prompt on your computer and type one of the following
conda install -c conda-forge pyperclip
conda install -c "conda-forge/label/gcc7" pyperclip
conda install -c "conda-forge/label/cf201901" pyperclip
conda install -c "conda-forge/label/cf202003" pyperclip
then click enter and wait for it to download you can repeat it again to confirm whether its installed

Categories