FS#56493 - [python-virtualenv] [python2-virtualenv] Missing dependency on setuptools

Attached to Project: Arch Linux
Opened by Tatsuyuki Ishi (ishitatsuyuki) - Tuesday, 28 November 2017, 09:10 GMT
Last edited by Felix Yan (felixonmars) - Friday, 22 December 2017, 06:45 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Felix Yan (felixonmars)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 4
Private No

Details

The missing dependency can cause script failure when creating a virtualenv.
This task depends upon

Closed by  Felix Yan (felixonmars)
Friday, 22 December 2017, 06:45 GMT
Reason for closing:  Fixed
Additional comments about closing:  15.1.0-3
Comment by Eli Schwartz (eschwartz) - Tuesday, 28 November 2017, 15:24 GMT
  • Field changed: Summary ([python2-virtualenv] Missing dependency: python2-setuptools → [python-virtualenv] [python2-virtualenv] Missing dependency on setuptools)
  • Field changed: Status (Unconfirmed → Assigned)
  • Task assigned to Felix Yan (felixonmars)
More generally, any setuptools package that uses entry_points scripts as per https://wiki.archlinux.org/index.php/Python_package_guidelines#setuptools

Thanks for noticing this.
Comment by Erick Will (erickwill) - Sunday, 03 December 2017, 16:55 GMT
After the update I got problems to create a virtual environment.

$ virtualenv2 venv
Traceback (most recent call last):
File "/usr/bin/virtualenv2", line 6, in <module>
from pkg_resources import load_entry_point
ImportError: No module named pkg_resources

Is this problem related?
Is there any workaround to handle this issue until the next release?
Thanks in advance.
Comment by Eli Schwartz (eschwartz) - Sunday, 03 December 2017, 19:08 GMT
Yes, this is exactly the problem. You can install python2-setuptools by hand since the error is that it wasn't automatically installed...
Comment by Erick Will (erickwill) - Sunday, 03 December 2017, 19:48 GMT
Even when I have python-setuptools installed I got the very same error:

virtualenv2 venv
Traceback (most recent call last):
File "/usr/bin/virtualenv2", line 6, in <module>
from pkg_resources import load_entry_point
ImportError: No module named pkg_resources

Any clue?
Comment by AK (Andreaskem) - Sunday, 03 December 2017, 20:02 GMT
There is both a python-setuptools and a python2-setuptools package. Which one exactly did you install? You probably need the python2 version since you seem to be using virtualenv2?
Comment by Eli Schwartz (eschwartz) - Sunday, 03 December 2017, 20:04 GMT
Yeah, that should be python2-setuptools, sorry. But I did kind of hope that that sort of thing would be obvious, since python-setuptools is self-evidently meant for Python 3, and python2-setuptools is self-evidently meant for Python 2.
Comment by Erick Will (erickwill) - Sunday, 03 December 2017, 21:54 GMT
It did the trick, thanks.

Loading...