windows 8 incompatibility? - python

I cannot get my code to run on my win8 laptop. I am working with a combination of:
Stackless Python 2.7.2
Qt 4.8.4
PySide 1.1.2
Eclipse/Pydev and WingIDE
This works well on my Win7 PC, but now i have bought a demo laptop with windows 8. As far as I know all is installed the same way as on my PC.
When i run my program (same code) now, i get a warning:
"Qt: Untested Windows version 6.2 detected!"
Ok, so that could be the source of my problem, but also i get errors:
some times the program just quits after the warning above (i think only eclipse)
sometimes i get an APPCRASH (i think only eclipse)
sometimes i get the exception: TypeError: Error when calling the metaclass bases: mro() returned base with unsuitable layout ('')
sometimes i get the exception: TypeError: Error when calling the metaclass bases: multiple bases have instance lay-out conflict
Especially the last two don't seem like a windows problem, but i don't see any other difference with my PC win7 install. Does anyone have any idea what is going on or how to fix this? Did i miss a step in the installation or is it some incompatibility maybe?
Cheers, Lars
Does anyone have some input on this?

I had the same problem with Pyside 1.1.2 and Qt 4.8.4. The solution for me was to set the compatibility mode of the Python executable to Windows 7 via right click on the executable -> Properties -> Compatiblity -> Run this program in compatibility mode for: Windows 7
Hope that helps.

try using Hyper-V however Hyper-V is not installed by default in Windows 8. You need to go "Turn Windows features on or off."

Related

Qt library incompatibility with Pycharm new installation

