WebFaction
Community site: login faq

I am trying to install packages using PIP but it doesn't work for me initially it gives the permission denied error and after that when I tried to use easy_install it gives me this error :->

   Searching for mezzanine
    Reading https://pypi.python.org/simple/mezzanine/
    Reading http://github.com/stephenmcd/mezzanine/
    Reading http://mezzanine.jupo.org/
    Best match: Mezzanine 3.1.8
    Downloading https://pypi.python.org/packages/source/M/Mezzanine/Mezzanine-3.1.8.tar.gz#md5=dcc46016b866ea8de1c87fb9dffd9163
    Processing Mezzanine-3.1.8.tar.gz
    Writing /tmp/easy_install-2cSSS_/Mezzanine-3.1.8/setup.cfg
    Running Mezzanine-3.1.8/setup.py -q bdist_egg --dist-dir /tmp/easy_install-2cSSS_/Mezzanine-3.1.8/egg-dist-tmp-uDjreS
    Traceback (most recent call last):
      File "/usr/local/bin/easy_install", line 8, in ?
        sys.exit(
      File "/usr/local/lib/python2.4/site-packages/setuptools/command/easy_install.py", line 1924, in main
        with_ei_usage(lambda:
      File "/usr/local/lib/python2.4/site-packages/setuptools/command/easy_install.py", line 1911, in with_ei_usage
        return f()
      File "/usr/local/lib/python2.4/site-packages/setuptools/command/easy_install.py", line 1928, in <lambda>
        distclass=DistributionWithoutHelpCommands, **kw
      File "/usr/local/lib/python2.4/distutils/core.py", line 149, in setup
        dist.run_commands()
      File "/usr/local/lib/python2.4/distutils/dist.py", line 946, in run_commands
        self.run_command(cmd)
      File "/usr/local/lib/python2.4/distutils/dist.py", line 966, in run_command
        cmd_obj.run()
      File "/usr/local/lib/python2.4/site-packages/setuptools/command/easy_install.py", line 374, in run
        self.easy_install(spec, not self.no_deps)
      File "/usr/local/lib/python2.4/site-packages/setuptools/command/easy_install.py", line 609, in easy_install
        return self.install_item(spec, dist.location, tmpdir, deps)
      File "/usr/local/lib/python2.4/site-packages/setuptools/command/easy_install.py", line 639, in install_item
        dists = self.install_eggs(spec, download, tmpdir)
      File "/usr/local/lib/python2.4/site-packages/setuptools/command/easy_install.py", line 825, in install_eggs
        return self.build_and_install(setup_script, setup_base)
      File "/usr/local/lib/python2.4/site-packages/setuptools/command/easy_install.py", line 1031, in build_and_install
        self.run_setup(setup_script, setup_base, args)
      File "/usr/local/lib/python2.4/site-packages/setuptools/command/easy_install.py", line 1016, in run_setup
        run_setup(setup_script, args)
      File "/usr/local/lib/python2.4/site-packages/setuptools/sandbox.py", line 68, in run_setup
        DirectorySandbox(setup_dir).run(
      File "/usr/local/lib/python2.4/site-packages/setuptools/sandbox.py", line 120, in run
        return func()
      File "/usr/local/lib/python2.4/site-packages/setuptools/sandbox.py", line 71, in <lambda>
        {'__file__':setup_script, '__name__':'__main__'}
      File "setup.py", line 22
        with open(e, "r") as f:
                ^
    SyntaxError: invalid syntax

####>>>>After this when I again try to use pip then I am getting different error (not permission denied) :

  File "/home/rishi/bin/pip", line 8, in ?
    sys.exit(
  File "/usr/local/lib/python2.4/site-packages/pkg_resources.py", line 357, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/local/lib/python2.4/site-packages/pkg_resources.py", line 2394, in load_entry_point
    return ep.load()
  File "/usr/local/lib/python2.4/site-packages/pkg_resources.py", line 2108, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "/home/rishi/lib/python2.4/pip-1.5.6-py2.4.egg/pip/__init__.py", line 9, in ?
    from pip.log import logger
  File "/home/rishi/lib/python2.4/pip-1.5.6-py2.4.egg/pip/log.py", line 19
    real_consumer = (consumer if not isinstance(consumer, colorama.AnsiToWin32)
                               ^
SyntaxError: invalid syntax

Now I don't know what I am doing wrong , can anybody help me ?

asked 11 Jul '14, 10:35

Inforian
111
accept rate: 0%


You're using easy_install which is installed for Python 2.4. You should use easy_install-2.7 instead, so that the package will install for Python 2.7

Likewise, for pip, it looks like you've installed that for Python 2.4. Reinstall it with "easy_install-2.7 pip" and then run it as "pip-2.7".

More info is available here: Installing Python Packages

Hope that helps!

permanent link

answered 11 Jul '14, 16:20

seanf
12.2k41836
accept rate: 37%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×909
×54
×52

question asked: 11 Jul '14, 10:35

question was seen: 4,612 times

last updated: 11 Jul '14, 16:20

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM