Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError for import statement #4690

Closed
rajnandinimukherjee opened this issue Jul 13, 2020 · 2 comments
Closed

AttributeError for import statement #4690

rajnandinimukherjee opened this issue Jul 13, 2020 · 2 comments

Comments

@rajnandinimukherjee
Copy link

Informations

  • Qiskit version: 'qiskit': '0.19.6'
  • Python version: Python 3.5.2
  • Operating system: Linux Ubuntu 16.04.5

What is the current behavior?

When trying to import qiskit, getting:
AttributeError: module 'qiskit.pulse.commands' has no attribute 'Command'

Screenshot 2020-07-13 at 1 50 47 PM

Steps to reproduce the problem

Tried to run:
from qiskit import Aer

Getting same error.

What is the expected behavior?

Expecting python to just import qiskit.

Suggested solutions

@nonhermitian nonhermitian transferred this issue from Qiskit/qiskit-tutorials Jul 13, 2020
@mtreinish
Copy link
Member

This is a bug in python 3.5.2 typing (I think python/typing#259 but it's hard to be sure for something so old). I would recommend updating your python version to the latest the python 3.5 (3.5.9) or downgrade to python 3.5.1. I was not able to reproduce this locally with 3.5.9, and we run also run CI on python 3.5.9 on linux and macOS and 3.5.4 on windows without any issues.

As an aside it's also worth pointing out that python 3.5 support in qiskit is deprecated and will be removed when the upstream python community marks the version as EoL so it's probably not a bad idea to just move to 3.6, 3.7, or 3.8 soon.

@1ucian0
Copy link
Member

1ucian0 commented Jul 24, 2020

Did python 3.5.9 helped @rajnandinimukherjee ?

Otherwise, feel free to reopen.

@1ucian0 1ucian0 closed this as completed Jul 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants