Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to create virtualenv with pypy?

running the following command

virtualenv -p /usr/local/bin/pypy pypy 

exits with error like

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 

I'm running Mac OS X 10.8.1 (Mountain Lion) with CPython 2.7.3 and installed pypy 1.9 using Brew. virtualenv's version is 1.8.4

Using pre-built pypy binary for Mac OS X downloaded directly from pypy's website doesn't make any difference

like image 419
minorblend Avatar asked Nov 27 '12 06:11

minorblend


People also ask

How do you use pip PyPy?

The easiest way to install pip for PyPy on any operating system is to use the ensurepip package that comes with Python and PyPy by default. Pip can now be installed by doing the following: Download the latest version of get-pip.py from https://bootstrap.pypa.io/.

How do you create a virtual environment?

To create a virtual environment, go to your project's directory and run venv. If you are using Python 2, replace venv with virtualenv in the below commands. The second argument is the location to create the virtual environment. Generally, you can just create this in your project and call it env .

Does pandas work with PyPy?

Looking back, PyPy did not have support for Pandas and NumPy a couple of years ago, but it supports them now. So, there is a possibility that more libraries will support or be supported by PyPy in the future, but definitely not in near future.


1 Answers

This appears to be a regression in 1.8.4. While trying this out on my system everything worked fine with virtualenv 1.8.2, then I upgraded and now I get the same error as you.

like image 149
Michael Merickel Avatar answered Oct 13 '22 06:10

Michael Merickel