Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 445822 - dev-python/virtualenv-1.8.4 does not work with pypy
Summary: dev-python/virtualenv-1.8.4 does not work with pypy
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-03 18:18 UTC by Guillaume Ayoub
Modified: 2013-07-24 10:59 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Guillaume Ayoub 2012-12-03 18:18:54 UTC
Installing virtualenv for pypy works, but creating a new virtualenv fails:

$ virtualenv-2.7-pypy-1.9 venv
Traceback (most recent call last):
  File "app_main.py", line 51, in run_toplevel
  File "/usr/bin/virtualenv-2.7-pypy-1.9", line 9, in <module>
    load_entry_point('virtualenv==1.8.4', 'console_scripts', 'virtualenv')()
  File "/usr/lib64/pypy1.9/site-packages/virtualenv.py", line 964, in main
    never_download=options.never_download)
  File "/usr/lib64/pypy1.9/site-packages/virtualenv.py", line 1065, in create_environment
    site_packages=site_packages, clear=clear))
  File "/usr/lib64/pypy1.9/site-packages/virtualenv.py", line 1237, in install_python
    fix_lib64(lib_dir)
  File "/usr/lib64/pypy1.9/site-packages/virtualenv.py", line 1629, in fix_lib64
    "Unexpected python lib dir: %r" % lib_dir)
AssertionError: Unexpected python lib dir: 'venv'

I get the same error with "virtualenv-2.7 -p pypy-c1.9 venv", or with mkvirtualenv. No error with "virtualenv-2.7 venv".

This bug seems to be related to 64-bits architectures, as the error happens in the "fix_lib64" (which seems to be especially written for gentoo, according to the docstring of the function).

Pypy is said to be "officially" supported by virtualenv.

Someone with the same problem has already explained it a long time ago on the forum: http://forums-web1.gentoo.org/viewtopic-t-927434-start-0.html
Comment 1 Guillaume Ayoub 2012-12-06 21:09:36 UTC
The bug is also reported upstream:
https://github.com/pypa/virtualenv/issues/306
Comment 2 Ian Delaney (RETIRED) gentoo-dev 2012-12-08 13:26:01 UTC
$ virtualenv-2.7-pypy-1.9 venv
Traceback (most recent call last):
  File "app_main.py", line 51, in run_toplevel
  File "/usr/bin/virtualenv-2.7-pypy-1.9", line 9, in <module>
    load_entry_point('virtualenv==1.8.4', 'console_scripts', 'virtualenv')()
  File "/usr/lib64/pypy1.9/site-packages/virtualenv.py", line 964, in main
    never_download=options.never_download)
  File "/usr/lib64/pypy1.9/site-packages/virtualenv.py", line 1065, in create_environment
    site_packages=site_packages, clear=clear))
  File "/usr/lib64/pypy1.9/site-packages/virtualenv.py", line 1237, in install_python
    fix_lib64(lib_dir)
  File "/usr/lib64/pypy1.9/site-packages/virtualenv.py", line 1629, in fix_lib64
    "Unexpected python lib dir: %r" % lib_dir)
AssertionError: Unexpected python lib dir: 'venv'
Comment 3 Michal Petrucha 2013-04-12 23:56:29 UTC
Fixed upstream: https://github.com/pypa/virtualenv/pull/388
The fix isn't in any release yet, though.
Comment 4 Dirkjan Ochtman (RETIRED) gentoo-dev 2013-07-24 08:07:37 UTC
Can you try this with newer virtualenv and/or pypy?
Comment 5 Guillaume Ayoub 2013-07-24 10:59:19 UTC
This bug is fixed in 1.10.