Bug 1417613 - pip crashes with pyparsing error
Summary: pip crashes with pyparsing error
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: python-pip
Version: epel7
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Tomas Orsava
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-30 12:19 UTC by Andrei Stepanov
Modified: 2017-02-01 16:24 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-02-01 16:24:59 UTC
Type: Bug


Attachments (Terms of Use)

Description Andrei Stepanov 2017-01-30 12:19:43 UTC
The original bug is: https://bugs.centos.org/view.php?id=12722&history=1

pyparsing-1.5.6-9.el7.noarch
python2-pip-8.1.2-5.el7.noarch

# pip
Traceback (most recent call last):
  File "/usr/bin/pip", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 72, in <module>
    import packaging.requirements
  File "/usr/lib/python2.7/site-packages/packaging/requirements.py", line 59, in <module>
    MARKER_EXPR = originalTextFor(MARKER_EXPR())("marker")
TypeError: __call__() takes exactly 2 arguments (1 given)


# yum info {pyparsing,python2-pip}
Loaded plugins: product-id, search-disabled-repos, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to reg
ister.
Installed Packages
Name        : pyparsing
Arch        : noarch
Version     : 1.5.6
Release     : 9.el7
Size        : 367 k
Repo        : installed
From repo   : beaker-Server
Summary     : An object-oriented approach to text processing
URL         : http://pyparsing.wikispaces.com/
License     : MIT
Description : pyparsing is a module that can be used to easily and directly configure syntax
            : definitions for any number of text parsing applications.

Name        : python2-pip
Arch        : noarch
Version     : 8.1.2
Release     : 5.el7
Size        : 7.2 M
Repo        : installed
From repo   : epel
Summary     : A tool for installing and managing Python 2 packages
URL         : http://www.pip-installer.org
License     : MIT
Description : Pip is a replacement for `easy_install
            : <http://peak.telecommunity.com/DevCenter/EasyInstall>`_.  It uses mostly the
            : same techniques for finding packages, so packages that were made
            : easy_installable should be pip-installable as well.




Next command helps to solve the bug:
# yum install ftp://mirror.switch.ch/pool/4/mirror/centos/7.3.1611/cloud/x86_64/openstack-kilo/common/pyparsing-2.0.3-1.el7.noarch.rpm

Comment 1 Tomas Orsava 2017-01-31 13:27:01 UTC
I can't reproduce the issue. I have the same versions of both packages installed at the same time, yet pip works as expected.


$ yum info {pyparsing,python2-pip}
Loaded plugins: product-id, search-disabled-repos, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Installed Packages
Name        : pyparsing
Arch        : noarch
Version     : 1.5.6
Release     : 9.el7
Size        : 367 k
Repo        : installed
From repo   : rhel
Summary     : An object-oriented approach to text processing
URL         : http://pyparsing.wikispaces.com/
License     : MIT
Description : pyparsing is a module that can be used to easily and directly
            : configure syntax definitions for any number of text parsing
            : applications.

Name        : python2-pip
Arch        : noarch
Version     : 8.1.2
Release     : 5.el7
Size        : 7.2 M
Repo        : installed
From repo   : epel
Summary     : A tool for installing and managing Python 2 packages
URL         : http://www.pip-installer.org
License     : MIT
Description : Pip is a replacement for `easy_install
            : <http://peak.telecommunity.com/DevCenter/EasyInstall>`_.  It uses
            : mostly the same techniques for finding packages, so packages that
            : were made easy_installable should be pip-installable as well.

Comment 2 Tomas Orsava 2017-02-01 16:24:59 UTC
After an IRC discussion it was discovered the bug was caused by using sudo pip, which is not officially supported as it can break the Python environment. Instead it is recommended to use the "--user" flag when installing using pip or use a virtual environment.


Note You need to log in before you can comment on or make changes to this bug.