Search code examples
pythonpipscrapyeasy-install

Installing pip using python interpreter


I am reasonably new to the inner workings of Python.

I have been trying to solve the error seen here, Scrapy on Windows XP ImportError: No module named w3lib.html

I installed easy_install so I could re-install Scrapy but I could not get it to do anything. I can import easy_install in, but then I expected to be able to run something like easy_install /my_downloads/OtherPackage-3.2.1-py2.3.egg or easy_install http://example.com/path/to/MyPackage-1.2.3.tgz to get one of the dependencies installed, but obviously I'm doing it wrong.

I also do not know how to get pip installed from here http://www.pip-installer.org/en/latest/installing.html#using-the-installer

I guess my question is how do I run commands such as below? $ curl https://raw.github.com/pypa/pip/master/contrib/get-pip.py | python

I am using the latest free enthought package and I thought either the pylab interface or the python.exe would let me run this command. I guess I am just looking for a link or rundown on how to use the interpreter an install the required packages to solve the original problem.

Thanks for any help


Solution

  • to get easy_install, you want to install setuptools for windows using the executable installer provided here: http://pypi.python.org/pypi/setuptools

    for example, if you are running Python 2.7 on 32-bit windows, the installer would be: setuptools-0.6c11.win32-py2.7.exe.

    This will install setuptools, which places easy_install.exe in your C:\Python27\Scripts directory.

    after it is installed, you could install pip (or any package from PyPI), like this:

    C:\Python27\Scripts\easy_install pip