473,692 Members | 2,394 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Installation of Py3.0rc1 fails on Mac OS X with bad locale

Hi,

i had the following problem when installing py3.0rc1 on a Mac OS X
10.5.5. On this system, the default locale values are:

$ locale
LANG=
LC_COLLATE="C"
LC_CTYPE="UTF-8"
LC_MESSAGES="C"
LC_MONETARY="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_ALL=

but "UTF-8" is is not a value for LC_CTYPE that is valid for python.
Proceeding with the above settings, doing configurie/make of py3.0rc1
fails:

$ cd Python-3.0rc1
$ ./configure
.... # seems to goes ok
$ make
.... # lots of omitted info output
ranlib: file: libpython3.0.a( pymath.o) has no symbols
gcc -o python.exe \
Modules/python.o \
libpython3.0.a -ldl
make: *** [sharedmods] Error 1

So, after some poking, I change the value of LC_CTYPE as follows:

$ LC_CTYPE=
$ locale
LANG=
LC_COLLATE="C"
LC_CTYPE="C"
LC_MESSAGES="C"
LC_MONETARY="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_ALL=

And then redoing the configure/make/install steps seems to all go OK:

$ make clean
$ ./configure
$ make
$ make test
$ sudo make altinstall

$ python3.0 -c "import locale; print(locale.ge tdefaultlocale( ));"
(None, 'mac-roman')

Plus, running the newly installed python3.0 in the same terminal
window seems to be just fine. However, when I start a new terminal
(thus LC_CTYPE is back to its default value of "UTF-8") and run
python3.0 again, there are no errors but there is never any output!
For example:

$ python3.0 -c "import locale; print(locale.ge tdefaultlocale( ));"
$ python3.0
Python 3.0rc1 (r30rc1:66499, Oct 19 2008, 10:54:25)
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright" , "credits" or "license" for more information.
>>dir()
If I however re-unset LC_CTYPE, as above, then stdout to console seems
to work fine again. For completeness and curiosity, on the same system
py2.6 and py2.5 give the following locale info:

$ python2.6 -c "import locale; print locale.getdefau ltlocale();"
(None, 'mac-roman')
$ python -c "import locale; print locale.getdefau ltlocale();"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/System/Library/Frameworks/Python.framewor k/Versions/2.5/lib/
python2.5/locale.py", line 441, in getdefaultlocal e
return _parse_localena me(localename)
File "/System/Library/Frameworks/Python.framewor k/Versions/2.5/lib/
python2.5/locale.py", line 373, in _parse_localena me
raise ValueError, 'unknown locale: %s' % localename
ValueError: unknown locale: UTF-8

I think this issue is related to the (currently open) "Python fails
silently on bad locale" bug:
http://bugs.python.org/issue2173

How should this issue be worked around or dealt with? Should users on
Mac OS X 10.5 change the default value of LC_CTYPE? To what?

mario
Nov 1 '08 #1
3 1618
How should this issue be worked around or dealt with? Should users on
Mac OS X 10.5 change the default value of LC_CTYPE? To what?
It would be best if a Mac user could propose a patch for that problem
before the release of Python 3.0.

Regards,
Martin
Nov 1 '08 #2
mr
On Nov 1, 4:40*pm, "Martin v. Löwis" <mar...@v.loewi s.dewrote:
>
It would be best if a Mac user could propose a patch for that problem
before the release of Python 3.0.
Not sure if this would qualify as a patch, but a workaround that seems
to be working for me is to change the bash environment's default
locale setting -- to a value acceptable to py3.

I did this by adding the following line to /etc/profile:

export LC_ALL="en_US.U TF-8"

Presumably, other valid values should also work correctly.

mario
Nov 8 '08 #3
Not sure if this would qualify as a patch, but a workaround that seems
to be working for me is to change the bash environment's default
locale setting -- to a value acceptable to py3.

I did this by adding the following line to /etc/profile:

export LC_ALL="en_US.U TF-8"
It's not a patch - as you say, it's a workaround. It's not clear to me
whether this has potentially negative side effects, such as other
programs now breaking.

Regards,
Martin
Nov 8 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
2330
by: Patricio Stegmann | last post by:
hello i am trying to install phpbugtracker ( 1.0rc1 ) to be able to manage bugtracking for some web apps we are developping. 0.9.1 used to work great, but I am now unable to install the new one from scratch. I tried installing from a Freebsd box and it complained that gettext wasn't found on the system .... i also tried installing it on a gentoo box, this went OK, but when logging in for the first time I got this error message: Fatal...
21
1609
by: Anthony Baxter | last post by:
On behalf of the Python development team and the Python community, I'm happy to announce the first alpha of Python 2.4. Python 2.4a1 is an alpha release. We'd greatly appreciate it if you could download it, kick the tires and let us know of any problems you find, but it is not suitable for production usage. http://www.python.org/2.4/ In this release we have a number of new modules, a number of existing
12
6185
by: Sander Smeenk | last post by:
Hi, After a very recent postgresql update, the postmaster failed to start because of this: | PANIC: The database cluster was initialized with LC_CTYPE | 'nl_NL@euro.UTF-8', which is not recognized by setlocale(). | It looks like you need to initdb. Now I know nl_NL@euro.UTF-8 is an incorrect locale, I fixed that some
8
3370
by: Owen Jenkins | last post by:
Hello. For years I've been using the DBEngine.CompactDatabase code to make backups of backend databases. But now I've struck a baffling problem where I get an Invalid Argument error. This happens on an XPHome machine with both A97 and A2000 installed. I simplified the code and the error still occurs. In the following new test database containing only this procedure, dbSource refers to a brand new database with no objects which is...
8
3716
by: Henry | last post by:
Hi, in a Windows form VB.Net project I use localization for all texts. In App.Config I added: <appSettings> <add key="locale" value="de"/> </appSettings> In the project I have ressource files strings.resx (English text) and strings.de.resx for the German texts.
4
4567
by: James | last post by:
I am going to install DB2 version 9 on Windows XP workstation. But I can not continue the installation after I issue the command "setup /i en". System shows me that "A major error occoured while installing DB2 on this computer". The following is a part of the installation log. Action ended 22:43:57: SetInitialPropertiesCA. Return value 1.
0
3076
by: SimoneB | last post by:
I'm trying to install eClient v 8.3 but during configuration Web application server i get the error: "the configuration of eclient failed while creating the web aplication server. return code=151" i also tried to configure and deploy eClient manually with Websphere, but no good, i got the same error in log files: 2007/06/11 11:09:15 SSD found Name = EC Version = 8.3.00.000
5
3592
by: Sashi Asokarajan | last post by:
Hello, recently I stepped over Strotrup's TC++PL (third ed.) Chapter D.1 where the localization support of the C++ stdlib is explained. http://www.research.att.com/~bs/3rd_loc.pdf ] Unfortunately the constructor fails if I try to instantiate std::locale for locales other than C or POSIX. With (only) LANG="de.DE.UTF-8" set in ENV the following code thows an exception: std::locale loc("");
0
861
by: =?Utf-8?B?b25kcmVqNDIx?= | last post by:
Hi everyone, My application's NSIS based installer runs dotnetfx3.exe before it runs msiexec to install the actual application. On a large number of XP computers, dotnetfx3.exe fails about half way through with a 16-bit MS-DOS subsystem error. The message box that appears claims:
0
8608
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9088
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8964
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8806
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7630
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6460
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5820
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2975
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
1960
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.