Lines Matching +full:packages +full:- +full:dir
9 use-case.
13 packages.
17 <http://mail.python.org/pipermail/distutils-sig/>`_. (Note: please DO NOT send
19 mailing list is a searchable archive of previously-asked and answered
21 bug -- and then do so via list discussion first.)
24 own packages work better with EasyInstall, or provide EasyInstall-like features
35 -------------------------
45 are installing to Python's primary ``site-packages`` directory. If this is
51 internet. If you are behind an NTLM-based firewall that prevents Python
57 can restrict it from doing so with the ``--allow-hosts`` option; see the
58 sections on `restricting downloads with --allow-hosts`_ and `command-line
67 cause is that you installed to a location other than ``site-packages``,
70 make sure that your custom location will work correctly. Then re-install.
73 packages, but then you can't import them, the most likely issue is that you
74 installed EasyInstall correctly but are using it to install packages to a
75 non-standard location that hasn't been properly prepared. Again, see the
89 ------------------------------------
104 easy_install -f http://pythonpaste.org/package_index.html SQLObject
109 easy_install http://example.com/path/to/MyPackage-1.2.3.tgz
111 **Example 4**. Install an already-downloaded .egg file::
113 easy_install /my_downloads/OtherPackage-3.2.1-py2.3.egg
115 **Example 5**. Upgrade an already-installed package to the latest version
118 easy_install --upgrade PyProtocols
127 ``~/projects/sqlobject`` (the name will always be in all-lowercase), where it
130 and Viewing Source Packages`_ below for more info.)::
132 easy_install --editable --build-directory ~/projects SQLObject
134 **Example 7**. (New in 0.6.11) Install a distribution within your home dir::
136 easy_install --user SQLAlchemy
144 .tar.bz2, or .zip. And of course it handles already-built .egg
147 By default, packages are installed to the running Python installation's
148 ``site-packages`` directory, unless you provide the ``-d`` or ``--install-dir``
157 installed package. You can override this using the ``-s`` or ``--script-dir``
160 Installed packages are added to an ``easy-install.pth`` file in the install
161 directory, so that Python will always use the most-recently-installed version
163 runtime, you should use the ``-m`` or ``--multi-version`` option.
167 -------------------
180 easy_install --upgrade SomePackage
184 easy_install -f http://example.com/downloads ExamplePackage
186 easy_install http://example.com/downloads/ExamplePackage-2.0-py2.4.egg
188 easy_install my_downloads/ExamplePackage-2.0.tgz
190 If you're using ``-m`` or ``--multi-version`` , using the ``require()``
193 the only step needed to upgrade such packages.
196 directory (and not using ``-m``), installing a package automatically replaces
197 any previous version in the ``easy-install.pth`` file, so that Python will
198 import the most-recently installed version by default. So, again, installing
201 If you haven't suppressed script installation (using ``--exclude-scripts`` or
202 ``-x``), then the upgraded version's scripts will be installed, and they will
204 package, so that you can use them even if they are installed in multi-version
207 ``easy_install`` never actually deletes packages (unless you're installing a
210 Packages`_, below.
214 ---------------------------
216 If you've upgraded a package, but need to revert to a previously-installed
236 active version's scripts, unless the ``--exclude-scripts`` or ``-x`` option is
240 Uninstalling Packages
241 ---------------------
244 the package(s) you don't need by deleting the PackageName-versioninfo.egg file
250 easy_install -m PackageName
258 ----------------
262 you tell it not to with ``-x`` or ``--exclude-scripts``. If any scripts in
272 of a script available, however, you can simply use the ``--multi-version`` or
273 ``-m`` option, and rename the scripts that EasyInstall creates. This works
282 easy_install -m docutils==0.3.9
286 easy_install -m docutils==0.3.10
290 different version of the package. (Notice that we used ``-m`` for both
292 recently-installed version of the package.)
296 -------------------------
316 `Command-Line Options`_ and `Configuration Files`_. During installation,
317 pass command line options (such as ``--script-dir``) to control where
354 -----------------
360 ``easy_install`` and ``easy_install-N.N``, where ``N.N`` is the Python version
362 2.7, you can use the ``easy_install-3.2`` or ``easy_install-2.7`` scripts to
363 install packages for the respective Python version.
366 invoked using ``python -m easy_install`` for any Python with Setuptools
369 Restricting Downloads with ``--allow-hosts``
372 You can use the ``--allow-hosts`` (``-H``) option to restrict what domains
373 EasyInstall will look for links and downloads on. ``--allow-hosts=None``
376 on `Command-Line Options`_ for more details on the ``--allow-hosts`` option.
381 .. code-block:: ini
391 Installing on Un-networked Machines
394 Just copy the eggs or source packages you need to a directory on the target
395 machine, then use the ``-f`` or ``--find-links`` option to specify that
398 easy_install -H None -f somedir SomePackage
400 will attempt to install SomePackage using only eggs and source packages found
405 (or if the packages aren't platform-specific), you can create the directory of
408 easy_install -zmaxd somedir SomePackage
410 This will tell EasyInstall to put zipped eggs or source packages for
413 target machine. (``-z`` means zipped eggs, ``-m`` means multi-version, which
414 prevents .pth files from being used, ``-a`` means to copy all the eggs needed,
415 even if they're installed elsewhere on the machine, and ``-d`` indicates the
418 You can also build the eggs from local development packages that were installed
419 with the ``setup.py develop`` command, by including the ``-l`` option, e.g.::
421 easy_install -zmaxld somedir SomePackage
423 This will use locally-available source distributions to build the eggs.
430 EasyInstall to build eggs for a project. You'll want to use the ``--zip-ok``,
431 ``--exclude-scripts``, and possibly ``--no-deps`` options (``-z``, ``-x`` and
432 ``-N``, respectively). Use ``-d`` or ``--install-dir`` to specify the location
438 wrap it in an egg by tacking an ``#egg=name-version`` suffix on the file's URL.
441 easy_install -f "http://some.example.com/downloads/foo.py#egg=foo-1.0" foo
445 easy_install -zmaxd. \
446 -f "http://some.example.com/downloads/foo.py#egg=foo-1.0" foo
455 find download links on most any web page whose URL is given to the ``-f``
456 (``--find-links``) option. In the simplest case, you can simply have a web
457 page with links to eggs or Python source packages, even an automatically
464 .. code-block:: ini
475 or PyPI mirror. See the ``--index-url`` option under `Command-Line Options`_,
479 Password-Protected Sites
480 ------------------------
482 If a site you want to download from is password-protected using HTTP "Basic"
492 -------------------------
496 repository of packages may already have defined access credentials for
497 uploading packages according to the distutils documentation. ``easy_install``
505 them to configure build options for packages that it installs from source. For
509 .. code-block:: ini
518 default compiler for *all* packages you build. See `Configuration Files`_
523 Editing and Viewing Source Packages
528 you want to be able to examine these files, you can use the ``--editable``
531 as a subdirectory of the ``--build-directory`` you specify. If you then wish
535 Note that using ``--editable`` stops EasyInstall from actually building or
543 In order to use ``--editable`` (``-e`` for short), you *must* also supply a
544 ``--build-directory`` (``-b`` for short). The project will be placed in a
546 name as the project itself, but in all-lowercase. If a file or directory of
549 Also, when using ``--editable``, you cannot use URLs or filenames as arguments.
553 ``--find-links`` item (``-f`` for short), and then also specify
556 easy_install -eb ~/projects \
557 -fhttp://prdownloads.sourceforge.net/ctypes/ctypes-0.9.6.tar.gz?download \
567 old or system-installed packages, and without ignoring the issue. Instead,
569 code added to the ``easy-install.pth`` file. So, if you are using version
575 However, packages that were not installed by EasyInstall are "unmanaged",
582 install``, because the ``distutils`` just install new packages on top of old
583 ones, possibly combining two unrelated packages or leaving behind modules that
591 delete these conflicting files and directories and re-run EasyInstall.
593 Of course, once you've replaced all of your existing "unmanaged" packages with
601 EasyInstall tries to install packages in zipped form, if it can. Zipping
602 packages can improve Python's overall import performance if you're not using
603 the ``--multi-version`` option, because Python processes zipfile entries on
606 As of version 0.5a9, EasyInstall analyzes packages to determine whether they
609 ``--zip-ok`` option.)
619 * Top-level modules that might be scripts used with ``python -m`` (Python 2.4)
623 a directory instead. You can override this analysis with the ``-zip-ok`` flag,
625 you can use the ``--always-unzip`` flag, in which case EasyInstall will always
638 own analysis. However, your command-line option, if any, will still override
646 -------------------
653 then a ``~/.pydistutils.cfg`` or ``$HOME\\pydistutils.cfg`` (on Unix-like OSes
657 .. code-block:: ini
661 # set the default location to install packages
665 # value; this is especially useful for the "--find-links"
682 location of distutils configuration files <https://docs.python.org/install/index.html#inst-config-f…
688 Command-Line Options
689 --------------------
691 ``--zip-ok, -z``
692 Install all packages as zip files, even if they are marked as unsafe for
694 of a non-setuptools package is too conservative, but keep in mind that
698 ``--always-unzip, -Z``
699 Don't install any packages as zip files, even if the packages are marked
707 (Note: the ``-z/-Z`` options only affect the installation of newly-built
708 or downloaded packages that are not already installed in the target
711 version first, and re-run EasyInstall.)
713 ``--multi-version, -m``
714 "Multi-version" mode. Specifying this option prevents ``easy_install`` from
715 adding an ``easy-install.pth`` entry for the package being installed, and
717 upon successful installation. In multi-version mode, no specific version of
725 which will put the latest installed version of the specified packages on
731 installing to a non-PYTHONPATH, non-"site" directory. You must always
734 ``--upgrade, -U`` (New in 0.5a4)
738 ``--upgrade`` or ``-U`` flag, EasyInstall will always check the package
739 index and ``--find-links`` URLs before selecting a version to install. In
744 ``--install-dir=DIR, -d DIR``
752 location is used. Normally, this would be the ``site-packages`` directory,
756 ``--prefix`` option.
758 ``--script-dir=DIR, -s DIR``
761 an ``--install-dir`` (via command line or config file), then this option
767 ``--exclude-scripts, -x``
772 ``--user`` (New in 0.6.11)
773 Use the user-site-packages as specified in :pep:`370`
774 instead of the global site-packages.
776 ``--always-copy, -a`` (New in 0.5a4)
792 ``--find-links=URLS_OR_FILENAMES, -f URLS_OR_FILENAMES``
799 because it doesn't exist locally, or because ``--upgrade`` or ``-U`` was
803 Eggs and archives found by way of ``--find-links`` are only downloaded if
805 to unneeded packages are ignored.
807 If all requested packages can be found using links on the specified
809 also specified the ``--upgrade`` or ``-U`` option.
825 package not being available locally, or due to the use of the ``--update``
826 or ``-U`` option.
828 ``--no-find-links`` Blocks the addition of any link.
831 dependency). When used, ``--find-links`` is ignored.
835 ``--index-url=URL, -i URL`` (New in 0.4a1; default changed in 0.6c7)
838 that is not locally available or linked from a ``--find-links`` download
843 ``--editable, -e`` (New in 0.6a1)
845 unpacking them to subdirectories of the specified ``--build-directory``.
848 `Editing and Viewing Source Packages`_ above for more details.
850 ``--build-directory=DIR, -b DIR`` (UPDATED in 0.6a1)
851 Set the directory used to build source packages. If a package is built
854 same name as the extracted distribution's project, but in all-lowercase.
859 This option is most useful in combination with the ``--editable`` option,
861 install) source distributions. See `Editing and Viewing Source Packages`_,
864 ``--verbose, -v, --quiet, -q`` (New in 0.4a4)
867 relatively time-consuming operations like running a setup script, unpacking
868 an archive, or retrieving a URL. Using ``-q`` or ``--quiet`` drops the
870 warnings, and errors. Using ``-v`` or ``--verbose`` increases the detail
871 level to include individual file-level operations, link analysis messages,
873 the ``-v`` option more than once, the second and subsequent uses are passed
877 ``--dry-run, -n`` (New in 0.4a4)
879 to any setup scripts run, so packages should not actually build either.
883 ``--optimize=LEVEL``, ``-O LEVEL`` (New in 0.4a4)
885 ``--zip-ok`` option, this option controls the optimization level for
892 ``--record=FILENAME`` (New in 0.5a4)
898 ``--site-dirs=DIRLIST, -S DIRLIST`` (New in 0.6a1)
901 as the main Python ``site-packages`` directory. As of 0.6a10, EasyInstall
908 ``--no-deps, -N`` (New in 0.6a6)
910 tools that wrap eggs in a platform-specific packaging system. (We don't
913 ``--allow-hosts=PATTERNS, -H PATTERNS`` (New in 0.6a6)
915 patterns. E.g. ``-H *.python.org`` restricts web access so that only
916 packages listed and downloadable from machines in the ``python.org``
924 access altogether (e.g. ``-Hlocalhost``), or to restrict it to an intranet
927 can't find suitable packages. EasyInstall displays all blocked URLs, so
928 that you can adjust your ``--allow-hosts`` setting if it is more strict
933 ``--prefix=DIR`` (New in 0.6a10)
936 directories will be ``prefix\\Lib\\site-packages`` and ``prefix\\Scripts``,
938 ``prefix/lib/python2.X/site-packages`` (with the appropriate version
941 Note that the ``--prefix`` option only sets the *default* installation and
945 ``--local-snapshots-ok, -l`` (New in 0.6c6)
947 projects, not in-development ones, because such projects may not
948 have a currently-valid version number. So, it usually only installs them
951 However, if this option is used, then any in-development projects that were
953 eggs, effectively upgrading the "in-development" project to a snapshot
955 ``--always-copy`` option to create a distributable snapshot of every egg
959 version number (such as an SVN revision number tag) for any in-development
965 .. _non-root installation:
968 -----------------------------
970 By default, EasyInstall installs python packages into Python's main ``site-packages`` directory,
973 Very often though, a user or developer wants ``easy_install`` to install and manage python packages
976 1. They don't have access to write to the main Python site-packages directory.
978 2. They want a user-specific stash of packages, that is not visible to other users.
980 3. They want to isolate a set of packages to a specific python application, usually to minimize
986 `Use the "--user" option`_
988 `Use the "--user" option and customize "PYTHONUSERBASE"`_
992 …terations, but all of these are effectively deprecated by the User scheme brought in by `PEP-370`_.
994 .. _PEP-370: http://www.python.org/dev/peps/pep-0370/
997 Use the "--user" option
1003 specifying the ``--user`` option to ``setup.py install`` or ``easy_install``.
1004 This approach serves the need to have a user-specific stash of packages.
1006 …which is still available, but requires more effort than the User scheme to get packages recognized.
1008 Use the "--user" option and customize "PYTHONUSERBASE"
1011 variable, which updates the value of ``site.USER_BASE``. To isolate packages to a specific
1013 ``PYTHONUSERBASE``, that contains just those packages.
1017 "virtualenv" is a 3rd-party python package that effectively "clones" a python installation, thereby
1018 creating an isolated location to install packages. The evolution of "virtualenv" started before th…
1021 …installation scheme alone does not provide, e.g. the ability to hide the main python site-packages.
1027 -------------------
1030 EasyInstall to be able to look up and download packages:
1050 identify what parts of a page are index-specific and which are part of the
1055 the 32-character hex MD5 digest. EasyInstall will verify that the
1071 (Note: This requirement is a workaround for the absence of case-insensitive
1074 mechanism), then it is not necessary to include this all-packages listing