easy_install with pypy while Python is installed
Asked Answered
O

3

8

I installed PyPy while still having Python 2.7 on my system.

  • How do I install and then use easy_install with PyPy?
  • What is the syntax for distinguishing where I want to install to with easy_install?
  • Should I set any environment variables for ease of use?

I'm on Windows, but these questions seem relevant for all platform...

Ortega answered 28/12, 2011 at 11:9 Comment(0)
S
5

You need to install easy_install for pypy manually.

It's explained in the answer to this question : Installing Python eggs under PyPy

Sail answered 28/12, 2011 at 14:40 Comment(1)
If you have python's executable in your path, use pypy [whatever] syntax for all installations so that it will install under pypy and not pythonOrtega
S
5

An alternative solution is to install pip. Following the instructions in pip's documentation:

wget https://bootstrap.pypa.io/get-pip.py
pypy get-pip.py
pypy -m pip install ipython
Sewole answered 1/3, 2015 at 3:35 Comment(3)
Prefixing with sudo is generally needed.Ligneous
@EOL: running pip as root is not recommended. Running with --user or in a virtualenv is a much less horrible idea.Botfly
This is true unless you want to install Python packages for all users, right? or is there officially a better method (beyond using a general package manager when possible)?Ligneous
S
2

At least this worked for me:

$ brew install pypy
$ pypy -m easy_install ipython

$ /usr/local/share/pypy/ipython
Python 2.7.3 (480845e6b1dd, Jul 31 2013, 10:58:28)
Type "copyright", "credits" or "license" for more information.

IPython 1.1.0 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.
Sparklesparkler answered 2/11, 2013 at 7:18 Comment(1)
This may work, but I haven’t seen any recommendations for using easy_install that weren’t written several years ago. For the past ≈2 years, setuptools has been the unifying standard. (Before that was a competition between setuptools and distribute; they eventually merged into the current setuptools.) I’m less familiar with pypy (and whether it needs something Pythons 2 & 3 don’t), but it’s worth double-checking this, just in case.Rosecan

© 2022 - 2024 — McMap. All rights reserved.