-
-
Notifications
You must be signed in to change notification settings - Fork 133
Proofread, reorganized, and added to all the "Python on Windows" guides #794
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
Proofread, reorganized, and added to all the "Python on Windows" guides #794
Conversation
…lanned changes and have nice order
… normalized to 120 wide with rewrap vsc ext)
pydis_site/apps/content/resources/guides/python-guides/windows/common-issues.md
Outdated
Show resolved
Hide resolved
pydis_site/apps/content/resources/guides/python-guides/windows/common-issues.md
Outdated
Show resolved
Hide resolved
code with to ensure if it actually errors. | ||
|
||
If your code runs fine, you could try restarting your editor. If you have newly installed a module it may just not | ||
have detected it yet. If that doesn't help, you may need to configure your editor to ensure it is looking for the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, some editors can still show that error even if you're showing the correct virtual environment with the installed package.
I think it was opencv IIRC.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that this https://stackoverflow.com/questions/34365044/pycharm-does-not-recognize-cv2-as-a-module ?
Where the fix is something like from cv2 import cv2
. Could add a note to that SO link.
pydis_site/apps/content/resources/guides/python-guides/windows/common-issues.md
Show resolved
Hide resolved
pydis_site/apps/content/resources/guides/python-guides/windows/common-issues.md
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've only had a look on two files but it looks good so far.
I'll try to have a look at the rest after work.
Beautiful content, thanks to you both for this. (@wookie184)
pydis_site/apps/content/resources/guides/python-guides/windows/common-issues.md
Outdated
Show resolved
Hide resolved
pydis_site/apps/content/resources/guides/python-guides/windows/microsoft-store.md
Show resolved
Hide resolved
…/common-issues.md Co-authored-by: Amrou Bellalouna <48383734+shtlrs@users.noreply.github.com>
…/common-issues.md Co-authored-by: Amrou Bellalouna <48383734+shtlrs@users.noreply.github.com>
…/common-issues.md Co-authored-by: Amrou Bellalouna <48383734+shtlrs@users.noreply.github.com>
…python-discord-site into add-windows-guide
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! I have some suggestions, feel free to disagree with any of them :)
pydis_site/apps/content/resources/guides/python-guides/windows/microsoft-store.md
Outdated
Show resolved
Hide resolved
pydis_site/apps/content/resources/guides/python-guides/windows/microsoft-store.md
Show resolved
Hide resolved
pydis_site/apps/content/resources/guides/python-guides/windows/microsoft-store.md
Show resolved
Hide resolved
pydis_site/apps/content/resources/guides/python-guides/windows/installing-and-using-python.md
Outdated
Show resolved
Hide resolved
pydis_site/apps/content/resources/guides/python-guides/windows/installing-and-using-python.md
Show resolved
Hide resolved
pydis_site/apps/content/resources/guides/python-guides/windows/putting-python-on-path.md
Show resolved
Hide resolved
pydis_site/apps/content/resources/guides/python-guides/windows/putting-python-on-path.md
Outdated
Show resolved
Hide resolved
pydis_site/apps/content/resources/guides/python-guides/windows/putting-python-on-path.md
Show resolved
Hide resolved
pydis_site/apps/content/resources/guides/python-guides/windows/putting-python-on-path.md
Outdated
Show resolved
Hide resolved
pydis_site/apps/content/resources/guides/python-guides/windows/putting-python-on-path.md
Outdated
Show resolved
Hide resolved
…/installing-and-using-python.md Co-authored-by: wookie184 <wookie1840@gmail.com>
…/installing-and-using-python.md Co-authored-by: wookie184 <wookie1840@gmail.com>
…/installing-and-using-python.md Co-authored-by: wookie184 <wookie1840@gmail.com>
…/common-issues.md Co-authored-by: wookie184 <wookie1840@gmail.com>
…/installing-and-using-python.md Co-authored-by: wookie184 <wookie1840@gmail.com>
…/putting-python-on-path.md Co-authored-by: wookie184 <wookie1840@gmail.com>
…/putting-python-on-path.md Co-authored-by: wookie184 <wookie1840@gmail.com>
…/putting-python-on-path.md Co-authored-by: wookie184 <wookie1840@gmail.com>
…python-discord-site into add-windows-guide
One thing I wanted to be sure to resolve is whether or not the yellow downloads button on https://www.python.org/downloads/ really does download the best version the suits the computer, since I said it did in the "Recommended Installed" tutorial:
On Win 10 64-bit and Linux (what I'm able to test) it seems to, but I haven't been able to make sure the button downloads the 32-bit installer on a 32-bit machine. (And couldn't find code for the OS check in the pythondotorg repo.) |
It seems to send this HTML with downloads for each OS <div class="download-for-current-os">
<div class="download-os-macos" style="display: none;">
<h1 class="call-to-action">Download the latest version for macOS</h1>
<p class="download-buttons">
<a class="button" href="https://www.python.org/ftp/python/3.11.0/python-3.11.0-macos11.pkg">Download Python 3.11.0</a>
</p>
</div>
<div class="download-os-source" style="display: none;">
<h1 class="call-to-action">Download the latest source release</h1>
<p class="download-buttons">
<a class="button" href="https://www.python.org/ftp/python/3.11.0/Python-3.11.0.tar.xz">Download Python 3.11.0</a>
</p>
</div>
<div class="download-os-windows" style="display: none;">
<h1 class="call-to-action">Download the latest version for Windows</h1>
<p class="download-buttons">
<a class="button" href="https://www.python.org/ftp/python/3.11.0/python-3.11.0-amd64.exe">Download Python 3.11.0</a>
</p>
</div>
<div class="download-unknown">
<h1 class="call-to-action">Download the latest version of Python</h1>
<p class="download-buttons">
<a class="button" href="/downloads/release/python-3110/">Download Python 3.11.0</a>
</p>
</div> And then use JS to hide/show the relevant ones. $.get("/box/supernav-python-downloads/",
function(data){
$('li#downloads .subnav').append( data );
/* Toggle Download buttons by OS detection */
if (navigator.appVersion.indexOf("Win")!=-1) {
$('.download-unknown').hide();
$('.download-os-windows').show();
}
if (navigator.appVersion.indexOf("Mac")!=-1) {
$('.download-unknown').hide();
$('.download-os-macos').show();
}
if (navigator.appVersion.indexOf("X11")!=-1) {
$('.download-unknown').hide();
$('.download-os-source').show();
}
if (navigator.appVersion.indexOf("Linux")!=-1) {
$('.download-unknown').hide();
$('.download-os-source').show();
}
}, "html"); So it seems it doesn't check for 32bit systems and would give the 64bit version either way. I think 32bit should be fairly uncommon now so it shouldn't be a massive problem as long as it's mentioned somewhere. |
Thanks for finding that OS check code. Weird they don't check for 32-bit since it is possible. But oh well, I mention to go the the releases page on 32-bit. |
Will merge into my branch now since we'll need 2 approvals on my PR before merging to main anyway, thanks again! |
As discussed in #dev-contrib I wanted to write a guide for the site on how to add Python to Path since it comes up so often in help channels. wookie already wrote a lot of good stuff on that and other Windows matters (see #773) which here I expanded on and added lots of instructional screenshots.
The changes I've made are as follows (they're all on the
add-windows-guide
branch):Big changes:
Smaller changes:
(This is my first time contributing and first PR here 😅 so I really apologize if I'm doing something wrong like having too many changes at once that are tricky to review.)