GRAYBYTE WORDPRESS FILE MANAGER2244

Server IP : 198.54.121.189 / Your IP : 216.73.216.112
System : Linux premium69.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
PHP Version : 7.4.33
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Directory : /opt/alt/python34/share/doc/alt-python34-pip/docs/
Upload Files :
Current_dir [ Not Writeable ] Document_root [ Writeable ]

Command :


Current File : /opt/alt/python34/share/doc/alt-python34-pip/docs//distribute_setuptools.rst
:orphan:

"ImportError: No module named setuptools"
+++++++++++++++++++++++++++++++++++++++++

Although using ``pip install --upgrade setuptools`` to upgrade from distribute
to setuptools works in isolation, it's possible to get "ImportError: No module
named setuptools" when using pip<1.4 to upgrade a package that depends on
setuptools or distribute.

e.g. when running a command like this:  `pip install --upgrade pyramid`

Solution
~~~~~~~~

To prevent the problem in *new* environments (that aren't broken yet):

* Option 1:

 * *First* run `pip install -U setuptools`,
 * *Then* run the command to upgrade your package (e.g. `pip install --upgrade pyramid`)

* Option 2:

 * Upgrade pip using :ref:`get-pip <get-pip>`
 * *Then* run the command to upgrade your package (e.g. `pip install --upgrade pyramid`)

To fix the problem once it's occurred, you'll need to manually install the new
setuptools, then rerun the upgrade that failed.

1. Download `ez_setup.py` (https://bitbucket.org/pypa/setuptools/downloads/ez_setup.py)
2. Run `python ez_setup.py`
3. Then rerun your upgrade (e.g. `pip install --upgrade pyramid`)


Cause
~~~~~

distribute-0.7.3 is just an empty wrapper that only serves to require the new
setuptools (setuptools>=0.7) so that it will be installed. (If you don't know
yet, the "new setuptools" is a merge of distribute and setuptools back into one
project).

distribute-0.7.3 does its job well, when the upgrade is done in isolation.
E.g. if you're currently on distribute-0.6.X, then running `pip install -U
setuptools` works fine to upgrade you to setuptools>=0.7.

The problem occurs when:

1. you are currently using an older distribute (i.e. 0.6.X)
2. and you try to use pip to upgrade a package that *depends* on setuptools or
   distribute.

As part of the upgrade process, pip builds an install list that ends up
including distribute-0.7.3 and setuptools>=0.7 , but they can end up being
separated by other dependencies in the list, so what can happen is this:

1.  pip uninstalls the existing distribute
2.  pip installs distribute-0.7.3 (which has no importable setuptools, that pip
    *needs* internally to function)
3.  pip moves on to install another dependency (before setuptools>=0.7) and is
    unable to proceed without the setuptools package

Note that pip v1.4 has fixes to prevent this.  distribute-0.7.3 (or
setuptools>=0.7) by themselves cannot prevent this kind of problem.


.. _setuptools: https://pypi.python.org/pypi/setuptools
.. _distribute: https://pypi.python.org/pypi/distribute

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
March 03 2024 22:37:25
root / linksafe
0755
reference
--
March 03 2024 22:37:25
root / linksafe
0755
configuration.rst
0.104 KB
May 17 2014 02:19:02
root / linksafe
0644
cookbook.rst
0.11 KB
May 17 2014 02:19:02
root / linksafe
0644
development.rst
4.353 KB
May 17 2014 02:19:02
root / linksafe
0644
distribute_setuptools.rst
2.479 KB
May 17 2014 02:18:55
root / linksafe
0644
index.rst
0.513 KB
May 17 2014 02:19:02
root / linksafe
0644
installing.rst
1.941 KB
May 17 2014 02:19:02
root / linksafe
0644
logic.rst
0.136 KB
May 17 2014 02:18:55
root / linksafe
0644
news.rst
0.069 KB
May 17 2014 02:18:55
root / linksafe
0644
quickstart.rst
0.997 KB
May 17 2014 02:18:55
root / linksafe
0644
usage.rst
0.12 KB
May 17 2014 02:19:02
root / linksafe
0644
user_guide.rst
15.062 KB
May 17 2014 02:19:02
root / linksafe
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF