This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Biopython: Module not found after new install of Python 3.8.1

Hello,

I just upgraded Python on my Windows machine to 3.8.1, did "pip install biopyton" but import Bio fails: Am I doing something wrong ? Thanks! Here is the log:

C:\Users\George>pip install Biopython
Requirement already satisfied: Biopython in c:\users\george\appdata\local\progra
ms\python\python38\lib\site-packages (1.78)
Requirement already satisfied: numpy in c:\users\george\appdata\local\programs\p
ython\python38\lib\site-packages (from Biopython) (1.18.0)

C:\Users\George>python
Python 3.8.1 (tags/v3.8.1:1b293b6, Dec 18 2019, 23:11:46) [MSC v.1916 64 bit (AM
D64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import Bio
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'Bio'
software error

2 answers

usually the reason for such errors is that pip runs a different version of python than the one that you start when you invoke python directly at the command line. Try to run pip like this:

python -m pip

to ensure the same python is executed when running pip

Thank you !! That was the problem indeed !

Log in to answer this question.