-
Notifications
You must be signed in to change notification settings - Fork 526
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
Attempting to run the helloworld sample #240
Comments
Hey @clarkezone, may I know which version of python are you using? |
Python 3.8.3 |
Can you try using Edit: Can you confirm if you are using Windows? |
I can do but what is the recommended way of installing a compatible version of Python? |
If it's windows I would use the installer they provided: https://www.python.org/downloads/windows/ |
I have the same problem with Dapr, Python and Windows 10. I have tried:
I have tried also python command instead of python3 with dapr, but it doesn't work :( I'm tired of figthing with Python with Dapr on Windows 10. Any simple way what to do to run this hello example with Dapr, Python 3.8 and Windows 10 x64? P.S. I'm starting update my Windows 10 to version 2004. Maybe WSL2 would be better evironment for Python in the case? |
+1 to that. Wish there was a golang alternative in the helloworld example or at least make work with the most common way of getting python (eg windows store)
…Sent from my iPad
On Jun 16, 2020, at 10:49, MarcinKruszynski <notifications@github.com> wrote:
I have the same problem with Dapr, Python and Windows 10. I have tried:
* Python 3.8 from Windows Store (only with python3 by default),
* Python 3.8 full distribution for Windows (without python3)
* Python 3.7 with Visual Studio 2019 (without python3)
I have tried also python command instead of python3 with dapr, but it doesn't work :(
I'm tired of figthing with Python with Dapr on Windows 10. Any simple way what to do to run this hello example with Dapr, Python 3.8 and Windows 10 x64?
P.S. I'm starting update my Windows 10 to version 2004. Maybe WSL2 would be better evironment for Python in the case?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fdapr%2Fsamples%2Fissues%2F240%23issuecomment-644914716&data=02%7C01%7C%7C9d9e127211df47bf811608d8121dab03%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637279265910246114&sdata=XVnFXEN6EiFo9t%2Bm7eUbY0yJ6e2ZWjlIchZAD%2F3N%2Bf8%3D&reserved=0>, or unsubscribe<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAAITOOSTKOQA2CDWPXDWHELRW6WD5ANCNFSM4N4XVC5Q&data=02%7C01%7C%7C9d9e127211df47bf811608d8121dab03%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637279265910256106&sdata=CvFH4oeOkMTEeRYQaQznOfhjwtHqnpXwE42Piu796b4%3D&reserved=0>.
|
I am writing this as a small guide to do a clean install of python in windows 10 after which you should be able to run sample 1 smoothly.
Now you should be able to run sample 1 without any issues related to Python. ==================================================
Sorry about your experience @MarcinKruszynski , please try the above steps.
@clarkezone I was able to reproduce the issue while using Microsoft store to download Python - the go package used to find the python executable isn't able to identify it even when it's in the PATH. This needs a bit more study as to why it's happening. Fortunately there are other simple ways to get Python and I request you to please go through the steps I provided above. |
I’m having trouble uninstalling the version from the windows store. However it should work:
C:\src\github.com\dapr\samples\1.hello-world>python3 Python 3.8.3 (tags/v3.8.3:6f8c832, May 13 2020, 22:37:02) [MSC v.1924 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> C:\src\github.com\dapr\samples\1.hello-world>python C:\src\github.com\dapr\samples\1.hello-world>where python C:\Users\jeclarke\AppData\Local\Microsoft\WindowsApps\python.exe C:\src\github.com\dapr\samples\1.hello-world>where python3 C:\Users\jeclarke\AppData\Local\Microsoft\WindowsApps\python3.exe
And it doesn’t
Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10
From: Pruthvidhar R Dhodda<mailto:notifications@github.com>
Sent: Tuesday, June 16, 2020 9:13 PM
To: dapr/samples<mailto:samples@noreply.github.com>
Cc: James Clarke<mailto:james@clarkezone.net>; Mention<mailto:mention@noreply.github.com>
Subject: Re: [dapr/samples] Attempting to run the helloworld sample (#240)
I am writing this as a small guide to do a clean install of python in windows 10 after which you should be able to run sample 1 smoothly.
1. Download the Windows executable installer for Python 3.8.3 from the official python downloads page<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.python.org%2Fdownloads%2Fwindows%2F&data=02%7C01%7C%7C664d68df25184051f85c08d81274c9b7%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637279640088415646&sdata=yLPXiPp7p5bc1H%2F%2F7px0unRxJpTIqORR%2FEb4aUlCM6M%3D&reserved=0> or just click this<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.python.org%2Fftp%2Fpython%2F3.8.3%2Fpython-3.8.3-amd64.exe&data=02%7C01%7C%7C664d68df25184051f85c08d81274c9b7%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637279640088425642&sdata=XUPMUtrRPtXpicmQ%2Bi%2B3bvrgq1yjOLisTeA47lN8edA%3D&reserved=0>.
2. Launch the downloaded installer and make sure you select the Add Python 3.8 to PATH checkbox as shown below:
[image]<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fuser-images.githubusercontent.com%2F60198385%2F84852611-297a4400-b012-11ea-9847-23c375059852.png&data=02%7C01%7C%7C664d68df25184051f85c08d81274c9b7%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637279640088435637&sdata=3sGrCHnlBGu%2Bzc7vWez83wzEcZO%2F%2BFmRyFuYmm7H05k%3D&reserved=0>
3. Select the Install Now option to install Python 3.8
4. Once the installation is done verify it by running the command which python in cmd. It should ideally point to your new installation which is c/Users/<username>/AppData/Local/Programs/Python/Python38/python
5. If some other path is printed then go to the environment variables and remove/move down the path to other python installation.
Now you should be able to run sample 1 without any issues related to Python.
==================================================
I'm tired of figthing with Python with Dapr on Windows 10. Any simple way what to do to run this hello example with Dapr, Python 3.8 and Windows 10 x64?
Sorry about your experience @MarcinKruszynski<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMarcinKruszynski&data=02%7C01%7C%7C664d68df25184051f85c08d81274c9b7%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637279640088445632&sdata=c6r01EU93GVyItFU3fzUEdAXHaw%2FYtfXO1oiX61Dbeg%3D&reserved=0> , please try the above steps.
+1 to that. Wish there was a golang alternative in the helloworld example or at least make work with the most common way of getting python (eg windows store)
@clarkezone<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fclarkezone&data=02%7C01%7C%7C664d68df25184051f85c08d81274c9b7%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637279640088455626&sdata=Ft2f9qSfp2dL8NOYLuNCpW4E43%2FR%2FD1i2gGW2SkPR0M%3D&reserved=0> I was able to reproduce the issue while using Microsoft store to download Python - the go package used to find the python executable isn't able to identify it even when it's in the PATH. This needs a bit more study as to why it's happening. Fortunately there are other simple ways to get Python and I request you to please go through the steps I provided above.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fdapr%2Fsamples%2Fissues%2F240%23issuecomment-645137261&data=02%7C01%7C%7C664d68df25184051f85c08d81274c9b7%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637279640088465622&sdata=J8YUm3DvrY%2BZYY%2Bm8MD03DINGT%2BpIMLwmA2y137jACM%3D&reserved=0>, or unsubscribe<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAAITOORKQ7HKKTT3SURBUC3RXA7GPANCNFSM4N4XVC5Q&data=02%7C01%7C%7C664d68df25184051f85c08d81274c9b7%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637279640088465622&sdata=vJA5kAVC7Bbz4%2B8g%2F0fVR%2BMnDFE1dhDjQe8ycdaNp1k%3D&reserved=0>.
|
Can you please verify if the python path added by installer is at the top in environment variables? |
The installer attempted to add it, but it required admin privileges. I had to manually add it to my user env vars. |
Did it work after that? |
Yes, it worked after that. I had to run "python" instead of "python3" also. |
@clarkezone @MarcinKruszynski please see the discussion above and let me know if it's resolved. |
I will try installing the version here and manually adding path and ensure it’s above the store version which is uninstallable and let you know |
I concur, same here path was not added, it now works. |
Good to know, I'll link this issue in sample 1 for future users. |
Ultimate root cause of this is that golang can't handle windows AppStore App execution aliases. There is an upstream go issue for this: No good fixes for dapr cli barring this issue gets fixed upstream, but I did find another workaround:
This get dapr to invoke cmd which in turn can properly invoke the AppStore App execution alias. I think this is a slightly better workaround than installing another python package. I'll update the quickstart documentation with these details. |
I installed ensuring that the installer adds to the path as shown here And the dapr command should use python and not python3
Then it works. |
Expected Behavior
Following through the tutorial here:
https://github.com/dapr/samples/tree/master/1.hello-world
Got as far as step 6.. everything worked up until that point. Now..
Actual Behavior
dapr run --app-id pythonapp python3 app.py
Starting Dapr with id pythonapp. HTTP Port: 62141. gRPC Port: 62142
exec: "python3": executable file not found in %!P(MISSING)ATH%!(NOVERB)
Steps to Reproduce the Problem
Try following the tutorial
The text was updated successfully, but these errors were encountered: