Reputation: 597
I have installed docopt by typing pip3 install docopt
and now it is well installed: You can see it on the list
umr5558-c02gl0y6drjm:Concatenate etudiant$ pip3 list
Package Version
--------------- -------
biopython 1.71
buildozer 0.34
cycler 0.10.0
docopt 0.6.2
kiwisolver 1.0.1
matplotlib 2.2.2
nose 1.3.7
numpy 1.14.2
pexpect 4.5.0
pip 10.0.0
ptyprocess 0.5.2
pyparsing 2.2.0
python-dateutil 2.7.2
pytz 2018.4
scipy 1.0.1
setuptools 39.0.1
sh 1.12.14
six 1.11.0
virtualenv 15.2.0
wheel 0.30.0
But when I try to import docoport from docopt on python3 it raises:
ModuleNotFoundError: No module named 'docopt'
Does someone have an idea?
Here is the path:
umr5558-c02gl0y6drjm:Concatenate etudiant$ pip3.6 install docopt
Requirement already satisfied: docopt in /usr/local/lib/python3.6/site-packages (0.6.2)
Here is the import section:
from Bio import codonalign
from Bio.Align import MultipleSeqAlignment
from Bio.SeqRecord import SeqRecord
from Bio.Alphabet import IUPAC
from Bio.Seq import Seq from Bio import AlignIO
from Bio import pairwise2
from Bio.codonalign.codonseq import _get_codon_list, CodonSeq, cal_dn_ds
import scipy
from Bio.Align.Applications import MuscleCommandline
from Bio.Align import MultipleSeqAlignment
from scipy.linalg import expm
from Bio import SeqIO
import sys
import numpy as np
from docopt import docopt
Thanks
Upvotes: 4
Views: 24177
Reputation: 29
I had a similar problem and this is how I solved it:
I also had installed docopt via pip install docopt
, and I have both python 2 and 3 in my mac.
The problem is that docopt is installed for python 3, but when running the .py file in terminal, it ran in python 2 by default.
Just add #!/usr/bin/env python3
to the very beginning of your .py file, and it should fix your issue.
Upvotes: 2