Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

Error installing iqsharp kernel #14

Closed
ayush1999 opened this issue Mar 14, 2019 · 22 comments
Closed

Error installing iqsharp kernel #14

ayush1999 opened this issue Mar 14, 2019 · 22 comments
Assignees
Labels
Area-Install Issue relates to installation or operating system environment. Status-NeedMoreInfo Further information is requested

Comments

@ayush1999
Copy link

I'm trying to follow the guidelines mentioned in https://docs.microsoft.com/en-us/quantum/install-guide/python?view=qsharp-preview to install the iqsharp kernel, but I get a No executable found matching command "dotnet-install" when installing it (using dotnet iqsharp install).

ayush99@ayush99:~/quant$ dotnet tool install -g Microsoft.Quantum.IQSharp
Tool 'microsoft.quantum.iqsharp' is already installed.
ayush99@ayush99:~/quant$ dotnet install iqsharp
No executable found matching command "dotnet-install"

@cgranade
Copy link
Contributor

Thanks for the report! It looks like you may have run dotnet install iqsharp instead of dotnet iqsharp install?

@ayush1999
Copy link
Author

@cgranade I still get the same error:

ayush99@ayush99:~$ dotnet iqsharp install
No executable found matching command "dotnet-iqsharp"

@cgranade
Copy link
Contributor

cgranade commented Mar 14, 2019

@ayush1999 This can happen sometimes if you haven't restarted your shell since installing the .NET Core SDK. Can you check if ~/.dotnet/tools is on your $PATH? Thanks!

@ayush1999
Copy link
Author

