easy-install

How can I install Python modules programmatically / through a Python script?

二次信任 提交于 2019-11-26 11:17:13
问题 Can I download and install Python modules from PyPi strictly inside a script, without using a shell at all ? I use a non-standard Python environment, Autodesk Maya\'s Python interpreter. This does not come with \"easy_install,\" and there is no \"shell,\" only a python script interpreter invoked by the main Maya executable. Copying and pasting ez_setup.py\'s contents into the script editor window and running it correctly installs an easy_install somewhere into Maya\'s directory, but the

setup.py: restrict the allowable version of the python interpreter

雨燕双飞 提交于 2019-11-26 09:47:11
问题 I have a python library. Unfortunately I have not updated it to work with python 3 yet. in its setup.py, I added install_requires=[\'python<3\'], My intent was to not allow this package to be installed / used under python 3, because I know it doesn\'t (yet) work. I don\'t think this is the right way to do it, because pip then tries to download and install python 2.7.3 (which is already the installed version!). How should I specify my library dependency on a particular range of python

How do I remove packages installed with Python&#39;s easy_install?

大城市里の小女人 提交于 2019-11-26 09:21:56
Python's easy_install makes installing new packages extremely convenient. However, as far as I can tell, it doesn't implement the other common features of a dependency manager - listing and removing installed packages. What is the best way of finding out what's installed, and what is the preferred way of removing installed packages? Are there any files that need to be updated if I remove packages manually (e.g. by rm /usr/local/lib/python2.6/dist-packages/my_installed_pkg.egg or similar)? pip , an alternative to setuptools/easy_install, provides an "uninstall" command. Install pip according to

Why is Python easy_install not working on my Mac?

ぐ巨炮叔叔 提交于 2019-11-26 08:47:28
问题 I have a Mac running Python 2.6. When I try to use easy_install I get this message: /usr/bin/easy_install-2.6:7: UserWarning: Module pkg_resources was already imported from /System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/pkg_resources.pyc, but /Library/Python/2.6/site-packages is being added to sys.path from pkg_resources import load_entry_point /usr/bin/easy_install-2.6:7: UserWarning: Module site was already imported from /System/Library/Frameworks/Python

Can I use `pip` instead of `easy_install` for `python setup.py install` dependency resolution?

余生颓废 提交于 2019-11-26 08:46:01
问题 python setup.py install will automatically install packages listed in requires=[] using easy_install . How do I get it to use pip instead? 回答1: Yes you can. You can install a package from a tarball or a folder, on the web or your computer. For example: Install from tarball on web pip install https://pypi.python.org/packages/source/r/requests/requests-2.3.0.tar.gz Install from local tarball wget https://pypi.python.org/packages/source/r/requests/requests-2.3.0.tar.gz pip install requests-2.3.0

pip issue installing almost any library

帅比萌擦擦* 提交于 2019-11-26 06:59:38
问题 I have a difficult time using pip to install almost anything. I\'m new to coding, so I thought maybe this is something I\'ve been doing wrong and have opted out to easy_install to get most of what I needed done, which has generally worked. However, now I\'m trying to download the nltk library, and neither is getting the job done. I tried entering sudo pip install nltk but got the following response: /Library/Frameworks/Python.framework/Versions/2.7/bin/pip run on Sat May 4 00:15:38 2013

Find all packages installed with easy_install/pip?

試著忘記壹切 提交于 2019-11-26 06:53:02
问题 Is there a way to find all Python PyPI packages that were installed with easy_install or pip? I mean, excluding everything that was/is installed with the distributions tools (in this case apt-get on Debian). 回答1: pip freeze will output a list of installed packages and their versions. It also allows you to write those packages to a file that can later be used to set up a new environment. https://pip.pypa.io/en/stable/reference/pip_freeze/#pip-freeze 回答2: As of version 1.3 of pip you can now

ImportError: No module named PIL

痴心易碎 提交于 2019-11-26 06:14:01
问题 I use this command in the shell to install PIL: easy_install PIL then I run python and type this: import PIL . But I get this error: Traceback (most recent call last): File \"<console>\", line 1, in <module> ImportError: No module named PIL I\'ve never had such problem, what do you think? 回答1: On some installs of PIL, You must do import Image instead of import PIL (PIL is in fact not always imported this way). Since import Image works for you, this means that you have in fact installed PIL.

Installing SetupTools on 64-bit Windows

泪湿孤枕 提交于 2019-11-26 05:57:11
问题 I\'m running Python 2.7 on Windows 7 64-bit, and when I run the installer for setuptools it tells me that Python 2.7 is not installed. The specific error message is: `Python Version 2.7 required which was not found in the registry` My installed version of Python is: `Python 2.7 (r27:82525, Jul 4 2010, 07:43:08) [MSC v.1500 64 bit (AMD64)] on win32` I\'m looking at the setuptools site and it doesn\'t mention any installers for 64-bit Windows. Have I missed something or do I have to install

How to install lxml on Ubuntu

做~自己de王妃 提交于 2019-11-26 05:36:09
I'm having difficulty installing lxml with easy_install on Ubuntu 11. When I type $ easy_install lxml I get: Searching for lxml Reading http://pypi.python.org/simple/lxml/ Reading http://codespeak.net/lxml Best match: lxml 2.3 Downloading http://lxml.de/files/lxml-2.3.tgz Processing lxml-2.3.tgz Running lxml-2.3/setup.py -q bdist_egg --dist-dir /tmp/easy_install-7UdQOZ/lxml-2.3/egg-dist-tmp-GacQGy Building lxml version 2.3. Building without Cython. ERROR: /bin/sh: xslt-config: not found ** make sure the development packages of libxml2 and libxslt are installed ** Using build configuration of