Python Forum
Thread Rating:
  • 1 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
pip and setup script
#1
Im not sure of when pip was introduced, or more importantly when it was considered "the" method of installation. I know it was included in python 2.7.9+ and 3.4+. It seems crazy that it is already considered "the" method of installation already. 

I am also not sure why i am so anti-pip. I guess the main reason is it seems to hide too much of what is going on behind the scenes. And like knowing what is going on. So much so that i sometimes manually copy libs to the proper directory in python when i had trouble installing a wheel with pip on windows.

Quote:If you are really having trouble with pip. You can just simply copy the pygame files over to your python installation. If you downloaded the incorrect wheel this will also fail. Since windows cannot extract a wheel file all you need to do is change the wheel extension to zip instead. Extract it. It will extract 3 directories, pygame, pygame***.data, and pygame***.dist-info. The stars are where the version and bit type are. Go into pygame***.data directory and copy headers directory over to your python's include directory. So in the end, you should have C:\PythonXX\include\headers. Now rename that headers directory to "pygame". (C: \PythonXX\include\pygame) Now go back to you extracted directories from the wheel. Copy both the pygame and pygame***.dist-info directories over to pythons's Lib/site-packages directory. So these two directories will be placed into C:\PythonXX\Lib\site-packages\. (C:\PythonXX\Lib\site-packages\pygame and C:\PythonXX\Lib\site-packages\pygame***.dist-info) Now attempt to import pygame and see if was installed correctly.
Note this directory is based on the fact that python was installed at the location C:\PythonXX. Python3.4 defaults to this location whereas python3.5 and greater default to other location. You can find this location by opening a python interpreter and executing the line

Most of the time i am not in windows. And most of the time linux repos has a repo of the required library. But sometimes the version does not match or the repo does not exist. I still prefer downloading the wanted version and building via setup script.

I mean one part i dont understand is we tell people to use command prompt/terminal to know what is going on under the hood VS using an IDE...but yet we expect them to not know when installing...and just take the easy road.
Recommended Tutorials:
Reply
#2
I can see advocating for new users to take the hard path, but when you're an experienced coder and you want dependencies managed so that you can get done what you need the package for (since it's supposed to solve a problem for you, not create one) pip is great.

I'm actually doing stuff at work around pulling an internal repo into another internal repo, and I'm learning a lot of low-level stuff that I was happy to ignore at a bigger company where the problem was already solved :)
Reply
#3
https://www.pypa.io/en/latest/history/ Wrote:2008: pip was introduced by Ian Bicking as an alternative to easy_install (the installer included with setuptools)

The release notes have dates included starting from from version 1.0 (2011-04-04) at which point python 3 support was added.
Reply
#4
pip and wheel has been without a dough the right choice for moving forward for a good packaging ecosystem.
For many year the Python packaging ecosystem was in a rather confusing state.

So now that all almost agree that pip is the choice for Python in the future,
it will only get better.

It can learn something from conda(Anaconda installer) which is better.
Look like this when run conda install scikit-learn.
It will find all other package that needed and install them.
Output:
The following packages will be downloaded:   package                    |            build    ---------------------------|-----------------    conda-3.10.0               |           py27_0         207 KB    conda-env-2.1.3            |           py27_0          54 KB    nose-1.3.4                 |           py27_1         233 KB    numpy-1.9.2                |           py27_0        23.2 MB    requests-2.6.0             |           py27_0         590 KB    scikit-learn-0.16.0        |       np19py27_0         3.5 MB    scipy-0.15.1               |       np19py27_0        71.3 MB    ------------------------------------------------------------                                           Total:        99.0 MB
Reply
#5
I have to argue against wheels. They completely fubared the installation on my windows machine, to the point where I switched to linux so I could code in Python.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply
#6
(Oct-24-2016, 09:13 PM)ichabod801 Wrote: I have to argue against wheels. They completely fubared the installation on my windows machine, to the point where I switched to linux so I could code in Python.
Then we don't agree i most have around 100 wheel installation on Windows an almost all has bee fine.
Reply
#7
(Oct-24-2016, 09:17 PM)snippsat Wrote: Then we don't agree i most have around 100 wheel installation on Windows an almost all has bee fine.
I had a lot of problems with pygame wheels and pip on windows. This was around python3.2-3.3 time frame. But since then i have a lot of resentment towards pip.

Also coming from a linux background....arch linux...gentoo...etc. i want to do stuff manually and not have things done under the hood. A simple update can break your arch install if you dont take care. The mindset is automation can break things. Kinda guess the same thing here...with the auto-ban...better to have 10 spammers get through than one real user not get through. I had pip break so many times, and setup never fail.
Recommended Tutorials:
Reply
#8
Quote:I had a lot of problems with pygame wheels and pip on windows. This was around python3.2-3.3 time frame. But since then i have a lot of resentment towards pip.
Maybe i have been lucky but both wheel for Gohlke and also msi from Bitbucket has work for me with Pygame.

Quote:I had pip break so many times, and setup never fail.
They do kind of the same ting.
pip has uninstall function.
If there are many package needed i use sometime virtualenv to not messing with installed packages in OS Python version.
Should of course use virtualenv more,but has may small project stuff so then i don't bored with it.
Reply
#9
We had pip (peripheral interchange program) available for DEC pdp-8's. (late 70's early 80's) But that's another story.
Reply
#10
(Oct-24-2016, 09:50 PM)Larz60+ Wrote: We had pip (peripheral interchange program) available for DEC pdp-8's. (late 70's early 80's) But that's another story.

i loved that version.   now we need to develop one in python.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020