This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Import error encodings (Windows xp compatibility)
Type: enhancement Stage: resolved
Components: Windows Versions: Python 2.7
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: Iovan Irinel, paul.moore, steve.dower, tim.golden, zach.ware
Priority: normal Keywords:

Created on 2016-07-18 13:48 by Iovan Irinel, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (9)
msg270756 - (view) Author: Iovan Irinel (Iovan Irinel) Date: 2016-07-18 13:48
I have python embeded intro my application. I wanted to upgrade to python 2.7.12 i use also a static library. Not DLL.  I have defined "Py_NO_ENABLE_SHARE"
Ok, all work fine with 2.7.6

I want to say this error happen just when i run it under windows xp.
Under windows 10 it works , my application start.. Pythoncore and application is build with v140_xp toolset i user visual studio 2015. I can make a video with error if is necessary. Thanks.

Traceback (most recent call last):
  File "Lib/site.py", line 548, in <module>
  File "Lib/site.py", line 537, in main
  File "Lib/site.py", line 465, in aliasmbcs
  File "Lib/locale.py", line 13, in <module>
ImportError: No module named encodings


I made more test and i come with a reply.
msg270769 - (view) Author: Iovan Irinel (Iovan Irinel) Date: 2016-07-18 16:03
I tested again. And the answer is this: Problem is stati library.

I tested:
- 2.7.6
- 2.7.7
- 2.7.8
- 2.7.9
- 2.7.10
- 2.7.11
- 2.7.12

This issue happen just when pythoncore is compiled as static library. With DLL it works.
msg270772 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2016-07-18 16:31
Is the stati library a third-party project?
msg270774 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2016-07-18 16:41
You're compiling Python in a completely unsupported way right now, so I'm afraid you'll need to submit a patch to get it fixed.

Python 2.7 is only officially supported with VC 9.0 (not VC 14.0), and I don't believe the other volunteers test the static library build either, so I'm afraid you're somewhat on your own.

That said, if you do find a fix and submit a patch, it may be merged in. However, to even be able to build with VC 14.0 you've probably made a great number of changes that certainly won't be accepted at this stage.
msg270781 - (view) Author: Iovan Irinel (Iovan Irinel) Date: 2016-07-18 18:05
It's ok for me to use  vc .9 but when i try to link it says  "  This library was created with an older visual stuido toolset " And it trow in a error.



And about v140 compatibility i don't maded so much changes. It was 3 minutes of work.

Maybe someone take a look, i'm new in c++ development and python too. I don't think i'm able to find a fix.

Maybe some ideea about how to make vs2015 to link with a library from vc 9.0 ?
msg270782 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2016-07-18 18:17
Unfortunately, you can't do that either. Projects including static libraries all need to use the same compiler.

So either build python27.dll separately and dynamically link to it (or just use the one that we build and release, and be careful not to mix up memory or file management functions as they will be incompatible), build everything with VS 9.0, or you'll need help to find a fix.

Most - possibly all - of our volunteers are not going to be willing to go deep on custom Python 2.7 build issues. You're probably going to have to find someone who can offer paid support.
msg270784 - (view) Author: Iovan Irinel (Iovan Irinel) Date: 2016-07-18 18:27
Thanks, i don't think is a big issue.  Because on windows 7, 8 , 8.1 , 10 it works.

Just with windows xp i have this issue.

It's ok paid. No problem, soo if someone want to fix for me this :  Sure paid contact me please.

And someone want to do it free contact me too and we will submit a patch to help all users. 

Even paid i will share the fix.  

Regards.
msg270910 - (view) Author: Iovan Irinel (Iovan Irinel) Date: 2016-07-21 10:37
Still searching for someone who can do it.
msg367309 - (view) Author: Zachary Ware (zach.ware) * (Python committer) Date: 2020-04-26 16:14
As 2.7 has now reached end-of-life and with it the last version to support Windows XP, I'm closing the issue.
History
Date User Action Args
2022-04-11 14:58:33adminsetgithub: 71749
2020-04-26 16:14:22zach.waresetstatus: open -> closed
resolution: out of date
messages: + msg367309

stage: resolved
2016-07-21 16:21:12brett.cannonsetnosy: - brett.cannon
2016-07-21 10:37:03Iovan Irinelsetmessages: + msg270910
2016-07-18 18:27:37Iovan Irinelsetmessages: + msg270784
2016-07-18 18:17:58steve.dowersetmessages: + msg270782
2016-07-18 18:05:49Iovan Irinelsetmessages: + msg270781
2016-07-18 16:47:50brett.cannonsettype: enhancement
2016-07-18 16:41:04steve.dowersetmessages: + msg270774
2016-07-18 16:31:42brett.cannonsetnosy: + brett.cannon
messages: + msg270772
2016-07-18 16:03:08Iovan Irinelsetmessages: + msg270769
2016-07-18 13:48:21Iovan Irinelcreate