I installed a new version of Pycharm (2019.3.1) and running my old codes on them. But I am getting error for qt library incompatibility. I tried to update the qt package from conda (as I am using conda distribution for the python).
I noticed the following behavior -
The error comes only for the plotting (which makes sense as qt is for graphical purposes).
There is no problem in code compilation and running, as it shows the result for the 1 epoch (can be seen in the below image.
My installed qt version is 5.9 (you can see in the second image)
The same code runs perfectly in spider but throwing the below error in pycharm. Please help me to fix this problem. thanks
From error message you posted it is clear that you have library incompatibility problem.
Somehow it appears you have 2 Qt versions installed - 5.9.7 and 5.12.4 and these versions have conflict with each other.
You need to verify Run configuration in PyCharm to see which python environment it uses. And then check why 2 Qt are available in your system.
Anothe option that comes to my mind - your PyQt5 or PySide2 (whatever you use) library is built with Qt 5.12.4 while your system have 5.9.7 and it brings a conflict.

Python: 'Path for project must have only one segment'

I used to develop openerp on windows environment, currently I work on linux.
I have successfully installed jdk, postgres server, openerp, python and identifying the python interpreter on eclipse.
In eclipse when I add new_configurations for the python run the following exception is shown
Path for project must have only one segment.
As shown in the following image:-
Any eclipse version I downloaded it I got the same exception. So I’d be so thankful to you if you hint me about the cause of this problem and how can I overcome it.
I use:-
- Ubuntu 12.04.
- Python 2.7.
- java 1.7
- postgresql-9.3
- eclipse Luna M6 Release (4.4.0M6)
Thanks in advance.
This is because you have to specify a project name, and as you can see on your image, you forgot to do that.
The error is not that self describing but if you fill out that field the error should be resolved.
A similar question was asked here, it's tagged Android but it's not really a language specific error.
I'm seeing exactly the same behaviour, but only since applying the latest Kepler updates (to Build 20140224-0627). In my case, it's on a previously working Windows 7 platform, so it looks more like an Eclipse bug than anything else.

Is it possible to write a windows service using Python?

Python has a win32service package that seems to allow windows service creation. I have carefully checked available google examples, for example this one:
Is it possible to run a Python script as a service in Windows? If possible, how?
I have placed code into ~/Documents/test.py and executed following under elevated command prompt:
> python test.py install
> python test.py debug
Unfortunately, every example i tried fails with error:
Debugging service TestService - press Ctrl+C to stop.
Error 0xC0000005 - Python could find the service class in the module
AttributeError: 'module' object has no attribute 'AppServerSvc'
(null): (null)
I have tested it with latest version of ActivePython (2.7.2.5 32-bit) on Windows 7 64-bit and Windows 8 64-bit. Of course, if service is started maually via service manager, it will not start either.
Am i doing something wrong or Python is not intended to be used for service creation on modern operating systems? Maybe i need a specific version of windows/python/pywin32? Of course, i can manually test all combinations starting from windows XP but it will take lots of time :(. Maybe someone already has experience with Python and windows services and can hint me what i'm doing wrong?
update
Tested on Windows XP 32-bit virtual macine (same code, same activepython distribution) - same error.
It appears that there is a bug in the ActiveState build for PyWin32. Installing ActiveState python 2.7.2.5 and running the linked sample code above, I get the same error that you are reporting.
But if I download Python 2.7.3 (2.7.2.5 does not seem to be available for download) and add PyWin32 build 214 (ActiveState seems to be using the 214 version of PyWin32). Then everything seems to work just fine. I also tried the latest build of PyWin32 (218) and it also worked correctly.
So I guess you can try reporting the problem to ActiveState (I don't have a support contract with them) and unless you have a requirement for using ActiveState, you can just switch to the standard Python builds.
I have been using services with the standard Python builds for years running on everything from Windows 2000 up to Server 2008 and Windows 7 with no problems. So I have good reason to believe that it will work for you also.
If you want to work with ActiveState to get the problem fixed, then the bug appears to be in their build of PythonService.cpp in the LoadPythonServiceInstance function. I looked at the registry entries that were created and they look fine, it is the PythonService.exe that is failing at loading your class. Based on the error message it appears to have loaded the module correctly and is just having trouble finding the class.

installing IPython with two versions of Python (Windows)

Is it possible to have IPython (0.12) installed on the same
system with two different versions of Python (v 2.7 and 3.2)? Currently I have both versions of Python running happily on my system.
I am using two machines, one with Windows 7 64-bit, the other XP SP2 32-bit, and both have Python 2.7.2 and 3.2 installed. I have been using IPython with Python 2.7 w/o any problems for a while on both.
Now I would like to have 3.2 available too with IPython, but when I try to run the binary windows IPython installer I get this error toward the end of the install:
*** run_installscript: internal error 0xFFFFFFFF ***
and no shortcuts/entries into Start Menu etc are created.
(I ran the install as adminstrator under Win 7) I am running into the same problem with XP and Win 7.
After poking around the net and SO for a while I saw references for
getting setuptools. Unfortunately, there's no version for Python 3.x
but it was suggested to use distribute.py instead which I ran and
installed. I am not sure how to proceed next. And I'm not even sure it
is possible to do this (though I think it is :)
Any suggestions?
UPDATE: There was a problem with import readline not working with Python 3.2.3, but I was able to fix it by downloading pyreadline-2.0-dev1.win32.exe which works with Python 3.2.3 .. the above problem remains unfortunately.
Ok, here's my solution to get IPython 0.12.1 to work with both Python ver
2.7.x and 3.2.x on the same system (ie. under Windows 7 64 bit and XP SP2 32 bit). It's not
perfect, but works, and hopefully will help others. Where I am showing directories they refer to XP (but should be adjusted accordingly for Windows 7)
Steps for both:
Install both versions of Python via the binary windows installer provided at
Python.org
Install this version of pyreadline pyreadline-2.0-dev1.win32.exe which works
for both versions of Python (I could not get the widely available version 1.7 to work with Python 3.2.x)
I am not sure if distribute.py is necessary, I'd skip it on the
first try.
Download ipython-0.12.1.zip file and extract it. Place it under your Programs directory and cd into it (I'll call this the ipython_dir) [I tried the binary installer numerous times without success]
For Python 3.2 (easier)
In the ipython_dir:
c:\python32\pyton.exe setup.py install
will create ipython3.exe in c:\python32\Scripts that can be used to
fire up iPython
For Python 2.7 (a bit odd)
The above method failed. However, it is possible to start IPython from the ipython_dir with
c:\python27\python.exe ipython.py
I can't explain why this is so, but since I use Console2 I can hide
these two ways of starting IPython.
Summary:
To start IPython with v 2.7.x of Python:
c:\python27\python.exe "C:\Program Files..\ipython_dir\ipython.py"
To start IPython with v 3.2.x of Python:
c:\python32\Scripts\python3.exe
That was a lot of work and took most of the day, so I hope posting the steps above
will save someone else a lot of time (and help me remember what I have to do next time I struggle with this)
Thanks everyone for their suggestions.
Addendum: None of the above resulted in shortcuts or entries in the Start/Program Menus. Shortcuts can be created manually, or in my case aren't necessary since I'm using a special shell (Console2) to run IPython.
The first question in the iPython FAQ titled "Running IPython against multiple versions of Python" may help.

IDLE crash when opening on Mac OS X

I recently attempted to install python 3.2 along with IDLE 3 on my macbook pro. I successfully installed python 3.2 (as in, I can run it from the terminal), but when I attempted to install IDLE 3.2 I must have done something wrong because now both IDLE 2.7 and IDLE 3.2 crash immediately upon opening with the message "Python quit unexpectedly", no matter whether I open it through the terminal or through finder. Does anyone know how to fix this? I have installed the correct ActiveTCL package (and reinstalled) and still nothing. I have attempted to reinstall python 3.2 and IDLE 3 but I am not sure whether I did it correctly. Through a good amount of googling I found some people say that it was most likely a path issue but all of the solutions I found were using Windows so I am not sure how to apply that to my mac.
Try renaming or removing the directory ~/.idlerc which is about the only thing used by Python that would in common to IDLE for 2.7 and 3.2. If that doesn't help, state exactly which Python 3 you installed, what version of OS X, and show the stack traces from the termination report.
UPDATE: Based on the crash report you've supplied, it appears that Tk is crashing during its initialization of menu items:
...
4 Tcl 0x00000001013dfa61 Tcl_Panic + 162
5 Tk 0x000000010151c523 TkpGetColor + 383
6 Tk 0x0000000101529a25 TkpMenuInit + 156
7 Tk 0x00000001014ac254 TkMenuInit + 88
8 Tk 0x000000010152c687 -[TKApplication(TKMenus) _setupMenus] + 53
...
I have not seen any reports of a similar problems when IDLE is used with A/S Tcl/Tk 8.5 on 10.7.3 and I haven't been able to reproduce it myself on 10.7.3. However, the Cocoa Tcl/Tk 8.5 is not the most robust framework out there and it may be susceptible to problems when using languages or input methods other than US or US Extended. Another possibility (more likely) is if you are using some third-party menu enhancement application or preference panel (to add colors to menus perhaps). If those suggestions don't help you to isolate the problem, I suggest you ask on the Tcl Mac mailing list (tcl-mac#lists.sourceforge.net, archived at http://dir.gmane.org/gmane.comp.lang.tcl.mac).
If you are running Mac OS X Lion, it sounds like you are being bitten by the saved-state crash. You need to delete the saved state to make the crash go away:
http://osxdaily.com/2011/07/17/delete-specific-application-saved-states-from-mac-os-x-10-7-lion-resume/
http://reviews.cnet.com/8301-13727_7-20083707-263/managing-mac-os-x-lions-application-resume-feature/
I had the same issue. I run OSX 10.8.5, Python 3.3.3 and IDLE 3.3.3 and reinstalling Python haven't been a solution.
I solved any problem removing the ~/.idlerc directory. My problem showed for the first time when I tried to change some Preferences (IDLE->Preferences->General->Startup Preferences->At Startup Open Edit Window), so I suppose that's why resetting my Preferences deleting ~/.idlerc folder have been the solution.
I had the same problem where IDLE would crash after I opened it on my MAC
I ended up updating my computer to OS Yosemite.
and the most updated version of python but it still would shut
the reason it started was because I tried to change the preferences for certain keys.
Resetting the preferences fixed it!
I typed mc ~/.idlerc idlerc2
:)
[Solved] I had the same problem here using:
Yosemite 10.10.2
python 3.4.2
The issue was solved downloading and installing the ActiveTcl 8.5.17.0 version from http://www.activestate.com/activetcl/downloads
Best Regards,
Tchê

Categories

Resources