iqsharp and qsharp conda packages are published only for Python 3.7
Describe the bug python -c "import qsharp" gives the following error
To Reproduce python -c "import qsharp"
Expected behavior Gives an error on trying to enable the qsharp environment in conda using python -c "import qsharp" Ideally should pass
Error Preparing Q# environment... Access to the path 'C:\WINDOWS\system32\LogFiles\WMI\RtBackup' is denied.
Screenshots If applicable, add screenshots to help explain your problem.
System information
- Windows
- Norton Antivirus Enabled (is it causing the issue)
- Version 10
Additional context Add any other context about the problem here.
@deepankarpal1985 could you report which version of the qsharp package you have installed (i.e., pip show qsharp or conda list qsharp)?
This is possibly related to https://github.com/microsoft/iqsharp/issues/149. Can you try switching to a different directory in the command prompt and then running the command again? It may also be worth closing other processes or restarting the computer in case something has an open handle to that folder.
Here is the version number iqsharp 0.10.1910.2102a1 py36_0 quantum-engineering qsharp 0.10.1910.2102a1 py36_0 quantum-engineering
I will also try other instructions you have provided and get back to you shortly.
Interesting, thanks. That is an old version from nearly a year ago. Can you try updating the conda packages and/or creating a new environment, as described here? https://docs.microsoft.com/en-us/quantum/quickstarts/install-python
Yes I did follow exactly the steps in the link and created an environ etc. yesterday
On changing the directory to Documents\subfolder it passes
I updated the Qdk using instructions ( and then listed qsharp-the version number didn't change) conda update -c quantum-engineering qsharp Collecting package metadata (current_repodata.json): done Solving environment: done
==> WARNING: A newer version of conda exists. <== current version: 4.8.3 latest version: 4.8.4
Please update conda by running
$ conda update -n base -c defaults conda
All requested packages already installed.
(qsharp-env) C:\Users\deepa\Documents\QFEM>python -c "import qsharp; qsharp.reload()"
Although I was able to run the first example
I think I see the problem. You are using Python 3.6, and 0.10.1910.2102a1 is the latest version of the qsharp conda package that was published for Python 3.6. Is it possible for you to try creating an environment with Python 3.7 instead? If not, you should be able to get the latest version working with Python 3.6 by following these instructions: https://docs.microsoft.com/en-us/quantum/quickstarts/install-python?tabs=tabid-dotnetcli
That is not due to any underlying incompatibility, but just the fact that the recent conda packages have only been built and published for Python 3.7. I'm updating the title of this issue to reflect that we should support additional versions.
I've mitigated this for now by moving these old versions to beta label of the Anaconda channel so that they won't get installed by default.
This should be fixed with #685, but please feel free to re-open if there's any additional information. Thank you!