I manually added it to my path: export PATH="/home/ayush99/.dotnet/tools:$PATH", however I still get the same error. (Which is strange, I can see the executable in my path, not sure why it isn't recognized.)

@cgranade
Copy link
Contributor

That is odd, agreed. Typically, when you run a global tool using syntax like dotnet iqsharp, that looks for a dotnet-iqsharp executable. Can you run dotnet-iqsharp --version (with the dash)? If not, if you use the explicit path to the dotnet-iqsharp executable in ~/.dotnet/tools, does that work to run dotnet-iqsharp --version?

@ayush1999
Copy link
Author

@cgranade I can run dotnet-iqsharp --version:

ayush99@ayush99:~$ dotnet-iqsharp --version
Language kernel: 0.5.1902.2802
Jupyter core: 1.0.0.0

Is there any other possible reason that dotnet iqsharp might not be recognizing the executable?

@cgranade
Copy link
Contributor

cgranade commented Mar 19, 2019

That's definitely odd, would you be willing to provide some more diagnostic information? Specifically, the output of dotnet --info and platform (e.g.: lsb_release -a from Linux) could be quite useful. Thanks!

@ayush1999
Copy link
Author

Sure:

ayush99@ayush99:~$ dotnet --info
.NET Core SDK (reflecting any global.json):
 Version:   2.2.105
 Commit:    7cecb35b92

Runtime Environment:
 OS Name:     ubuntu
 OS Version:  18.04
 OS Platform: Linux
 RID:         ubuntu.18.04-x64
 Base Path:   /usr/share/dotnet/sdk/2.2.105/

Host (useful for support):
  Version: 2.2.3
  Commit:  6b8ad509b6

.NET Core SDKs installed:
  2.2.105 [/usr/share/dotnet/sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.All 2.2.3 [/usr/share/dotnet/shared/Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.2.3 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 2.2.3 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs:
  https://aka.ms/dotnet-download


ayush99@ayush99:~$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 18.04.2 LTS
Release:	18.04
Codename:	bionic

@tirdtoon
Copy link

I have the same problem...on ubuntu 18.04

@ayush1999
Copy link
Author

@cgranade Any updates on this?

@isaacy
Copy link

isaacy commented Apr 8, 2019

I ran into this but when I re-ran this nder the Anacorda prompt it worked!

@ImanRahmanRI
Copy link

I have encounter the similar problem. But, in my case I solve it with installed .Net again with the builds apps version that compatible with visual studio 2017

@cgranade
Copy link
Contributor

@tirdtoon @ayush1999 @desireevl My apologies, but I haven't been able to reproduce the issue on my end. If you have any other information you provide, I would greatly appreciate it. Are you able to run other .NET Core Global Tools (e.g.: dotnet-cowsay)? Thanks for the help diagnosing this!

@anpaz
Copy link
Member

anpaz commented Apr 25, 2019

Looks like dotnet-iqsharp works, but dotnet iqsharp doesn't work, is that correct @ayush1999?
If so, looks like a problem on how dotnet is findind sub-commands in Ubuntu, looks like in this environment is not looking yet for subcommands in global tools.

@cgranade , do you have any objections if we change the tool name to be just iqsharp? Looking at global tools documentation, that'w how is documented on how to create custom tools.

@anpaz
Copy link
Member

anpaz commented Apr 25, 2019

@tirdtoon @ayush1999 @desireevl if dotnet-iqsharp works, as a workaround you should be able to run this command to install the kernel:

dotnet-iqsharp install --user --path-to-tool="$(which dotnet-iqsharp)"

Optionally, if there is a Dockerfile in our samples repository that you can use to create a Docker image and get you started. The image is setup you can run Q# from C#/Python/Jupyter.

@gauss1314
Copy link

@tirdtoon @ayush1999 @desireevl if dotnet-iqsharp works, as a workaround you should be able to run this command to install the kernel:

dotnet-iqsharp install --user --path-to-tool="$(which dotnet-iqsharp)"

Optionally, if there is a Dockerfile in our samples repository that you can use to create a Docker image and get you started. The image is setup you can run Q# from C#/Python/Jupyter.

Thank you, it saved my time! But I want to know how do you find this solution? It is a dotnet bug or jupyter ?

@chopinvan
Copy link

I'm trying to follow the guidelines mentioned in https://docs.microsoft.com/en-us/quantum/install-guide/python?view=qsharp-preview to install the iqsharp kernel, but I get a No executable found matching command "dotnet-install" when installing it (using dotnet iqsharp install).

ayush99@ayush99:~/quant$ dotnet tool install -g Microsoft.Quantum.IQSharp
Tool 'microsoft.quantum.iqsharp' is already installed.
ayush99@ayush99:~/quant$ dotnet install iqsharp
No executable found matching command "dotnet-install"

Use this

dotnet iqsharp install --user

Because Jupyter can not run under Sudo mode, but without sudo mode you can not write into Jupyter notebook directory. So, you need to make file writing local

@cgranade cgranade transferred this issue from microsoft/Quantum Jul 11, 2019
@cgranade cgranade added Area-Kernel Issue relates to the IQ# kernel. Status-NeedMoreInfo Further information is requested labels Jul 11, 2019
@sdf94
Copy link

sdf94 commented Jul 28, 2019

I am running into the same issue.
~ SarahsAdventure$ dotnet tool install -g Microsoft.Quantum.IQSharp Tool 'microsoft.quantum.iqsharp' is already installed. ~ SarahsAdventure$ dotnet iqsharp install --user No executable found matching command "dotnet-iqsharp"

@BrokenDuck
Copy link

Here is the link to a stack exchange post where someone says that this problem may be caused by iqsharp not being supported by .net core 3.1.100. Is this true, if so the documentation, README.md should be updated accordingly.

@rmshaffer rmshaffer added Area-Install Issue relates to installation or operating system environment. and removed Area-Kernel Issue relates to the IQ# kernel. labels Apr 20, 2020
@l2learner-devops
Copy link

@anpaz-msft Thanks for your workaround to install the kernel, it worked. Kudos.

@rmshaffer
Copy link
Contributor

Closing out this old issue, since it appears that solutions or workarounds exist for the problems reported here.

If anyone is having an issue with IQ# kernel installation on recent builds (particularly since March, when support for .NET Core 3.1 was added), please open a new issue with details of your configuration and the error you are hitting. Thank you!

@rmshaffer
Copy link
Contributor

Also see this issue for details on the underlying problem with adding the global tool path to the system path: dotnet/sdk#9353

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Area-Install Issue relates to installation or operating system environment. Status-NeedMoreInfo Further information is requested
Projects
None yet
Development

No branches or pull requests