Python install on Windows
-
I want to use mkdocs, so I need python. Okay, whatever.
I download Python 3, the latest. Which doesn't claim to be supported by Mkdocs, whoops. Well I'll try it anyway.
Problem one: The installer never removes text from the current step line, writing each line over the others until it's an unreadable mash of lines.
I tried to snap a screenshot but failed before it finished.I got a screenshot when I uninstalled:Problem two: It didn't add itself anywhere that's on my path, or add itself to my path. I have to go manually add it.
Problem three: pip isn't on my path after I add the python install directory. It's not in the same place? Weird. It came with python, right? Says it did...
There's a script that adds the install directory for pip into your path! I run that. It succeeds! Pip still isn't in my path? WTF?
Problem four: My path is now: C:\C:\Users\[me]\AppData\Local\Programs\Python\Launcher;C:\Users\[me]\AppData\Roaming\npm;C:\Users\[me]\AppData\Local\Programs\Python\Python35-32;C:\Users\[me]\AppData\Local\Programs\Python\Python35-32\Scripts;
The actual install location? C:\Users[me]\AppData\Local\Programs\Python\Python35-32\Tools\scripts. IT'S
CASE FUCKING SENSITIVEENTIRELY WRONG, ASSWIPES.Jesus.
So I finally can run the install for mkdocs:
pip install mkdocs
.checking if libyaml is compilable error: [WinError 2] The system cannot find the file specified
So this package manager can't even manage fucking dependencies? Okay, whatever, I'll install it myself:
>pip install libyaml Collecting libyaml Could not find a version that satisfies the requirement libyaml (from versio : ) No matching distribution found for libyaml
Well fuck me.
-
C:\Users[me]</blockquote>
Does your name start with a backslash? If that's not the case that structure sure is weird.
-
Editing error.haha I lied, it's fucking discomagic. The slash is totally there in the raw.
-
😉
I think there was a thread ↖↔⤴↔ way describing the horrors of python on windows
-
You need to escape slashes? Test \test \ test \test
Thats weird.\test \\test \\\test
-
Why does Python 2.7 want to be in C:\Python27, what is this, 1998?
-
-
C:\Users\\[me]>python --version 'python' is not recognized as an internal or external command, operable program or batch file. C:\Users\\[me]>pip --version Fatal error in launcher: Unable to create process using '"C:\Users\\[me]\AppDat a\Local\Programs\Python\Python35-32\python.exe" "C:\Users\\[me]\AppData\Local\ Programs\Python\Python35-32\Scripts\pip.exe" --version'
WHY THE FUCK DID IT LEAVE PIP BEHIND WHEN IT UNINSTALLED.
-
So python 2.7 installed mkdocs just fine.
-
```
C:\Users\[me]>pytIn code tags you only need one. What the hell is the discocode for troll face? :trolleybus: Also did they just break quotes? - of course they did.
-
;)
-
That does not autocomplete/suggest.
-
Yeah… custom emoji autocomplete was broken by the upgrade to beta 11
-
i see...
-
Python3 is something that exists but nobody ever uses. Just use Python 2.7 which is what everything seems to support instead.
-
http://www.randalolson.com/wp-content/uploads/python-survey-2014-versions-regularly-use.png
Pretty bad buy in right there...
-
I personally like the 81% + 43% = 124%
A bar chart like that is a horrible way to describe multiple option survey results.
-
I presume you've noticed that's the way discourse does it 😝
-
Yeah… custom emoji autocomplete was broken by the upgrade to beta 11
Oh, that's what did it. I noticed it broke, but didn't know why.
-
The actual install location? C:\Users[me]\AppData\Local\Programs\Python\Python35-32\Tools\scripts. IT'S CASE FUCKING SENSITIVE, ASSWIPES.
Huh? Windows PATH is not case sensitive.
C:\Users\[me]\AppData\Local\Programs\Python\Python35-32\Scripts
C:\Users\[me]\AppData\Local\Programs\Python\Python35-32\Tools\scriptsYou changed the path. (tweaked backslashes for consistency)
-
So it is. So the script was just fucking wrong about where it lives.
-
I use ActivePython (2.7). It puts itself in the PATH properly :)
-
Python3 is something that exists but nobody ever uses. Just use Python 2.7 which is what everything seems to support instead.
3.4 only has a bit over half the usage of 2.7, but >50% for 3.x combined isn't "nobody." I suspect a lot of the 2.7 users would like to move to 3.x, but they're forced to stay on 2.7 by legacy applications.
-
I use ActivePython (2.7). It puts itself in the PATH properly :)
But does it put itself in
Program Files
(orProgram Files (x86)
) properly, or does it still try to install inC:\Python27
?
-
Python 3.5 is at the beta stage. I supposse it still has loads of bugs that need to be squashed. The latest version is really 3.4. I've been using it for a year without any major issues.
-
C:\Python27
I guess I could safely install 3.x and play with that in that case as that is probably \Python3... (PATH settings aside.)
-
Problem four: My path is now: C:\C:\Users[me]\AppData\Local\Programs\Python\Launcher;C:\Users[me]\AppData\Roaming\npm;C:\Users[me]\AppData\Local\Programs\Python\Python35-32;C:\Users[me]\AppData\Local\Programs\Python\Python35-32\Scripts;
The actual install location? C:\Users[me]\AppData\Local\Programs\Python\Python35-32\Tools\scripts. IT'S CASE FUCKING SENSITIVE, ASSWIPES.
Case sensitive? That can't be right.
Looks to me that they somehow missed the Tools directory in there:
C:\Users\[me]\AppData\Local\Programs\Python\Python35-32\Scripts;
vs
C:\Users\[me]\AppData\Local\Programs\Python\Python35-32\Tools\scripts
-
Python3 is something that exists but nobody ever uses.
This drives me insane because Python 3.x is far superior.
-
@delfinom said:
Python3 is something that exists but nobody ever uses.
This drives me insane because Python 3.x is far superior.
-shrug- it's better but it's no nodejs.
<trolling
-
-
But does it put itself in
Program Files
(orProgram Files (x86)
) properly, or does it still try to install inC:\Python27
?Putting spaces in a filename is an invitation for (badly written) code to break later on in unexpected ways. It shouldn't matter, yet it does anyway.
-
it's better but it's no nodejs.
I'd rather have Python (2 or 3) than the linguistic house of horrors that is JS...
-
linguistic house of horrors that is JS...
HEY! don't let the fustercluck that is DOM scare you away from the beautiful language that is javascript! it's not javascript's fault it has the DOM to deal with on the browser!
-
DOM is bad everywhere. But JS has its own special quirks that sometimes make you wonder WTF is going on. For example (and this is the one that makes me really upset), exactly what
this
is referring to can vary in unexpected ways. I find it hard to comprehend how that could possibly be interpreted as a good thing.
-
Huh? Windows PATH is not case sensitive.
Somewhat off-topic, but I've recently discovered that somehow a Jenkins CI slave process running on Windows has case-sensitive file paths, even though Windows itself doesn't.
Filed Under: Extra features nobody wanted.
-
That's only because you're thinking of
this
from a class-based OO POV, wherethis
is always the instance of a class. Since JS doesn't have classes (OK, ES6 has something called classes, but it's not quite the same),this
has to rely on something else; IIRC, that something else determined by the function scope.
-
For example (and this is the one that makes me really upset), exactly what this is referring to can vary in unexpected ways
it's not that hard to follow if you grok prototypical inheritence. that really trips up people who are used to classical inheritence.
-
But JS has its own special quirks that sometimes make you wonder WTF is going on.
null
vsundefined
, deficient datastructures, sloppy typing, the list could go on...
-
Somewhat off-topic, but I've recently discovered that somehow a Jenkins CI slave process running on Windows has case-sensitive file paths, even though Windows itself doesn't.
So it's doing some internal comparison or something?
-
it's not that hard to follow if you grok prototypical inheritence.
But that's the thing: I do grok prototypical inheritance.
this
should refer to the current context object, which might not be the object on which the method was declared, but which damn well ought to be on that or something derived (possibly indirectly) from it. That it doesn't (or at least doesn't appear to do so) is what really bothers me.I also don't like the way JS in browsers doesn't have any kind of proper modularization scheme, but that could be just a misfeature of browsers.
-
I also don't like the way JS in browsers doesn't have any kind of proper modularization scheme, but that could be just a misfeature of browsers.
That's a browser thing; node does a fairly decent job of modularising
-
this should refer to the current context object
well.
the rules for
this
are fairly straight forward- If invoked via
call()
orapply()
this
is the value of the appropriate parameter - If invoked directly as part of a dot notation function (
something.fn()
)this
is theobject before the teminating dot (something
in this example) - else
this
is the outermost binding object for the code segment (window
in browsers,module
in nodejs)
so
something.fn.call(otherthing);
will have
this
set tootherthing
something.fn();
will have
this
set tosomething
var x = something.fn; x();
will have
this
set towindow
- If invoked via
-
the beautiful language that is
javascriptScheme!FTFY
Everything good about Javascript it has in common with Scheme.
Everything bad about Javascript it does not have in common with Scheme.
Should have just made it Scheme.
-
Hmm… seems I didn't have it quite right… TIL
-
also if you want to force the value of this regardless of what anything else thinks there's always
function.bind()
-
else this is the outermost binding object for the code segment (window in browsers, module in nodejs)
This rule is the . The other two are reasonably fine, though I think I prefer Python's explicitself
parameters for languages that you can attach & detach functions from objects at will.(ES5 strict mode gets it right, because it will set
this
toundefined
in this context. Or something like that; too lazy to look it up.)
-
What else would you set it to for functions that aren't attached to an object?
-
What else would you set it to for functions that aren't attached to an object?
That's the point; there already is a JavaScript value for "no object". In fact there are two, and non-strict JS went with neither of them!I mean, I can sorta kinda vaguely see how you can get there, because if you say
function foo() { ... }
then the resulting function can be accessed fromwindow.foo
, sothis
beingwindow
makes a small bit of warped sense. Butthis
is set towindow
even for things that isn't true for ((function() { return this; })()
evaluates towindow
), and that takes it well into territory IMO.
-
Somewhat off-topic, but I've recently discovered that somehow a Jenkins CI slave process running on Windows has case-sensitive file paths, even though Windows itself doesn't.
I don't even want to know... (We use Jenkins also. But I'm not the build master!!!)
-
There's also the "minor" issue that python creates files in its directory (pyc). Needing UAC to run python would be an even larger