Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

now python2.7 requires _weakrefset #76

Closed
vbabiy opened this issue Mar 14, 2011 · 6 comments
Closed

now python2.7 requires _weakrefset #76

vbabiy opened this issue Mar 14, 2011 · 6 comments
Labels

Comments

@vbabiy
Copy link

vbabiy commented Mar 14, 2011

There's a recent change in Python 2.7 which requires the inclusion of a new module in REQUIRED MODULES.

It is an issue for people using SVN checkout of Python 2.7, and for the upcoming Python 2.7.1.

#!diff
--- a/virtualenv.py        2010-09-14 21:48:58.078562930 +0200
+++ b/virtualenv.py        2010-09-14 21:46:20.650769346 +0200
@@ -51,6 +51,8 @@ REQUIRED_FILES = ['lib-dynload', 'config

 if sys.version_info[:2] >= (2, 6):
     REQUIRED_MODULES.extend(['warnings', 'linecache', '_abcoll', 'abc'])
+    if sys.version_info[:2] >= (2, 7):
+        REQUIRED_MODULES.extend(['_weakrefset'])
 if sys.version_info[:2] <= (2, 3):
     REQUIRED_MODULES.extend(['sets', '__future__'])
 if is_pypy:

@vbabiy
Copy link
Author

vbabiy commented Mar 14, 2011

the trace of the error:

$ python2.7 virtualenv.py tmp

New python executable in tmp/bin/python2.7

Also creating executable in tmp/bin/python

Traceback (most recent call last):

  File "./tmp/lib/python2.7/site.py", line 67, in <module>

    import os

  File "./tmp/lib/python2.7/os.py", line 398, in <module>

    import UserDict

  File "./tmp/lib/python2.7/UserDict.py", line 83, in <module>

    import _abcoll

  File "./tmp/lib/python2.7/_abcoll.py", line 11, in <module>

    from abc import ABCMeta, abstractmethod

  File "./tmp/lib/python2.7/abc.py", line 8, in <module>

    from _weakrefset import WeakSet

ImportError: No module named _weakrefset

ERROR: The executable tmp/bin/python2.7 is not functioning

ERROR: It thinks sys.prefix is '.' (should be './tmp')

ERROR: virtualenv is not compatible with this system or executable

Original Comment By: flox

@vbabiy
Copy link
Author

vbabiy commented Mar 14, 2011

And the related changeset in Python source code:
http://svn.python.org/view?view=rev&revision=84230


Original Comment By: flox

@vbabiy
Copy link
Author

vbabiy commented Mar 14, 2011

  • Changed status from new to resolved.

Original Comment By: Jannis Leidel

@vbabiy
Copy link
Author

vbabiy commented Mar 14, 2011

Thank you for this insight...wow..banged my head for hours trying to figure
this out.

Was working on the Pylons install script 'go-pylons.py' after changing Python
environments...updated with the new version check code above after line 43 and
it worked like a champ!


Original Comment By: Anonymous

@vbabiy
Copy link
Author

vbabiy commented Mar 14, 2011

I must be new enough that I'm missing something - what are the steps to solve
this issue? I'm getting the same trace shown by Name: ">flox above.
Thanks.


Original Comment By: Name:">flox

@vbabiy
Copy link
Author

vbabiy commented Mar 14, 2011

Anonymous -- if you're getting the above error when you try to create a
virtualenv with Python 2.7, the solution that worked for me was upgrading to
virtualenv 1.5.1+.


Original Comment By: Paul Bissex

@pypa pypa locked and limited conversation to collaborators Jan 14, 2021
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant