Comments (10)
I followed that guide, and also explicitly upgraded both python and python-pip, no dice. I did figure it out though (and it exposes my newbie-ness with Python on Ubuntu/WSL):
The packages required for this require Python 3. On Ubuntu, python and pip commands default to Python 2. You need to invoke pip3 install -r requirements.txt
. Using that it worked.
The takeaway, for the apparent novices like myself, it may be helpful to update the Graph documentation to specify in the instructions (Use pip3 command on Linux or WSL platforms).
So, perhaps, instead of:
Run this command to install the required Python package dependencies: pip install -r requirements.txt.
Changing to:
Run this command to install the required Python package dependencies: pip install -r requirements.txt. (For Ubuntu and Linux distributions, you may need to invoke pip3 install -r requirements.txt to run using Python 3)
from msgraph-sample-pythondjangoapp.
I'll work with the portal team to get the instruction on the quick-start page updated.
from msgraph-sample-pythondjangoapp.
@ShaneC there should be a version file in that zip - can you tell me what version number is in it?
from msgraph-sample-pythondjangoapp.
That's an odd error given that 3.2.7 is definitely available: https://pypi.org/project/asgiref/. It's the first entry in requirements.txt - I wonder if it's just failing there and stopping. Can you try pip install Django==3.0.4
and see if that succeeds?
from msgraph-sample-pythondjangoapp.
Thanks @jasonjoh -- The version in the zip is 1.2.
Your suspicion may be correct, the same issue happens with the Django install:
user@box:/mnt/c/Users/schism/Desktop/msgraph-training-pythondjangoapp/graph_tutorial$ pip install Django==3.0.4 Collecting Django==3.0.4 Could not find a version that satisfies the requirement Django==3.0.4 (from versions: 1.1.3, 1.1.4, 1.2, 1.2.1, 1.2.2, 1.2.3, 1.2.4, 1.2.5, 1.2.6, 1.2.7, 1.3, 1.3.1, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.3.6, 1.3.7, 1.4, 1.4.1, 1.4.2, 1.4.3, 1.4.4, 1.4.5, 1.4.6, 1.4.7, 1.4.8, 1.4.9, 1.4.10, 1.4.11, 1.4.12, 1.4.13, 1.4.14, 1.4.15, 1.4.16, 1.4.17, 1.4.18, 1.4.19, 1.4.20, 1.4.21, 1.4.22, 1.5, 1.5.1, 1.5.2, 1.5.3, 1.5.4, 1.5.5, 1.5.6, 1.5.7, 1.5.8, 1.5.9, 1.5.10, 1.5.11, 1.5.12, 1.6, 1.6.1, 1.6.2, 1.6.3, 1.6.4, 1.6.5, 1.6.6, 1.6.7, 1.6.8, 1.6.9, 1.6.10, 1.6.11, 1.7, 1.7.1, 1.7.2, 1.7.3, 1.7.4, 1.7.5, 1.7.6, 1.7.7, 1.7.8, 1.7.9, 1.7.10, 1.7.11, 1.8a1, 1.8b1, 1.8b2, 1.8rc1, 1.8, 1.8.1, 1.8.2, 1.8.3, 1.8.4, 1.8.5, 1.8.6, 1.8.7, 1.8.8, 1.8.9, 1.8.10, 1.8.11, 1.8.12, 1.8.13, 1.8.14, 1.8.15, 1.8.16, 1.8.17, 1.8.18, 1.8.19, 1.9a1, 1.9b1, 1.9rc1, 1.9rc2, 1.9, 1.9.1, 1.9.2, 1.9.3, 1.9.4, 1.9.5, 1.9.6, 1.9.7, 1.9.8, 1.9.9, 1.9.10, 1.9.11, 1.9.12, 1.9.13, 1.10a1, 1.10b1, 1.10rc1, 1.10, 1.10.1, 1.10.2, 1.10.3, 1.10.4, 1.10.5, 1.10.6, 1.10.7, 1.10.8, 1.11a1, 1.11b1, 1.11rc1, 1.11, 1.11.1, 1.11.2, 1.11.3, 1.11.4, 1.11.5, 1.11.6, 1.11.7, 1.11.8, 1.11.9, 1.11.10, 1.11.11, 1.11.12, 1.11.13, 1.11.14, 1.11.15, 1.11.16, 1.11.17, 1.11.18, 1.11.20, 1.11.21, 1.11.22, 1.11.23, 1.11.24, 1.11.25, 1.11.26, 1.11.27, 1.11.28, 1.11.29) No matching distribution found for Django==3.0.4
Maybe a WSL issue? I just tried this same zipfile on the same Windows box within PowerShell and executed the commands on the Windows Python installation (as opposed to WSL instance), and it worked perfectly.
I'll do some more debugging and then forward to those folks.
from msgraph-sample-pythondjangoapp.
maybe, or some subtle difference in Python on Linux vs Windows. I wonder if you can point pip at different repositories, and it's just misconfigured?
from msgraph-sample-pythondjangoapp.
from msgraph-sample-pythondjangoapp.
I ran into the same issue as described by @ShaneC and this thread was helpful. I agree it would be helpful to specify Python 3 in the error message, but I wouldn't keep it specific to Ubuntu and Linux since I am having the same issue on MacOS (with M1 chip).
I also wanted to add that the subsequent commands from the quickstart also need to be run using Python 3. See screenshots below of the error when using Python 2.7:
But these commands work fine when using python3:
from msgraph-sample-pythondjangoapp.
Thanks for the report @ries9112. If you run python --version
, I'm guessing it reports a 2.x version? It might be enough to add to the tutorial at the beginning to run that, and if it reports 2.x, use the python3
command.
python3
doesn't seem to be universal: on my Windows 10 machine with only Python 3.9, running python3 gives an error about installing Python from the Microsoft Store!?
▶ python3 --version
Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.
from msgraph-sample-pythondjangoapp.
Closing as we've greatly simplified the downloadable quickstart, and it's no longer based on this project.
from msgraph-sample-pythondjangoapp.
Related Issues (20)
- Sign in does not work HOT 6
- Home Page is Not rendering after Providing Credentials HOT 12
- Question about Tutorial code HOT 1
- Not pulling calendar events HOT 3
- Replace get_sign_in_url with get_sign_in_flow
- Update documentation HOT 1
- Syntax Error on Raise From in Manage.py because of the shebang line? HOT 4
- settings.py needs to be updated for templates and static folders HOT 5
- Redirection to the incorrect locale HOT 3
- is user_athenticated not being set to true on login HOT 6
- ValueError ("state missing from auth_code_flow") HOT 4
- OWA graph simple example required - no django HOT 6
- authority issue needs to be discussed in tutorial HOT 2
- Unauthenticated user cannot access the site. HOT 1
- Tutorial part 3: Sign-In throws error - localhost refused to connect. HOT 4
- Authentication Problem - ValueError at /callback HOT 1
- Why is pycparser needed? HOT 2
- Use the O365 package? HOT 2
- Quickstart Fails to Authenticate. HOT 8
- Unauthenticated User Exception HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from msgraph-sample-pythondjangoapp.