1

I am using jupyter lab on linux, and I have started it various working directories, including /, but I am having problems importing a module I installed with pip.

Here is what I did:

pip install primer3-py

Then run ipython

Within ipython run import primer3 works as expected where primer3.calcTm('GTAAAACGACGGCCAGT') returns 49.16808228911765

However, if I run jupyter lab Open a console and run import primer3 I now get an import error:

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-1493f16bb490> in <module>()
----> 1 import primer3

ImportError: No module named primer3

Am I doing something wrong here?

The Nightman
  • 5,609
  • 13
  • 41
  • 74
  • was jupyterlab installed with pip as well? maybe check sys.executable on ipython and jupyterlab to check they are running the same – Totoro Mar 09 '18 at 19:08
  • no jupyterlab was installed through anaconda, will this cause a problem. – The Nightman Mar 09 '18 at 19:10
  • maybe they are using different interpreters like virtual/conda environments check the sys.executable value on each. – Totoro Mar 09 '18 at 19:12

1 Answers1

0

Since you already have Anaconda installed have you tried installing primer3 with conda?

Try the following as described here

conda install -c bioconda primer3-py 

Your Linux installation may have more than one Python distribution installed in addition to your Anaconda installation. I use Anaconda for my personal Python needs so I don't overlap with the OS's needs. If there is a package on PyPI which is not on Anaconda Cloud then you can install it with the copy of pip which comes with your Anaconda installation.

jeschwar
  • 1,286
  • 7
  • 10