top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How to build windows extensions for python 3.5

+1 vote
378 views

I understand there have been changes to the way that extensions are supposed to be built for windows. Is there any user documentation regarding these changes?

Last time I looked the appropriate Visual Studio hadn't been release so I guess I will need to use my MSDN skills (or incantations) to first get that installed.

posted Sep 14, 2015 by Satish Mishra

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

Visual Studio 2015 has been released for about 7 weeks now. Community Edition (the free one) should be plenty to compile Python extensions in either 32 or 64 bit. In general, if you build your extensions using distutils, it should still 'just work', but some truly exotic situations may be different (or broken, in which case please file bugs!). Unfortunately I don't have any kind of documentation quick to hand for this.

answer Sep 14, 2015 by Arjuna
Similar Questions
+3 votes

I'm new to Python. I downloaded the 64-bit build of Python 2.7.10 from www.python.org/downloads/release/python-2710. I run Windows 7 Pro on a Dell PC.

I find that the installation package creates a folder called "Python 2.7" in my Start menu, with both a command prompt and IDLE GUI options.

I hold my scripts in another directory that is parallel to but not under the one where Python 2.7 resides, so I set the Environment Variable PYTHONPATH to include the directory where my scripts reside. Unfortunately, I am unable to reach them in either the IDLE GUI or the "Python command line" in that folder in my start menu. The only way I have managed to run Python scripts is to open an ordinary command prompt from Accessories, navigate to the directory with the scripts, and run python from the command prompt in that directory.

Can anyone let me know what I'm not doing that I should be doing to run Python and my scripts from the parallel directory under the GUI or the command line from the start menu folder ?

0 votes

I have searched for lots of tutorials and documentation on the web but, didnt find a decent one to develop extensions for Python 3 using a custom compiler (mingw32, nvcc). Please help me. PS: Dont point me to Python Documentation. It is not good for beginners. It doesnt elaborate about calls and implementation.

0 votes

I want to install sip on windows bit using python 32 bit.
I download sip from this link https://www.riverbankcomputing.com and I try to install from cmd line :

C:WINDOWSsystem32>cd C:UsersusernameDesktopsip-4.17

C:UsersusernameDesktopsip-4.17>python configure.py install
and take that error any idea ?

This is SIP 4.17 for Python 2.7.11 on win32.
Error: Unsupported macro name specified. Use the --show-build-macros flag to see a list of supported macros.

+2 votes

I want to install Python on a PC with the 64 bit version of Windows 7. I want Python to be able to use as much as possible of the RAM.

When I install the 64 bit version of Python I find that sys.maxint == 2**31 - 1 Whereas the Pythpon installed on my 64 bit linux system returns sys.maxint == 2**63 - 1.

It looks to me as though 32 and 64 bit versions of Python on 64 bit Windows are both really 32 bit Python, differing only in how they interact with Windows. So I wouldnt expect 64 bit Python running on 64 bit Windows to allow the large data struictures I could have with 64 bit Python running on 64 bit linux.

Is that true?I have spent a couple of hours searching for a definitive description of the difference between the 32 and 64 bit versions of Python for Windows and haven't found anything.

+2 votes

Manual says "-c Execute the Python code in command. command can be one or more statements separated by newlines, with significant leading whitespace as in normal module code."

In Windows Command Prompt I get:

C:ProgramsPython33>python -c "a=1nprint(a)"
 File "", line 1
 a=1nprint(a)
 ^
SyntaxError: unexpected character after line continuation character
(Same if I remove quotes.)

How do I get this to work?

...