Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #110802 > unrolled thread
| Started by | Madhavan Bomidi <blmadhavan@gmail.com> |
|---|---|
| First post | 2016-06-29 20:51 -0700 |
| Last post | 2016-06-30 21:48 +0900 |
| Articles | 9 — 4 participants |
Back to article view | Back to comp.lang.python
Errors in installation of matplotlib and pandas on Macbook Madhavan Bomidi <blmadhavan@gmail.com> - 2016-06-29 20:51 -0700
Re: Errors in installation of matplotlib and pandas on Macbook Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-29 21:01 -0700
Re: Errors in installation of matplotlib and pandas on Macbook Madhavan Bomidi <blmadhavan@gmail.com> - 2016-06-29 21:27 -0700
Re: Errors in installation of matplotlib and pandas on Macbook Chris Angelico <rosuav@gmail.com> - 2016-06-30 14:49 +1000
Re: Errors in installation of matplotlib and pandas on Macbook Madhavan Bomidi <blmadhavan@gmail.com> - 2016-06-29 22:54 -0700
Re: Errors in installation of matplotlib and pandas on Macbook Chris Angelico <rosuav@gmail.com> - 2016-06-30 16:02 +1000
Re: Errors in installation of matplotlib and pandas on Macbook Madhavan Bomidi <blmadhavan@gmail.com> - 2016-06-29 23:21 -0700
Re: Errors in installation of matplotlib and pandas on Macbook Chris Angelico <rosuav@gmail.com> - 2016-06-30 17:03 +1000
Re: Errors in installation of matplotlib and pandas on Macbook tommy yama <bluebox03@gmail.com> - 2016-06-30 21:48 +0900
| From | Madhavan Bomidi <blmadhavan@gmail.com> |
|---|---|
| Date | 2016-06-29 20:51 -0700 |
| Subject | Errors in installation of matplotlib and pandas on Macbook |
| Message-ID | <34f6dbb3-5781-468b-9e47-006ffb36582f@googlegroups.com> |
Hello everyone,
I am very new to Macbook and python. I have installed python through MacPorts and when I check if all the packages I required are installed properly, I get the following traceback errors for matplotlib and pandas packages. Can anyone suggest me how I can rectify the same? I tried to check the file "/usr/local/lib/python2.7/site-packages/matplotlib/__init__.py" using vim command but it is empty. Please suggest me ...
Bomidis-MacBook-Pro:~ madhavan$ which python
/usr/local/bin/python
Bomidis-MacBook-Pro:~ madhavan$ which ipython
/usr/local/bin/ipython
Bomidis-MacBook-Pro:~ madhavan$ python -V
Python 2.7.11
Bomidis-MacBook-Pro:~ madhavan$ python
Python 2.7.11 (default, Jun 17 2016, 20:01:51)
[GCC 4.2.1 Compatible Apple LLVM 7.3.0 (clang-703.0.31)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>> print(numpy.version.full_version)
1.11.1
>>> import scipy
>>> print(scipy.version.full_version)
0.17.1
>>> import netCDF4
>>> import h5py
>>> import nltk
>>> import matplotlib
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/site-packages/matplotlib/__init__.py", line 1131, in <module>
rcParams = rc_params()
File "/usr/local/lib/python2.7/site-packages/matplotlib/__init__.py", line 975, in rc_params
return rc_params_from_file(fname, fail_on_error)
File "/usr/local/lib/python2.7/site-packages/matplotlib/__init__.py", line 1100, in rc_params_from_file
config_from_file = _rc_params_in_file(fname, fail_on_error)
File "/usr/local/lib/python2.7/site-packages/matplotlib/__init__.py", line 1018, in _rc_params_in_file
with _open_file_or_url(fname) as fd:
File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/contextlib.py", line 17, in __enter__
return self.gen.next()
File "/usr/local/lib/python2.7/site-packages/matplotlib/__init__.py", line 1000, in _open_file_or_url
encoding = locale.getdefaultlocale()[1]
File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py", line 543, in getdefaultlocale
return _parse_localename(localename)
File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py", line 475, in _parse_localename
raise ValueError, 'unknown locale: %s' % localename
ValueError: unknown locale: UTF-8
>>> import pandas
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Python/2.7/site-packages/pandas/__init__.py", line 39, in <module>
from pandas.core.api import *
File "/Library/Python/2.7/site-packages/pandas/core/api.py", line 10, in <module>
from pandas.core.groupby import Grouper
File "/Library/Python/2.7/site-packages/pandas/core/groupby.py", line 18, in <module>
from pandas.core.frame import DataFrame
File "/Library/Python/2.7/site-packages/pandas/core/frame.py", line 39, in <module>
from pandas.core.series import Series
File "/Library/Python/2.7/site-packages/pandas/core/series.py", line 2944, in <module>
import pandas.tools.plotting as _gfx # noqa
File "/Library/Python/2.7/site-packages/pandas/tools/plotting.py", line 27, in <module>
import pandas.tseries.converter as conv
File "/Library/Python/2.7/site-packages/pandas/tseries/converter.py", line 7, in <module>
import matplotlib.units as units
File "/usr/local/lib/python2.7/site-packages/matplotlib/__init__.py", line 1131, in <module>
rcParams = rc_params()
File "/usr/local/lib/python2.7/site-packages/matplotlib/__init__.py", line 975, in rc_params
return rc_params_from_file(fname, fail_on_error)
File "/usr/local/lib/python2.7/site-packages/matplotlib/__init__.py", line 1100, in rc_params_from_file
config_from_file = _rc_params_in_file(fname, fail_on_error)
File "/usr/local/lib/python2.7/site-packages/matplotlib/__init__.py", line 1018, in _rc_params_in_file
with _open_file_or_url(fname) as fd:
File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/contextlib.py", line 17, in __enter__
return self.gen.next()
File "/usr/local/lib/python2.7/site-packages/matplotlib/__init__.py", line 1000, in _open_file_or_url
encoding = locale.getdefaultlocale()[1]
File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py", line 543, in getdefaultlocale
return _parse_localename(localename)
File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py", line 475, in _parse_localename
raise ValueError, 'unknown locale: %s' % localename
ValueError: unknown locale: UTF-8
----------------
Look forward to your response,
Thanks and regards,
Madhavan
[toc] | [next] | [standalone]
| From | Lawrence D’Oliveiro <lawrencedo99@gmail.com> |
|---|---|
| Date | 2016-06-29 21:01 -0700 |
| Message-ID | <ee661759-619b-464a-89c3-c2060dd05005@googlegroups.com> |
| In reply to | #110802 |
On Thursday, June 30, 2016 at 3:51:56 PM UTC+12, Madhavan Bomidi wrote: > Bomidis-MacBook-Pro:~ madhavan$ which python > /usr/local/bin/python Apple already includes a(n obsolete) version of Python with its OS. Trying to override this with a newer version could easily lead to conflicts.
[toc] | [prev] | [next] | [standalone]
| From | Madhavan Bomidi <blmadhavan@gmail.com> |
|---|---|
| Date | 2016-06-29 21:27 -0700 |
| Message-ID | <9b49d6b9-c721-4136-b07d-5a50ecc6d9c8@googlegroups.com> |
| In reply to | #110804 |
Can you please suggest me what I shall do to make sure all the libraries that I have indicated above work in python? I don't know how I can get back to obsolete version of Python. Please suggest me the commands or references of previous posts, if any. Thanks and regards, Madhavan
[toc] | [prev] | [next] | [standalone]
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2016-06-30 14:49 +1000 |
| Message-ID | <mailman.121.1467262148.2358.python-list@python.org> |
| In reply to | #110802 |
On Thu, Jun 30, 2016 at 1:51 PM, Madhavan Bomidi <blmadhavan@gmail.com> wrote: > File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py", line 475, in _parse_localename > raise ValueError, 'unknown locale: %s' % localename > ValueError: unknown locale: UTF-8 This looks like a problem in your environment. "UTF-8" is not a locale; usually you'll want something else first. For me, it's "en_AU.utf8" (although I believe UTF-8 works fine in place of utf8). What language do you primarily speak, and what country are you in? Put their two-letter codes together, and you'll get something like "en_US.utf8" (English, USA), or "tr_TR.utf8" (Turkish, Turkey), or "pt_BR.utf8" (Portuguese, Brazil). Once you know what locale you want to be using, though, you'll need someone who knows Macs to help you select that appropriately. Worst case, run this command before starting Python: export LC_ALL=en_AU.utf8 That may help. ChrisA
[toc] | [prev] | [next] | [standalone]
| From | Madhavan Bomidi <blmadhavan@gmail.com> |
|---|---|
| Date | 2016-06-29 22:54 -0700 |
| Message-ID | <abb3064c-04bb-4d48-996a-624a5d7e549a@googlegroups.com> |
| In reply to | #110809 |
Hello ChrisA, Thanks for your suggestion. My script works fine when I run the command 'export LC_ALL=en_AU.utf8' before starting python. I am from India and using US English and international keyboard. I also tried using the command 'export LC_ALL=en_USA.utf8' and the python script works fine. How can I avoid running this command everytime when I want to start Python? Can I add the following two lines to .bash_profile? export LC_CTYPE=en_US.utf8 export LC_ALL=en_US.utf8 Look forward to your response. Thanking you in advance, Madhavan
[toc] | [prev] | [next] | [standalone]
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2016-06-30 16:02 +1000 |
| Message-ID | <mailman.124.1467266545.2358.python-list@python.org> |
| In reply to | #110812 |
On Thu, Jun 30, 2016 at 3:54 PM, Madhavan Bomidi <blmadhavan@gmail.com> wrote: > > Thanks for your suggestion. My script works fine when I run the command 'export LC_ALL=en_AU.utf8' before starting python. > > I am from India and using US English and international keyboard. I also tried using the command 'export LC_ALL=en_USA.utf8' and the python script works fine. How can I avoid running this command everytime when I want to start Python? > > Can I add the following two lines to .bash_profile? > > export LC_CTYPE=en_US.utf8 > export LC_ALL=en_US.utf8 That would possibly work, but more likely, there'll be some way in your Mac's configuration/settings menus to set your locale. If you get that set correctly, you should be able to leave those lines out of your .bash_profile and still have everything work. ChrisA
[toc] | [prev] | [next] | [standalone]
| From | Madhavan Bomidi <blmadhavan@gmail.com> |
|---|---|
| Date | 2016-06-29 23:21 -0700 |
| Message-ID | <0639a6cc-d622-49da-8cdb-2798d724e197@googlegroups.com> |
| In reply to | #110813 |
Hello ChrisA,
Thanks for your suggestion. I have typed the following on Terminal:
$ locale
LANG=
LC_COLLATE="C"
LC_CTYPE="C"
LC_MESSAGES="C"
LC_MONETARY="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_ALL="C"
How should I modify the profile/configuration of locale permanently? Is it possible to do this on terminal other than using 'export' command always and including the commands in .bash_profile?
How does this locale configuration affect other processes or software on the Macbook?
I also get another problem with selfupdate of Mac port. Below is the error message. Is this a problem of configuration in the locale?
------------------
$ port -v selfupdate
---> Updating MacPorts base sources using rsync
rsync: failed to connect to rsync.macports.org: Operation timed out (60)
rsync error: error in socket IO (code 10) at /BuildRoot/Library/Caches/com.apple.xbs/Sources/rsync/rsync-47/rsync/clientserver.c(105) [receiver=2.6.9]
Command failed: /usr/bin/rsync -rtzv --delete-after rsync://rsync.macports.org/release/tarballs/base.tar /opt/local/var/macports/sources/rsync.macports.org/release/tarballs
Exit code: 10
Error: Error synchronizing MacPorts sources: command execution failed
To report a bug, follow the instructions in the guide:
http://guide.macports.org/#project.tickets
Error: /opt/local/bin/port: port selfupdate failed: Error synchronizing MacPorts sources: command execution failed
-------------------------------
Look forward to your response,
Thanks and regards,
Madhavan
[toc] | [prev] | [next] | [standalone]
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2016-06-30 17:03 +1000 |
| Message-ID | <mailman.125.1467270197.2358.python-list@python.org> |
| In reply to | #110815 |
On Thu, Jun 30, 2016 at 4:21 PM, Madhavan Bomidi <blmadhavan@gmail.com> wrote: > How should I modify the profile/configuration of locale permanently? Is it possible to do this on terminal other than using 'export' command always and including the commands in .bash_profile? > > How does this locale configuration affect other processes or software on the Macbook? > > I also get another problem with selfupdate of Mac port. Below is the error message. Is this a problem of configuration in the locale? These are all Mac-specific questions (and not, incidentally, Python-specific). You'll probably find you can learn a lot from Googling your problems. (Or DuckDuckGoing them, but that doesn't roll off the tongue so easily.) ChrisA
[toc] | [prev] | [next] | [standalone]
| From | tommy yama <bluebox03@gmail.com> |
|---|---|
| Date | 2016-06-30 21:48 +0900 |
| Message-ID | <mailman.137.1467290896.2358.python-list@python.org> |
| In reply to | #110815 |
Hi there, Why you would not use pip and anaconda for panda installation? It seems much easier to do the same. <https://www.continuum.io/downloads#_macosx> <https://www.continuum.io/downloads#_macosx> <https://www.continuum.io/downloads#_macosx> https://www.continuum.io/downloads#_macosx *Tomomi Yamano * On Thu, Jun 30, 2016 at 4:03 PM, Chris Angelico <rosuav@gmail.com> wrote: > On Thu, Jun 30, 2016 at 4:21 PM, Madhavan Bomidi <blmadhavan@gmail.com> > wrote: > > How should I modify the profile/configuration of locale permanently? Is > it possible to do this on terminal other than using 'export' command always > and including the commands in .bash_profile? > > > > How does this locale configuration affect other processes or software on > the Macbook? > > > > I also get another problem with selfupdate of Mac port. Below is the > error message. Is this a problem of configuration in the locale? > > These are all Mac-specific questions (and not, incidentally, > Python-specific). You'll probably find you can learn a lot from > Googling your problems. (Or DuckDuckGoing them, but that doesn't roll > off the tongue so easily.) > > ChrisA > -- > https://mail.python.org/mailman/listinfo/python-list >
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web