473,385 Members | 1,453 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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.getdefaultlocale());"
(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.getdefaultlocale());"
$ 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.getdefaultlocale();"
(None, 'mac-roman')
$ python -c "import locale; print locale.getdefaultlocale();"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/locale.py", line 441, in getdefaultlocale
return _parse_localename(localename)
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/locale.py", line 373, in _parse_localename
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 1593
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.loewis.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.UTF-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.UTF-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
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...
21
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...
12
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...
8
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...
8
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...
4
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...
0
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....
5
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 ] ...
0
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...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.