microsoft / Quantum

Microsoft Quantum Development Kit Samples
https://docs.microsoft.com/quantum
MIT License
3.88k stars 919 forks source link

Q# compilation fails if user name contains a blank space #48

Closed aviralwal closed 6 years ago

aviralwal commented 6 years ago

I am trying to run the TeleportationSample in Samples > 0.Introduction folder of QsharpLibraries solution. After setting the project as Startup project, I perform the build operation F5. But the build fails with error as :-

1>------ Build started: Project: Microsoft.Quantum.Canon, Configuration: Debug Any CPU ------
1>No executable found matching command "dotnet-C:\Users\deepa"
1>C:\Users\test user\.nuget\packages\microsoft.quantum.development.kit\0.2.1802.2202-preview\build\Microsoft.Quantum.Development.Kit.targets(17,5): error MSB3073: The command "dotnet C:\Users\test user\.nuget\packages\microsoft.quantum.development.kit\0.2.1802.2202-preview\build\../tools/qsc/qsc.dll --input "AmplitudeAmplification\AmplitudeAmplification.qs" "AmplitudeAmplification\Types.qs" "AmplitudeAmplification\Utils.qs" "Arithmetic\Arithmetic.qs" "Arrays\Arrays.qs" "Asserts\ClassicalAsserts.qs" "Asserts\QuantumAsserts.qs" "Combinators\ApplyMultiControlled.qs" "Combinators\ApplyToEach.qs" "Combinators\ApplyToEachIndex.qs" "Combinators\ApplyToFirst.qs" "Combinators\ApplyToPartition.qs" "Combinators\Bind.qs" "Combinators\Compose.qs" "Combinators\Curry.qs" "Combinators\OperationPow.qs" "Combinators\RestrictToSubregister.qs" "Combinators\With.qs" "DataStructures\Pairs.qs" "DataStructures\Stack.qs" "Data\GeneratorRepresentation.qs" "Enumeration\Filter.qs" "Enumeration\Fold.qs" "Enumeration\ForAll.qs" "Enumeration\ForAny.qs" "Enumeration\Map.qs" "Enumeration\Subarray.qs" "Enumeration\Trotter.qs" "IterateThroughCartesianProduct.qs" "Math\Complex.qs" "Math\Constants.qs" "Math\Functions.qs" "Math\Random.qs" "NoOp.qs" "PhaseEstimation\Iterative.qs" "PhaseEstimation\Quantum.qs" "PhaseEstimation\Robust.qs" "PhaseEstimation\Types.qs" "Qcvv\ProcessTomography.qs" "Qecc\5QubitCode.qs" "Qecc\7QubitCode.qs" "Qecc\BitFlipCode.qs" "Qecc\KnillDistill.qs" "Qecc\Types.qs" "Qecc\Utils.qs" "QFT.qs" "Simulation\Algorithms.qs" "Simulation\PauliEvolutionSet.qs" "Simulation\Techniques.qs" "Simulation\Types.qs" "StatePreparation\StatePreparation.qs" "UnsignedIntegers.qs" "Utils\ControlledOnBitString.qs" "Utils\Multiplexer.qs" "Utils\Paulis.qs" "Utils\Predicates.qs" "Utils\Ranges.qs" "Utils\TypeConversion.qs" --references "C:\Users\test user\.nuget\packages\microsoft.quantum.development.kit\0.2.1802.2202-preview\lib\netstandard2.0\Microsoft.Quantum.MetaData.dll" "C:\Users\test user\.nuget\packages\microsoft.quantum.development.kit\0.2.1802.2202-preview\lib\netstandard2.0\Microsoft.Quantum.Primitives.dll" "C:\Users\test user\.nuget\packages\microsoft.quantum.development.kit\0.2.1802.2202-preview\lib\netstandard2.0\Microsoft.Quantum.Simulation.Common.dll" "C:\Users\test user\.nuget\packages\microsoft.quantum.development.kit\0.2.1802.2202-preview\lib\netstandard2.0\Microsoft.Quantum.Simulation.Core.dll" "C:\Users\test user\.nuget\packages\microsoft.quantum.development.kit\0.2.1802.2202-preview\lib\netstandard2.0\Microsoft.Quantum.Simulation.QCTraceSimulatorRuntime.dll" "C:\Users\test user\.nuget\packages\microsoft.quantum.development.kit\0.2.1802.2202-preview\lib\netstandard2.0\Microsoft.Quantum.Simulation.Simulators.dll" --outputpath obj\qsharp\src\" exited with code 1.
1>Done building project "Microsoft.Quantum.Canon.csproj" -- FAILED.
2>------ Build started: Project: TeleportationSample, Configuration: Debug Any CPU ------
2>No executable found matching command "dotnet-C:\Users\deepa"
2>C:\Users\test user\.nuget\packages\microsoft.quantum.development.kit\0.2.1802.2202-preview\build\Microsoft.Quantum.Development.Kit.targets(17,5): error MSB3073: The command "dotnet C:\Users\test user\.nuget\packages\microsoft.quantum.development.kit\0.2.1802.2202-preview\build\../tools/qsc/qsc.dll --input "TeleportationSample.qs" --references "D:\Repos\Quantum\Microsoft.Quantum.Canon\bin\Debug\netstandard2.0\Microsoft.Quantum.Canon.dll" "C:\Users\test user\.nuget\packages\microsoft.quantum.development.kit\0.2.1802.2202-preview\lib\netstandard2.0\Microsoft.Quantum.MetaData.dll" "C:\Users\test user\.nuget\packages\microsoft.quantum.development.kit\0.2.1802.2202-preview\lib\netstandard2.0\Microsoft.Quantum.Primitives.dll" "C:\Users\test user\.nuget\packages\microsoft.quantum.development.kit\0.2.1802.2202-preview\lib\netstandard2.0\Microsoft.Quantum.Simulation.Common.dll" "C:\Users\test user\.nuget\packages\microsoft.quantum.development.kit\0.2.1802.2202-preview\lib\netstandard2.0\Microsoft.Quantum.Simulation.Core.dll" "C:\Users\test user\.nuget\packages\microsoft.quantum.development.kit\0.2.1802.2202-preview\lib\netstandard2.0\Microsoft.Quantum.Simulation.QCTraceSimulatorRuntime.dll" "C:\Users\test user\.nuget\packages\microsoft.quantum.development.kit\0.2.1802.2202-preview\lib\netstandard2.0\Microsoft.Quantum.Simulation.Simulators.dll" --outputpath obj\qsharp\src\" exited with code 1.
2>Done building project "TeleportationSample.csproj" -- FAILED.
========== Build: 0 succeeded, 2 failed, 0 up-to-date, 0 skipped ==========

