qiskit-community / qiskit-vscode

Simplifying Qiskit to make developing quantum circuits and applications faster

Home Page:https://qiskit.org/vscode

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add ability to change python path (unable to execute python scripts on macOS)

jmaff opened this issue · comments

Informations

  • VSCode version: 1.33.1
  • Qiskit [Terra / Aqua / other] version:
    qiskit: 0.8.0
  • Qiskit VSCode Extension version: 0.5.4
  • Operating system: macOS 10.12.6

What is the current behavior?

Python scripts executed using the "Run this Python" button are ran using python 2.7 (macOS native install) instead of my 3.6 install, preventing any programs using Qiskit from being executed. The extension also displays an error stating that python package 3.5 or greater must be installed, despite 3.6 already being installed on the system.

Steps to reproduce the problem

  1. Fresh install of the extension (version error will be displayed immediately)
  2. Create the following python script to test which version the script is being run with
import platform
print(platform.python_version())

What is the expected behavior?

Output should be from a python 3 interpreter installed on the system (3.x.x).

Suggested solutions

Add the functionality for the user to customize the python path used by commandExecutor.ts (seems that right now it solely uses python, when python3 is needed for execution on macOS due to python being linked the the pre-installed python 2.7 interpreter.

Thanks for the report, @jmaff. It should be fixed by #86. We are going to release a new version today with this fix.

Closing the issue, re-open it if needed after testing the new version (will be 0.5.5).