qiskit-metapackage icon indicating copy to clipboard operation
qiskit-metapackage copied to clipboard

qiskit.visualization doesnt show windows on macos

Open emrexcem opened this issue 5 years ago • 7 comments

Informations

  • Qiskit version: 0.19.6
  • Python version: 3.8.5
  • Operating system: Macos10.15.6

What is the current behavior?

When I try to utilize circuit.draw() or plot_histogram() a new python executable appears on my dock but there is no way to maximize or show it.

Steps to reproduce the problem

Installed python , installed pycharm (I have tried spyder and the deafult python idle as well) , installed anaconda , created a virtual environment using the steps specified by the documentation then tried to run the first code given in https://qiskit.org/documentation/getting_started.html

What is the expected behavior?

a GUI to appear and show me the histogram and the circuit.

Suggested solutions

I have no idea I installed and retraced my steps twice. I bought my first mac yesterday so im not really familiar with the ecosystem like I am with windows and linux that might be the reason. It worked on my windows machine.

emrexcem avatar Jul 26 '20 15:07 emrexcem

Either use anaconda or Pycharm in macos. It works.

d4rkc0nd0r avatar Aug 11 '20 05:08 d4rkc0nd0r

Either use anaconda or Pycharm in macos. It works.

Do you use virtualenv?

emrexcem avatar Aug 11 '20 23:08 emrexcem

Either use anaconda or Pycharm in macos. It works.

Do you use virtualenv?

No

d4rkc0nd0r avatar Aug 12 '20 05:08 d4rkc0nd0r

I suggest you use Anaconda. I'm also using macOS and I don't get any problem. I use Jupyter notebook for my workflow, and it doesn't cause any problem. You can also install Spyder or PyCharm as your code editor, if you don't prefer Jupyter notebook. Also, its a suggestion that you create a separate virtual environment for Qiskit, because sometimes other package dependencies can create version conflict.

adamdavis99 avatar Aug 12 '20 19:08 adamdavis99

I suggest you use Anaconda. I'm also using macOS and I don't get any problem. I use Jupyter notebook for my workflow, and it doesn't cause any problem. You can also install Spyder or PyCharm as your code editor, if you don't prefer Jupyter notebook. Also, its a suggestion that you create a separate virtual environment for Qiskit, because sometimes other package dependencies can create version conflict.

I did do all that stuff I specified what I did in my posy

emrexcem avatar Sep 07 '20 16:09 emrexcem

Is there any update on whether or not the solutions provided here work?

nonhermitian avatar Mar 26 '21 19:03 nonhermitian

same question - seem to be experiencing the same behavior.

  • qiskit version:

0.29.0

  • python version:

3.9.6

mac OS version:

11.3.1

I am using Anaconda with a virtual environment. Going through the examples in the Qiskit textbook and the computations work, so far. Whenever I try to plot or draw, nothing happens.

zigahertz avatar Sep 01 '21 03:09 zigahertz

It's very difficult to know what's going on here with the thin information provided, but at a wild guess, I'd reckon that people need to be initialising dynamic matplotlib support in their IPython kernels. To do that, run

%matplotlib

as a line magic when you start IPython, or at least before you import matplotlib (including import qiskit, in this case). Alternatively, you can configure your IDE to start IPython using the --matplotlib command-line flag.

I'm going to close this issue as stale now (I have a mac and can't reproduce the problems), but feel free to open a new issue on Qiskit Terra if there are continued problems.

jakelishman avatar Mar 20 '23 11:03 jakelishman