0

I want to use Jupyter Notebook without installing Anaconda on Ubuntu 18.04. I do not want to use any virtual environment. What can I do to install Qiskit?

I have tried to install Qiskit with pip3.

pip3 install qiskit

This shows the following message

Segmentation fault (core dumped)

But if I try to import qiskit from terminal with this shows no error. But when I try to import qiskit from Jupyter Notebook it says that

there is not module named qiskit

Any suggestion to solve this problem?

Protik Nag
  • 411
  • 4
  • 14
  • 1
    Did you check if jupyter and terminal are pointing to same python installation ? – mujjiga Jul 25 '19 at 09:37
  • Actually, I started python from the terminal with python3 command. And opened a new Python3 notebook from Jupyter. I don't know how to check it. Please suggest how can I check if they are pointing to same python installation. – Protik Nag Jul 25 '19 at 09:40
  • 1
    `import sys; sys.executable` from both python console and jupyter notebook. – mujjiga Jul 25 '19 at 09:44
  • Okay. I have found a problem here. They are not generating the same result. In the terminal it shows ''/home/protik/anaconda3/bin/python3" and in Jupyter Notebook it shows "'/home/protik/anaconda3/bin/python". How can I fix this now? – Protik Nag Jul 25 '19 at 09:53

1 Answers1

4

You have different python installations. Install qiskit in the python installation pointed by jupyter. Use below from jupyter notebook

!pip3 install qiskit
mujjiga
  • 12,887
  • 2
  • 22
  • 39
  • Thank you very much. It worked. In the meantime, I tried this line in google colaboratory to install Qiskit and work. – Protik Nag Jul 27 '19 at 20:37