How to install Python package from source on Windows

Deborah Swanson python at deborahswanson.net
Wed May 24 20:18:03 EDT 2017


Paul Moore wrote, on Wednesday, May 24, 2017 5:53 AM
> On Monday, 15 May 2017 22:42:22 UTC+1, Deborah Swanson  wrote:
> > MRAB wrote, on Monday, May 15, 2017 12:44 PM
> > > 
> > > On 2017-05-15 13:52, eryk sun wrote:
> > > > On Mon, May 15, 2017 at 6:37 AM, Deborah Swanson
> > > > <python at deborahswanson.net> wrote:
> > > >>
> > > >> Where did you find 
> recordclass-0.4.3-cp34-cp34m-win32.whl?  There
> > > >> weren't any win32 builds on 
> > > https://pypi.python.org/pypi/recordclass.
> > > > 
> > > > It's in the
> > > middle of the file list:
> > > > 
> > > >     recordclass-0.4.3-cp34-cp34m-win32.whl (md5) Python 
> Wheel cp34
> > > > 2017-04-17 17KB
> > > > 
> > > > Maybe you're looking at a cached page in your browser? But that
> > > > doesn't explain why pip doesn't see it.
> > > > 
> > > >> Maybe I can find an earlier 3 build that won't demand 
> Visual C++.
> > > > 
> > > > The wheel doesn't need a compiler. It has an ABI tag because it
> > > > already includes the compiled extension module.
> > > > 
> > > I used pip to install into Python 3.4 (32-bit) from PyPI. 
> It fetched
> > > "recordclass-0.4.3.tar.gz" and compiled it instead of fetching 
> > > "recordclass-0.4.3-cp34-cp34m-win32.whl".
> > > 
> > > Why?
> > 
> > Excellent question, though I have no clue what the answer is.
> > 
> > > Come to think of it, what's that "cp34m" in the name? I don't have
> > that
> > > in the regex module's wheels, I have "none" instead.
> > 
> > Another excellent question. "cp" in "cp34m" might stand for 
> C++, but 
> > if so, what's the rest of it mean? Or maybe "CPython 3.4" plus "m" 
> > (whatever "m" stands for)?
> > 
> > What's "the regex module's wheels"? I certainly don't know, 
> though I 
> > know vague outines of what "regex" and "wheel" are.
> >  
> > > Rename "recordclass-0.4.3-cp34-cp34m-win32.whl" to
> > > "recordclass-0.4.3-cp34-name-win32.whl".
> > > 
> > > With the new name, it installs and seems to work!
> > 
> > Most excellent and I will try it.
> 
> I don't know whether you solved your issue, but in case you 
> didn't, the problem is that the "cp34m" part of the name 
> indicates the "ABI" used in the extension (roughly, how the C 
> part of the code links to the Python interpreter). Older 
> versions of pip (such as the one shipped with Python 3.4, 
> which is itself a bit old now) didn't recognise that tag, and 
> so won't install that wheel.
> 
> The best way to fix this is to upgrade the copy of pip you have, using
> 
>    python -m pip install --upgrade pip
> 
> When you do that, you'll get a version of pip that recognises 
> the "cp34m" tag, and "pip install recordclass" should then just work.
> 
> Hope this helps,
> Paul

Ah, but. When I tried to upgrade pip it failed because it could neither
find nor install Visual Studio 2015.  Unfortunately it had uninstalled
pip before it found that problem.

So now I'm pipless. Read the thread if you want to know why I don't have
and can't (and won't) install Visual Studio 2015.

Looks like I'll have to reinstall Anaconda3 if I need the old pip before
I get resituated in Linux, but that's a major pain in inself because it
won't reinstall in the same directory, especially since I could also end
up having to reinstall Pycharm (and risk losing all my code histories)
too. Bleah.  Hope I don't need pip in the immediate future, old pip or
new.

Deborah




More information about the Python-list mailing list