This might be the issue of dotnet CLI unable to reach the complete path as the correct path is C:/Users/test user/...(the path that follows) but it reads till C:\Users\test and then fails.

I am fairly new to both Quantum computing and dotnet environment so any help is highly appreciated.

deepakkumar1984 commented 6 years ago

The problem is with the account name "test user". Create a new user without space and test, it should work.

DhawalJethwani commented 6 years ago

@aviralwal did you find a solution? I am getting the same build error........

tcNickolas commented 6 years ago

The issue has been fixed in the latest release (0.2.1806.2802-preview). Please update your project nugets to that version.

anpaz commented 6 years ago

This was actually fixed on 0.2.1806.3001-preview. Sorry for the confusion.

Givanildo1976 commented 6 years ago

ja tentei, mais da o mesmo erro reinstalei e instalei os programas e mesmo assim deu o mesmo erro como faço para corrigir essa versão tem o caminho? pode me ajudar ?

anpaz commented 6 years ago

@Givanildo1976 , podras mostrarnos los errores? este problema fue corregido en la version 0.2.1806.3001-preview

Givanildo1976 commented 6 years ago

Ola Andre Paz meu nome e Givanido Thank for help me I,m problem in install my reposite. You can help me please My problem is install 0.2.1806.3001-preview where is it ? Thank very much My name Givanildo I´m from Brasil My phone is +5511949987231 Im learning kkkkkkkk

2018-07-31 6:02 GMT-03:00 Andres Paz notifications@github.com:

@Givanildo1976 https://github.com/Givanildo1976 , podras mostrarnos los errores? este problema fue corregido en la version 0.2.1806.3001-preview

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Microsoft/Quantum/issues/48#issuecomment-409149227, or mute the thread https://github.com/notifications/unsubscribe-auth/An-59oSXA0A0Ix8udfcTcX6eAlSUEv6nks5uMB0NgaJpZM4Teamg .

