Re: Beginning question #compilersetup, #windows7, #vs2010
Thanks to both of you for the info. It'll take me a while to dig through it and make sense of it all. Today I was able to install visual studio community 2015 for use with python 3.5. Then I tried using pip to install python-pptx and xlwings. I believe on xlwings I got the following error (in part) didn't know if the whole thing would be useful. Thinking about this I'm not sure if this a compiler issue or a situation where lxml isn't supported in 3.5 yet. Might someone be able to shed some insight? Thanks, Jeff ... C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\vandeje1\AppDat a\Local\Temp\1\pip-build-ih2xe4gw\lxml\src\lxml\includes -IC:\Users\vandeje1\AppData\Local\Programs\Python\Python35-32\include -IC:\ Users\vandeje1\AppData\Local\Programs\Python\Python35-32\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.101 50.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\shared " "-IC:\Program Files (x86)\Windows Kits\8.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\winrt" /Tcsrc\lxml\lxml. etree.c /Fobuild\temp.win32-3.5\Release\src\lxml\lxml.etree.obj -w cl : Command line warning D9025 : overriding '/W3' with '/w' lxml.etree.c C:\Users\vandeje1\AppData\Local\Temp\1\pip-build-ih2xe4gw\lxml\src\lxml\includes\etree_defs.h(14): fatal error C1083: Cannot ope n include file: 'libxml/xmlversion.h': No such file or directory C:\Users\vandeje1\AppData\Local\Programs\Python\Python35-32\lib\distutils\dist.py:261: UserWarning: Unknown distribution option: 'bugtrack_url' warnings.warn(msg) error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\cl.exe' failed with exit status 2 Command "C:\Users\vandeje1\AppData\Local\Programs\Python\Python35-32\python.exe -c "import setuptools, tokenize;__file__='C:\\Users\ \vandeje1\\AppData\\Local\\Temp\\1\\pip-build-ih2xe4gw\\lxml\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read( ).replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\vandeje1\AppData\Local\Temp\1\pip-yz3bhof7-record\install-rec ord.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\vandeje1\AppData\Local\Temp\1\pip-build- ih2xe4gw\lxml On Sun, Sep 27, 2015 at 2:10 PM, eryksun wrote: > On Sat, Sep 26, 2015 at 4:40 PM, Jeff VanderDoes > wrote: > > > > I'm fairly new to Python and was excited to start playing with it until I > > ran into need to compile some extensions under windows 7 64 bit. I've > done > > some searching but after more hours than I care to count being > unsuccessful > > setting up MS visual studio (2015, 2012, and 2010) with service packs and > > SDKs I can tell I'm spinning my wheels and going nowhere fast. > > For 3.5 you should be able to just install Visual Studio 2015 > Community Edition. This is the current release of Visual Studio, so if > you encounter problems, at least finding help won't be one of them. > > 2.7 is built with VS 2008, which is no longer supported. But, thanks > to Steve Dower, Microsoft distributes an unsupported version for > building Python 2.7 extension modules [1]. > > 3.4 is built with the fairly old VS 2010, for which the free Express > edition is no longer available. But you should be able to configure a > command-line build environment. Install the Windows SDK 7.1 [2] and > the VC++ 2010 SP1 Compiler Update [3]. Then run the Windows SDK 7.1 > Command Prompt [4], and enter > > SetEnv /Release /x64 > > If you plan to do native debugging outside of Visual Studio, install > the Debugging Tools for Windows [5] when installing the SDK. You can > download public debug symbols for operating system components using > Microsoft's symbol server. To do this, create a "C:\Symbols" > directory, and set the following environment variable: > > _NT_SYMBOL_PATH=symsrv*symsrv.dll*C:\Symbols* > http://msdl.microsoft.com/download/symbols > > Additionally you'll need Python's debug symbols, such as for 64-bit > 3.4.3 [6]. I typically copy a PDB next to its related DLL/EXE. This is > what 3.5's installer does when you select the option to install debug > symbols (nice job, Steve!). You can also unzip the PDBs to a directory > that's in _NT_SYMBOL_PATH, or update the symbol path dynamically using > .sympath+ and .reload [7]. > > [1]: https://www.microsoft.com/en-us/download/details.aspx?id=44266 > [2]: https://www.microsoft.com/en-us/download/details.aspx?id=8279 > [3]: https://www.microsoft.com/en-us/download/details.aspx?id=4422 > [4]: https://msdn.microsoft.com/en-us/library/ff660764 > [5]: https://msdn.microsoft.com/en-us/library/ff551063 > [6]: https://www.python.org/ftp/python/3.4.3/python-
Re: python.org bugs
If you just send them to webmas...@python.org they will get dealt with (probably by me). Laura -- https://mail.python.org/mailman/listinfo/python-list
RE: Re: Re: Installing pywin32.
Hi I will give the team viewer ID of my machine so can you please install the pywin32 module to me. Thanks Ashwath - Original Message - Subject: Re: Re: Installing pywin32. From: "Zachary Ware" Date: 9/24/15 9:29 pm To: "python-list@python.org" Cc: ashw...@nanoheal.com Two notes about local etiquette: 1) Please reply to the list rather than to me directly. I only include your address in the cc: in case you aren't subscribed (which you should be, unless you're reading via the newsgroup), since I don't recognize you as a regular poster. I'll soon stop doing so. 2) Please do not top-post. Rather, add your reply directly beneath the particular line you're replying to, as I do below. On Thu, Sep 24, 2015 at 10:39 AM, wrote: > Hi > > I am pleased with your reply thanks for it. > System environment is like this > > OS - windows 7 64 bit machine. > Python - pywin3.5 Where did you get it from? I don't know of any product named "pywin3.5". There's 'pywin32' (as in 'Python interface to Win32', available from http://pywin32.sourceforge.net/) and Python 3.5 (as in 'CPython 3.5.0 for Windows', available from https://www.python.org/). > even pip is not installed if I run pip its shows like pip command not found. Installing pip is an option in the Python 3.5 (and 3.4, and 2.7.10) installer. If you didn't select it, it won't be installed. You can try running 'python -m ensurepip' to install pip after the main installation of Python. > From which path I have to run this python -m pip install pypiwin32 Doesn't matter; as long as the 'python' command can be found and that Python has pip installed, this command will install pywin32 into the global site-packages directory of that Python. Also, I should have directed you to `py -m pip install pypiwin32` to make use of the Python Launcher, which is always on PATH (if it was installed, it's also an option in the installer). -- Zach -- https://mail.python.org/mailman/listinfo/python-list
Re: Beginning question #compilersetup, #windows7, #vs2010
3.5 lxml over here: https://pypi.python.org/pypi/lxml/3.5.0b1 Laura -- https://mail.python.org/mailman/listinfo/python-list
Re: Are There Known Problems With tkinter And VPS Servers?
In a message of Sun, 27 Sep 2015 16:31:59 -0500, Tim Daneliuk writes: >Traceback (most recent call last): > File "/usr/local/TundraWare/bin/twander.py", line 5464, in >UI = twanderUI(UIroot) > File "/usr/local/TundraWare/bin/twander.py", line 2152, in __init__ >self.CmdBtn = Menubutton(self.mBar, text=COMMANDMENU, underline=0, > state=DISABLED) > File "/usr/lib64/python2.6/lib-tk/Tkinter.py", line 2710, in __init__ >Widget.__init__(self, master, 'menubutton', cnf, kw) > File "/usr/lib64/python2.6/lib-tk/Tkinter.py", line 1932, in __init__ >(widgetName, self._w) + extra + self._options(cnf)) >_tkinter.TclError You are getting a naked _tkinter.TclError? When the problem is 'couldn't get to the X server' I am used to getting _tkinter.TclError: no display name and no $DISPLAY environment variable and usually _tkinter is pretty good at giving you more information than TclError. The first thing I would do is to run: python -m test -ugui test_tk test_ttk_guionly test_idle which runs the tests for idle, and see if it finds anything suspicious. Laura -- https://mail.python.org/mailman/listinfo/python-list
Re: python.org bugs
On 28.09.2015 09:30, Laura Creighton wrote: If you just send them to webmas...@python.org they will get dealt with (probably by me). Laura Does that apply to bugs on pypi, too? You still cannot select Python 3.5 as the Python Version for wheels and other files uploaded to pypi over the web interface. I've reported this almost a week ago on the pypi issue tracker on bitbucket, but there is no answer yet. Wolfgang -- https://mail.python.org/mailman/listinfo/python-list
RE: Re: Re: Installing pywin32.
> > I will give the team viewer ID of my machine so can you please install the pywin32 module to me. > Hi , It's best if you install it yourself. It isn't really complicated. :) and you'll learn it in the process as well Steps you could possibly Google - 1) installation of Python 3.5 (which i believe is done) 2) set PYTHONPATH in Windows 3) installation of pip on Windows 4) pip install pypiwin32 That's all there is to it. PS- I'm sure you must have searched for your original problem's solution as well. If not, here's the corresponding stackoverflow thread that can possibly help you as well - http://googleweblight.com/?lite_url=http://stackoverflow.com/questions/25257274/python-3-4-importerror-no-module-named-win32api&ei=rMvmto7N&lc=en-IN&s=1&m=978&ts=1443447404&sig=APONPFlqU_v1gaBPeJ1YluSJxcvkrCVpnQ Thanks Abhiram -- https://mail.python.org/mailman/listinfo/python-list
Re: python.org bugs
In a message of Mon, 28 Sep 2015 10:48:58 +0200, Wolfgang Maier writes: >On 28.09.2015 09:30, Laura Creighton wrote: >> If you just send them to webmas...@python.org they will get dealt with >> (probably by me). >> >> Laura >> > >Does that apply to bugs on pypi, too? > >You still cannot select Python 3.5 as the Python Version for wheels and >other files uploaded to pypi over the web interface. I've reported this >almost a week ago on the pypi issue tracker on bitbucket, but there is >no answer yet. > >Wolfgang No. You subscribe to https://mail.python.org/mailman/listinfo/distutils-sig And then you ask the people there -- which includes all the people who are maintaining PyPi -- what is up. If you could volunteer to help fix something, that would be great, as they are overworked as it is. Laura -- https://mail.python.org/mailman/listinfo/python-list
Re: Installing pywin32.
On 28/09/2015 14:42, Abhiram R wrote: > > I will give the team viewer ID of my machine so can you please install the pywin32 module to me. > Hi , It's best if you install it yourself. It isn't really complicated. :) and you'll learn it in the process as well Steps you could possibly Google - 1) installation of Python 3.5 (which i believe is done) 2) set PYTHONPATH in Windows 3) installation of pip on Windows You can skip 3) as pip can now be automatically installed with Python at step 1) 4) pip install pypiwin32 That's all there is to it. PS- I'm sure you must have searched for your original problem's solution as well. If not, here's the corresponding stackoverflow thread that can possibly help you as well - http://googleweblight.com/?lite_url=http://stackoverflow.com/questions/25257274/python-3-4-importerror-no-module-named-win32api&ei=rMvmto7N&lc=en-IN&s=1&m=978&ts=1443447404&sig=APONPFlqU_v1gaBPeJ1YluSJxcvkrCVpnQ Thanks Abhiram -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence -- https://mail.python.org/mailman/listinfo/python-list
Partially invalid sys.path - how can I fix it (not append to it)?
Hi, On a OS/X 101.10.5 (Yosemite) system, the system Python just got updated to 2.7.10 but it sys.path is partially invalid. How can I fix that? I don't want to add something in PYTHONPATH. I know I can create a softlink at the invalid location to where the real files are located.I just want to understand why that sys.path[6] (see below) is invalid and fix it to point to the valid directory. Details follow: I am running Python 2.7.10: [~]$ python Python 2.7.10 (default, Jul 14 2015, 19:46:27) [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> First, see when I get the sys.path before site.py is imported:: [~]$ python -S -c "import sys, pprint; print sys.prefix; pprint.pprint(sys.path)" /usr ['', '/usr/lib/python27.zip', '/usr/lib/python2.7/', '/usr/lib/python2.7/plat-darwin', '/usr/lib/python2.7/plat-mac', '/usr/lib/python2.7/plat-mac/lib-scriptpackages', '/usr/lib/python2.7/../../Extras/lib/python', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload'] [~]$ python -c "import sys, pprint; print sys.prefix; pprint.pprint(sys.path)" /usr ['', '/usr/lib/python27.zip', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-darwin', '/usr/lib/python2.7/plat-mac', '/usr/lib/python2.7/plat-mac/lib-scriptpackages', '/usr/Extras/lib/python', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/Library/Python/2.7/site-packages'] [~]$ Notice sys.path[6]. It is '/usr/lib/python2.7/../../Extras/lib/python', which when going through site gets normalized to '/usr/Extras/lib/python'. That directory is invalid on my system. It should either be: - The real location: /System/Library/Frameworks/Python.frameworks/Versions/2.7/Extras/lib/python or - the corresponding softlink to that: /usr/lib/python2.7/Extras/lib/python Also note that the sys.prefix is "/usr" I think it should be "/usr/lib/python2.7" or "/System/Library/Frameworks/Python.framework/Versions/2.7" Other Python installed on that system include Python 3.5 (installed via the Python 3.5 DMG installer) and Python 2.7.9 installed with homebrew. For these versions of Python I see something that matches the content of the system storage: - Python 3.5: sys.prefix = '/Library/Frameworks/Python.framework/Versions/3.5' - Python 2.7.9: sys.prefix = '/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7' Does anyone know how to fix the path generated in sys.path without adding the real directory path in PYTHONPATH? Thanks! -- https://mail.python.org/mailman/listinfo/python-list
Re: Installing pywin32.
On Mon, Sep 28, 2015 at 10:15 AM, Mark Lawrence wrote: > On 28/09/2015 14:42, Abhiram R wrote: >> On Mon, Sep 28, 2015 at 1:56 AM, wrote: >>> I will give the team viewer ID of my machine so can you please >>> install the pywin32 module to me. Not going to happen, sorry. >> It's best if you install it yourself. It isn't really complicated. :) Seconded. >> and you'll learn it in the process as well >> Steps you could possibly Google - >> 1) installation of Python 3.5 (which i believe is done) >> 2) set PYTHONPATH in Windows >> 3) installation of pip on Windows > > You can skip 3) as pip can now be automatically installed with Python at > step 1) Agreed, as I mentioned in a previous message. I'll also note that step 2) is completely unnecessary in most cases (in fact, I have never set PYTHONPATH on Windows, except where venv did it for me), and in fact is likely to break things if you have more than one version of Python installed. Only set PYTHONPATH once you've determined that it's actually necessary. -- Zach -- https://mail.python.org/mailman/listinfo/python-list
multiprocessing speedup
I am using the multiprocessing with apply_async to do some work. Each task takes a few seconds but I have several thousand tasks. I was wondering if there is a more efficient method and especially when I plan to operate on a large memory arrays (numpy) Here is what I have now import multiprocessing as mp import random def f(x): count=0 for i in range(x): x=random.random() y=random.random() if x*x + y*y<=1: count+=1 return count def main(): resultObj=[] n=1 P=mp.Pool(2) for arg in xrange(n): resultObj.append(P.apply_async(f,(arg,))) P.close() P.join() result = [ i.get() for i in resultObj ] print sum(result)/(n) if __name__=="__main__": main() 1) Does multiprocessing do a fork for each task? 2) If so, I assume thats costly due to setup and teardown. Would this be the case? 3) I plan to pass large arrays to function,f, therefore is there a more efficient method to achieve this? -- --- Get your facts first, then you can distort them as you please.-- -- https://mail.python.org/mailman/listinfo/python-list
Re: Partially invalid sys.path - how can I fix it (not append to it)?
Pierre Rouleau writes: > On a OS/X 101.10.5 (Yosemite) system, the system Python just got updated to > 2.7.10 but it sys.path is partially invalid. How can I fix that? > ... details removed ... You have found out that the execution of "site.py" inserts the invalid entries to "sys.path". I remember that there is a document (it was somewhere on "python.org", when I last read it, but this was years ago) which describes what "site.py" does. In particular, it interprets "*.pth" files it finds via "sys.path" and extends "sys.path" according to the content of those files. I find it quite likely, that one of those "*.pth" files might cause the wrong entry in your "sys.path". > Also note that the sys.prefix is "/usr" > I think it should be "/usr/lib/python2.7" or > "/System/Library/Frameworks/Python.framework/Versions/2.7" I think this is correct: Python expects the directory corresponding to "prefix" to have subdirectories "bin", "lib/python" and "include". -- https://mail.python.org/mailman/listinfo/python-list