cómo crear virtualenv con pypy?
Ejecutando el siguiente comando
virtualenv -p /usr/local/bin/pypy pypy
Sale con error como
Running virtualenv with interpreter /usr/local/bin/pypy
New pypy executable in pypy/bin/pypy
debug: WARNING: Library path not found, using compiled-in sys.path.
debug: WARNING: 'sys.prefix' will not be set.
debug: WARNING: Make sure the pypy binary is kept inside its tree of files.
debug: WARNING: It is ok to create a symlink to it from somewhere else.
'import site' failed
AttributeError: 'module' object has no attribute 'prefix'
ERROR: The executable pypy/bin/pypy is not functioning
ERROR: It thinks sys.prefix is u'/Users/myname' (should be u'/Users/myname/pypy')
ERROR: virtualenv is not compatible with this system or executable
Estoy ejecutando Mac OS X 10.8.1 (Mountain Lion) con CPython 2.7.3 e instalado pypy 1.9 usando Brew. la versión de virtualenv es 1.8.4
Usar el binario pypy pre-construido para Mac OS X descargado directamente desde el sitio web de pypy no hace ninguna diferencia
3 answers
Esto parece ser una regresión en 1.8.4. Al probar esto en mi sistema todo funcionó bien con virtualenv 1.8.2, luego actualizé y ahora recibo el mismo error que usted.
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2012-11-27 06:54:59
Tengo el mismo error en Windows usando virtualenv 1.8.2. También problemas similares con 1.9 y 1.10. Lo que funcionó para mí fue ejecutarlo una vez para hacer el directorio, copiar los archivos que faltaban, y luego volver a ejecutarlo para completarlo.
virtualenv -p c:\bin\pypy\pypy.exe pypy
copy c:\bin\pypy\lib_pypy \virtualenvs\pypy
copy c:\bin\pypy\lib-python \virtualenvs\pypy
virtualenv -p c:\bin\pypy\pypy.exe pypy
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2015-06-15 05:30:14
Con pypy-4.0.1 y virtualenv 14.0.3, fuera de la caja obtengo un error:
Q:\>c:\pypy\bin\virtualenv -p c:\pypy\pypy.exe my_pypy_virtualenv
Already using interpreter c:\pypy\pypy.exe
New pypy executable in Q:\my_pypy_virtualenv\bin\pypy.exe
debug: OperationError:
debug: operror-type: ImportError
debug: operror-value: No module named UserDict
ERROR: The executable Q:\my_pypy_virtualenv\bin\pypy.exe is not functioning
ERROR: It thinks sys.prefix is u'q:\\' (should be u'q:\\my_pypy_virtualenv')
ERROR: virtualenv is not compatible with this system or executable
Note: some Windows users have reported this error when they installed Python for "Only this user" or have multiple versions of Python installed. Copying the appropriate PythonXX.dll to the virtualenv Scripts/ directory may fix this problem.
Buscando UserDict*
en la instalación original de pypy, encontré UserDict.py
en lib-python\2.7
pero en el lib-python\2.7
de virtualenv solo había userdict.py
y ninguno de los archivos User
en mayúscula. Siguiendo el ejemplo de las otras soluciones, eliminé el userdict.py
de virtualenv y copié los archivos User*
originales, y volví a escanear el comando virtualenv
, y se ejecutó sin error.
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2016-01-31 04:47:25