Failure in pip installing biopython - bioinformatics

When I write pip install biopython on Bash, I get the error messages "error: subprocess-exited-with-error" and further down "error: legacy-install-failure" in the output. I can confirm using python --version and pip --version that both exist (version 2.7 and 22.1.4), and I can pip install other packages like matplotlib, so I know the problem is not with pip install itself. The output also tells me there is something likely wrong with the biopython package itself. How can this be fixed so I can pip install biopython?

Use conda instead, for example:
conda create --name biopython biopython

Related

trying to set up a virtual environment, zsh: command not found: -m

I'm trying to set up a virtual environment. I have a Mac, using Mac OS Big Sur 11.1. I have installed the latest stable version of python, but when I enter this command into the terminal window
-m pip install pipenv pip --upgrade
I get the following error
zsh: command not found: -m
before, it would say
"No module named pip"
Do I have to install pip separately with
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
I thought pip was included by default when you install python? I think I might have pip because when I type
python3 -m pip
into the command line, I get a long list of commands (install packages, download packages, etc.) General options... Thus should I install pip? one person on reddit said,
Pip is not necessarily included with any version of Python. In many
distributions, it must be installed separately.
If python3 -m pip works, then you have a bad install, not a missing
one.
thus did I incorrectly install python? When I was installing it there was no option to
"add python to PATH"
Do I have to do this on a mac? If I input
python3 -V
in terminal, I get
Python 3.9.2
Thanks
i solved this by running,
pip3 install pip --upgrade

How to install Biopython on windows7?

I am getting error:
pip install biopython
SyntaxError: invalid syntax
You are probably trying to install biopython within the Python REPL. See my screenshot below if that looks like what you are getting. Type quit() to exit the Python REPL and type pip install biopython on the commandline:
Did you go to the pip folder? On Windows, by default python and pip are not on the PATH.
Please go to the windows section of the Biopython installation tutorial.
It says you should be able to install if you run it from the pip folder.

even after using pip update command, the version remains the same

I was just trying to download packages using pip in the terminal in pycharm and there was a notice from pip saying "You are using pip version 10.0.1, however, version 19.3.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command."
I ran the command but when I typed "pip -V" to check the version, it remained the same 10.0.1. And when I run the command, it says that pip is already up to date
How can solve this?
Your python and pip seem to point to different python versions. Check by typing which python or where python in the terminal.
To make sure they match, you can use
python -m pip install --upgrade pip (as you did) for upgrading
python -m pip install <package name> for installation

Getting "ImportError: No Module named yaml" error

Computer: MacBook Pro mid 2012, running El Capitan 10.11.4
Python version 2.7.10
I've been trying to install ansible from source, and I've run these two commands (following the steps on ansibles documentation):
git clone git://github.com/ansible/ansible.git --recursive
cd ./ansible
and then ran this
source ./hacking/env-setup
I've also already installed these packages
sudo pip install paramiko PyYAML Jinja2 httplib2 six
However, if I try and run ansible by typing it in the terminal, I get the following error.
Traceback (most recent call last):
File "/Users/[myusr]/rock/ansible/bin/ansible", line 81, in <module>
from ansible.cli.adhoc import AdHocCLI as mycli
File "/Users/[myusr]/rock/ansible/lib/ansible/cli/__init__.py", line 27, in <module>
import yaml
ImportError: No module named yaml
What should be done here?
Do you have yaml module installed? If not, try installing yaml using the following command:
sudo pip install pyyaml
Had the same issue. Got past it using #FranMowinckel's answer.
First I typed:
pip --version
it outputted python 3. But, when I tried:
sudo python -m pip install pyyaml
I got an error saying:
Error: No module named pip
So, finally running:
sudo easy_install pip
everything worked fine.
Go back and run:
sudo python -m pip install pyyaml
(you may have to run this with all the other modules as well)
Now you should finally be able to run your initial command which failed.
For python 3.6 you can install it with
pip3 install pyyaml
if there is a problem in importing, do
pip3 uninstall pyyaml
and then install it again:
pip3 install pyyaml
#bigdata2's answer is correct but it might also happen that there's a conflict with python 3. So, check pip version (pip --version) and if it outputs python 3 then:
sudo python -m pip install pyyaml
So it gets installed for the same version as python.
I had this problem because I installed it with
sudo pip install pyyaml --upgrade
instead of
sudo -H pip install pyyaml --upgrade
Uninstalling and re-installing pyyaml fixed the problem for me.
This should work:
sudo pip install pyyaml
Try this
pip install ruamel.yaml

Pip install fontforge, says Couldnot find a version

I have done, apt-get install fontforge on my ubuntu system. When i do import fontforge in my python code, it throws error as, No module named fontforge.
When i do, pip install fontforge, it throws error as,,
Could not find a version that satisfies the requirement fontforge (from versions: )
No matching distribution found for fontforge
How can i install fontforge's python libs?
You may want to install python3-fontforge.
sudo apt-get install python3-fontforge
After that you should be able to use fontforge in ubuntu's python version 3.
You can verify by doing /usr/bin/python3 -c "import fontforge;print(fontforge)". This should now print the path to the fontforge python module.
Try installing a specific version
pip install fontforge==1.0
For me , the above command completes without errors. If any errors, upgrade pip using
pip install --upgrade pip
And try again. You may try allow externally hosted files also.
pip install --allow-all-external fontforge

Resources