Installing PyX breaks pip

149 views
Skip to first unread message

Andrey Novoseltsev

unread,
Apr 17, 2016, 6:50:37 PM4/17/16
to sage-devel
We have an optional package for PyX-0.10 (recent versions are 0.14). After installing it pip stops working with the message like

Traceback (most recent call last):
  File "/home/sc_serv/sage/local/bin/pip", line 5, in <module>
    from pkg_resources import load_entry_point
  File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 2912, in <module>
  File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 2898, in _call_aside
  File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 2925, in _initialize_master_working_set
  File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 633, in _build_master
  File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 626, in __init__
  File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 682, in add_entry
  File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 1956, in find_on_path
  File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 2343, in from_location
  File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 2660, in _reload_version
  File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 2308, in _version_from_file
  File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 2476, in _get_metadata
  File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 1847, in get_metadata_lines
  File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 1842, in get_metadata
  File "/home/sc_serv/sage/local/lib/python/codecs.py", line 302, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xf6 in position 165: invalid start byte

which seems to be due to author's name with non-Latin characters.

Installing PyX through pip does not work for some reason, but I think it should be removed from optional packages as it breaks pip which is way more important.

Dima Pasechnik

unread,
Apr 17, 2016, 7:45:57 PM4/17/16
to sage-devel
it's because 0.14 is python3 only. The following works for me:

$ sage --pip install  --allow-external pyx pyx==0.12.1


 
but I think it should be removed from optional packages as it breaks pip which is way more important.

as you can do the above, there is no point in keeping 0.10....

 

Erik Bray

unread,
Apr 18, 2016, 6:53:44 AM4/18/16
to sage-...@googlegroups.com
I wasn't able to reproduce this, but it seems there's some funny
business going on, possibly involving default encodings. When I
installed the package its metadata was written out as UTF-8 as this
code is expecting it to be and I had no problems.

But I wonder if there's an issue buried somewhere that could cause a
package's metadata to be written in a non-UTF-8 system default
encoding?

Andrey Novoseltsev

unread,
Apr 18, 2016, 11:16:20 PM4/18/16
to sage-devel
I had this problem with SageMathCell which is under Ubuntu 14.04 (don't recall encoding settings, but I am pretty sure it should be UTF-8) and then reproduced it on Debian Jessie with UTF-8 for sure.

Given that it is also an old version, I think the package should just be removed and interested people can use pip as Dima has demonstrated. Do we need tickets for package removal or how is it done?

Dima Pasechnik

unread,
Apr 19, 2016, 5:27:11 AM4/19/16
to sage-devel


On Tuesday, April 19, 2016 at 4:16:20 AM UTC+1, Andrey Novoseltsev wrote:
I had this problem with SageMathCell which is under Ubuntu 14.04 (don't recall encoding settings, but I am pretty sure it should be UTF-8) and then reproduced it on Debian Jessie with UTF-8 for sure.

Given that it is also an old version, I think the package should just be removed and interested people can use pip as Dima has demonstrated. Do we need tickets for package removal or how is it done?

as it's an old-style package with no placeholder in build/pkgs/, I guess opening a ticket saying "remove this" and cc'ing Volker on it would do...
Was it used in some other spkg?  I can't seem to find anything one this though.


 

Andrey Novoseltsev

unread,
Apr 19, 2016, 10:15:31 PM4/19/16
to sage-devel
Reply all
Reply to author
Forward
0 new messages