0

How does one install packages via easy_install? I don't want to use virtual environments.

One would think I can do this

easy_install --prefix=/opt/pypy/site-packages pytz

But I get the below:

easy_install --prefix=/opt/pypy/site-packages pytz
TEST FAILED: /opt/pypy/site-packages/lib/python2.7/site-packages does NOT support .pth files
error: bad install directory or PYTHONPATH

You are attempting to install a package to a directory that is not
on PYTHONPATH and which Python does not read ".pth" files from.  The
installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:

    /opt/pypy/site-packages/lib/python2.7/site-packages

and your PYTHONPATH environment variable currently contains:

    ':/fu/classes'

Here are some of your options for correcting the problem:

* You can choose a different installation directory, i.e., one that is
  on PYTHONPATH or supports .pth files

* You can add the installation directory to the PYTHONPATH environment
  variable.  (It must then also be on PYTHONPATH whenever you run
  Python and want to use the package(s) you are installing.)

* You can set up the installation directory to support ".pth" files by
  using one of the approaches described here:

  https://pythonhosted.org/setuptools/easy_install.html#custom-installation-locations

Please make the appropriate changes for your system and try again.
Tampa
  • 75,446
  • 119
  • 278
  • 425
  • Did you read: http://stackoverflow.com/questions/8655138/easy-install-with-pypy-while-python-is-installed ? – Bakuriu Dec 30 '14 at 12:04
  • yes. links to another question and that did not work using distribute_setup.py – Tampa Dec 31 '14 at 06:25
  • in the title: "cython": did you mean "cpython"? If so it would be less confusing to fix it. – Armin Rigo Dec 31 '14 at 17:11
  • Any reason why you prefer `easy_install` over `pip`? And in my opinion `I don't want to use virtual environments.` sounds wrong :). Anyway, `/opt/pypy/bin/python -m easy_install pytz` should do the trick. – cel Jan 02 '15 at 07:36

0 Answers0