anpaz commented 6 years ago

Instructions can be found here: https://docs.microsoft.com/en-us/quantum/quantum-installconfig?view=qsharp-preview&tabs=tabid-vs2017 If you face any problems, I suggest posting a question in http://stackoverflow.com using the q# tag. Include the text of the error you're getting.

Piedone commented 5 years ago

Can it be that there's a similar error also when your username contain an accented character (like in "Zoltán")? When I try to build the samples I get errors of this sort for all projects:

Severity Description Project Error The command "dotnet "d:\Users\Zoltán.nuget\packages\microsoft.quantum.development.kit\0.4.1901.3104\build../tools/qsc/qsc.dll" build --format MsBuild --input "SimpleIsing.qs" --references "d:\Users\Zoltán.nuget\packages\microsoft.quantum.development.kit\0.4.1901.3104\lib\netstandard2.0\Microsoft.Quantum.Primitives.dll" "d:\Users\Zoltán.nuget\packages\microsoft.quantum.development.kit\0.4.1901.3104\lib\netstandard2.0\Microsoft.Quantum.QsCompilerCommon.dll" "d:\Users\Zoltán.nuget\packages\microsoft.quantum.development.kit\0.4.1901.3104\lib\netstandard2.0\Microsoft.Quantum.Simulation.Common.dll" "d:\Users\Zoltán.nuget\packages\microsoft.quantum.development.kit\0.4.1901.3104\lib\netstandard2.0\Microsoft.Quantum.Simulation.Core.dll" "d:\Users\Zoltán.nuget\packages\microsoft.quantum.development.kit\0.4.1901.3104\lib\netstandard2.0\Microsoft.Quantum.Simulation.QCTraceSimulatorRuntime.dll" "d:\Users\Zoltán.nuget\packages\microsoft.quantum.development.kit\0.4.1901.3104\lib\netstandard2.0\Microsoft.Quantum.Simulation.Simulators.dll" --output obj\qsharp\src\" exited with code -3. SimpleIsingSample

There are a few with error code -2 too:

Severity Description Project Error The command "dotnet "d:\Users\Zoltán.nuget\packages\microsoft.quantum.development.kit\0.4.1901.3104\build../tools/qsc/qsc.dll" build --format MsBuild --input "AdiabaticIsing.qs" --references "E:\Projects\Munka\Lombiq\MicrosoftQuantumDevelopmentKitSamples\Samples\src\IsingGenerators\bin\Debug\netcoreapp2.0\IsingGeneratorsSample.dll" "d:\Users\Zoltán.nuget\packages\microsoft.quantum.canon\0.4.1901.3104\lib\netstandard2.0\Microsoft.Quantum.Canon.dll" "d:\Users\Zoltán.nuget\packages\microsoft.quantum.development.kit\0.4.1901.3104\lib\netstandard2.0\Microsoft.Quantum.Primitives.dll" "d:\Users\Zoltán.nuget\packages\microsoft.quantum.development.kit\0.4.1901.3104\lib\netstandard2.0\Microsoft.Quantum.QsCompilerCommon.dll" "d:\Users\Zoltán.nuget\packages\microsoft.quantum.development.kit\0.4.1901.3104\lib\netstandard2.0\Microsoft.Quantum.Simulation.Common.dll" "d:\Users\Zoltán.nuget\packages\microsoft.quantum.development.kit\0.4.1901.3104\lib\netstandard2.0\Microsoft.Quantum.Simulation.Core.dll" "d:\Users\Zoltán.nuget\packages\microsoft.quantum.development.kit\0.4.1901.3104\lib\netstandard2.0\Microsoft.Quantum.Simulation.QCTraceSimulatorRuntime.dll" "d:\Users\Zoltán.nuget\packages\microsoft.quantum.development.kit\0.4.1901.3104\lib\netstandard2.0\Microsoft.Quantum.Simulation.Simulators.dll" --output obj\qsharp\src\" exited with code -2. AdiabaticIsingSample

Piedone commented 5 years ago

And yes, I've opened https://github.com/Microsoft/Quantum/issues/150 for this.