# On OS X, I seem to have pip at /usr/local/bin/pip? # tested and works on Windows, but will likely need tweaking for other OS's. ![]() # Generate the path to where pip is or will be installed. This returns the path to the pip executable, installing it if necessary. Pip is the standard package manager for Python. Log("Installing pip, the standard Python Package Manager, first") This code should pretty cleanly do just that. It's included in the default installation, but older versions may need toĭownload and install it. ![]() and I think it'll work in version 3.0+ but I've never tried it.Īlso, as I note in the comments of my getPip function, I don't think that particular function will work under OS X. ![]() it would probably work in older versions if I didn't want to handle print as a function. It actually checks whether the module is installed rather than relying on ImportError (it just looks cleaner, in my opinion, to handle this with an if rather than a try/ except). Here's the solution I put together which I call pyInstall.py.
0 Comments
Leave a Reply. |