I'm testing 32bit Pypy 6.0.0(python 3.5.3) in Windows 10.
My old code works pretty well in normal CPython (v3.6.3 64bit), but it shows an error message (Errno 997) when it runs for pypy.
Errors are raised about calling winapi for making Pipe. I guess it is a problem of pypy… but I am not sure.
Anyone who has tried multiprocessing module in pypy and had success, please answer.
Opened a bug here:
https://bitbucket.org/pypy/pypy/issues/2850/error-when-creating-a-pool-python#comment-46334580
It works with PyPy for Python 2.
For Admin: Sorry but I can't comment because I don't have 50 reputation points
Related
I'm fairly experienced in Python, but a total noob on OSX. I've been using it for a couple of years on windoze then linux OK. Unfortunately I now need to port stuff to an iMac with El Capitain 10.11.3.
I checked out the guides before I tried to install it, in particular the issues around the versions of the tk/tcl libraries. I therefore visited ActiveState, and installed the latest version, then python 3.5.1. This is something that I have never done with 'doze or 'nux.
Simple text programs run OK, whether from IDLE/run, python3 progname, or shebang. The following simple tki program also runs OK, also from those three launch methods.
#! /Library/Frameworks/Python.framework/Versions/3.5/bin/python3
import tkinter as tki
def cmd():
print('doing command')
exit()
root = tki.Tk()
but = tki.Button(root, text='hello', command=cmd)
but.grid()
root.mainloop()
But when I try to run a sizeable tki based app, it complains that it has found classes TKApplication, TKMenu, TKContentView and TKWindow in both /Library/Frameworks/... which is where python is installed, and /System/Library/Frameworks/... which is presumably where the tcl/tk install from ActiveState went. It then exits with a segfault 11. The app is basically low level tk stuff, just a lot of it. Both locations include /Versions/8.5/ in the name.
I suspect the key is that it says which one of each of those TKxx will be used is undefined. Perhaps it's picking a mix of those, and so when they go to talk to each other, they are not in predictable locations.
Is this what's happening? Why does the simple tk app work but not the complex one, is it the size, or the need to use several classes from different libraries?
As there seems to be a set of tk libraries in the python tree, I'm inclined to remove the ActiveState ones. Is this sensible? How do I do this (Mac noob alert)!
I don't seem to be able to find a definitive 'how to' install python 3 on OSX. Not found too much specifically for 10.11.3, could this OSX version need a different procedure?
Current Python Version 2.7.10 - I have tried a straight download from python.org and the Anaconda distribution.
Previous Python Version was 2.7.x (don't remember) - I know it was an Enthought Canopy distribution.
I just 'upgraded' windows from 7 to 10pro. I reinstalled everything on my computer for a fresh start. I installed the most recent version of Python 2.7.10. I am now running a script that I was running just yesterday on my Windows 7 OS, and it is running incomprehensibly slow now, and I have no idea why. It is a script that is based on the code from a tutorial found here:
http://pythonprogramming.net/sentiment-analysis-module-nltk-tutorial/
It has a lot of data that is loaded, and it wasn't running super fast before, but now it takes so long, it looks like it's frozen. Any thoughts? I thought that it had something to do with packages that I had installed on my previous Python environment, like a C-compiler or something. The output is nothing, because it just hangs for a long time and slowly moves through the script. It isn't broken, there isn't a loop it's stuck in. If I wait long enough, it will start showing me the correct output. When I hit 'Ctrl-C' this is what I get.
python -mcProfile MAIN_Tutorial_2.py
forrtl: error (200): program aborting due to control-C event
Image PC Routine Line Source
KERNELBASE.dll 00007FFB485B5674 Unknown Unknown Unknown
KERNEL32.DLL 00007FFB49412D92 Unknown Unknown Unknown
ntdll.dll 00007FFB4B819F64 Unknown Unknown Unknown
Don't think that helps, but just in case.
I've been struggling for a while with similar topic - long start up time of python scripts.
This is what I've found on python documentation site:
Why does Python sometimes take so long to start?
The problem may be caused by a misconfiguration of virus checking software on the problem machine. Some virus scanners have been known to introduce startup overhead of two orders of magnitude when the scanner is configured to monitor all reads from the filesystem. Try checking the configuration of virus scanning software on your systems to ensure that they are indeed configured identically. McAfee, when configured to scan all file system read activity, is a particular offender.
Unfortunately, I don't have a quick way to test whether disabling file system protection will help, so I hope it will solve your problem and will be glad to hear from you.
I installed the gdal module for python a week ago, via the GDAL Complete 1.11 Framework Package. I wrote a program which relied heavily on gdal and osgeo and ogr to work with shapefiles (.shp) and rasters (.TIF). Today, without changing my code at all, when I ran it in the terminal as I usually do, I got back:
Bus error: 10
Since I hadn't changed anything with my code, I looked to see whether the problem was with one of my imports. When I commented everything out besides
from osgeo import ogr, gdal
I got the same error, similarly for when I just ran python in the terminal and tried
import gdal
I read that Bus Errors are caused by non-existent memory addresses, so I thought the module might somehow not be there anymore, so I listed my modules using
["%s==%s" % (i.key, i.version) for i in pip.get_installed_distributions()]
and gdal was listed in there. Anyway, that wasn't necessarily the best thought since python throws an ImportError for modules it doesn't recognize. Other imports, like numpy, math, time, and datetime all work for me. Since bus errors are a sort of hardware fault with the memory, I tried a soft and then a hard reboot, still getting the same bus error. In fact, since I restarted my computer, it's been dreadfully slow. So my first question is why the Bus Error occurred and how to fix it, and second, I'm wondering how to get my computer back up to speed.
Last night, I dropped my computer in its case, but gdal (and seemingly everything else) was working fine this morning, until this error came about.
I appreciate your time and input.
I'm trying to get the LibSSH2 ssh2_exec example to work under windows but it crashes on the following line:
while ((rc = libssh2_session_handshake(session, sock)) == LIBSSH2_ERROR_EAGAIN);
The call is made ~1200 times before it crashes. What would be going wrong here?
I used this guide to compile LibSSH2 if that makes a difference.
A bit more digging suggests the crash occurs in the libssh2_sha1 function in the EVP_DigestFinal(&ctx, out, NULL); call.
I just tried a newer version of OpenSSH, built by a different source and that solved the issue.
I have an issue on our Windows 2003 x64 Build Server when invoking shell commands from a script. Each call causes a "memory leak" in the page file so it grows quite rapidly until it reaches the maximum and the machine stops working.
I can reproduce the problem very nicely by running a perl script like
for ($count=1; $count<5000; $count++)
{
system "echo huhu";
}
It is independent of the scripting language as the same happens with lua:
for i=1,5000 do
os.execute("echo huhu")
end
I found somebody describing the same issue with php at
http://www.issociate.de/board/post/454835/Memory_leak_occurs_when_exec%28%29_function_is_used_on_Windows_platform.html
His solution: Firewall/Virus Scanner does not apply, neither are running on the machine.
We can also reproduce the issue on other Developer Machines running XP 64, but not on XP 32 Bit.
I also found an article describing a leak situation in page file at
http://www.programfragment.com/
The guilty guy for the allocation is C:\WINDOWS\System32\svchost.exe -k netsvcs which runs all the basic Windows services.
Does anybody know the issue and how to resolve it ?
We found the issue by reinstalling a similar step by step. It seemed to be caused by a bug in a hardlock driver. After installing a newer version of the driver the issue disappeared.