Skip to content

Instantly share code, notes, and snippets.

@nickedes
Last active August 29, 2015 14:15
Show Gist options
  • Save nickedes/7af2037206ac956552ec to your computer and use it in GitHub Desktop.
Save nickedes/7af2037206ac956552ec to your computer and use it in GitHub Desktop.
Error in pip3
nickedes@nickedes ~> sudo apt-get purge python-setuptools python3-setuptools python-pip python3-pip
[sudo] password for nickedes: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package 'python-pip' is not installed, so not removed
The following packages were automatically installed and are no longer required:
  gir1.2-nemo-3.0 libboost-python1.54.0 libcryptui0a libgtksourceview2.0-0
  libgtksourceview2.0-common libjs-jquery libjs-sphinxdoc libjs-underscore
  libsqlite0 meld pastebinit python-appindicator python-colorama
  python-distlib python-gpgme python-gtksourceview2 python-html5lib
  python-kaa-base python-kaa-metadata python-mutagen python-nemo
  python-pyexiv2 python-pyexiv2-doc python-pypdf python-sqlite
  python-stevedore python-support python3-colorama python3-distlib
  python3-html5lib seahorse-daemon virtualenv-clone
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
  python-setuptools* python3-pip* python3-setuptools*
0 upgraded, 0 newly installed, 3 to remove and 66 not upgraded.
After this operation, 1,993 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 196743 files and directories currently installed.)
Removing python-setuptools (3.3-1ubuntu1) ...
dpkg: warning: while removing python-setuptools, directory '/usr/lib/python2.7/dist-packages/setuptools-3.3.egg-info' not empty so not removed
Removing python3-pip (1.5.4-1) ...
Removing python3-setuptools (3.3-1ubuntu1) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
nickedes@nickedes ~> sudo apt-get install python-setuptools python3-setuptools python-pip python3-pip
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  gir1.2-nemo-3.0 libboost-python1.54.0 libcryptui0a libgtksourceview2.0-0
  libgtksourceview2.0-common libjs-jquery libjs-sphinxdoc libjs-underscore
  libsqlite0 meld pastebinit python-appindicator python-gpgme
  python-gtksourceview2 python-kaa-base python-kaa-metadata python-mutagen
  python-nemo python-pyexiv2 python-pyexiv2-doc python-pypdf python-sqlite
  python-stevedore python-support seahorse-daemon virtualenv-clone
Use 'apt-get autoremove' to remove them.
Recommended packages:
  python-dev-all
The following NEW packages will be installed:
  python-pip python-setuptools python3-pip python3-setuptools
0 upgraded, 4 newly installed, 0 to remove and 66 not upgraded.
Need to get 97.7 kB/553 kB of archives.
After this operation, 2,472 kB of additional disk space will be used.
Get:1 http://in.archive.ubuntu.com/ubuntu/ trusty/universe python-pip all 1.5.4-1 [97.7 kB]
Fetched 97.7 kB in 4s (22.8 kB/s)     
Selecting previously unselected package python-setuptools.
(Reading database ... 196519 files and directories currently installed.)
Preparing to unpack .../python-setuptools_3.3-1ubuntu1_all.deb ...
Unpacking python-setuptools (3.3-1ubuntu1) ...
Selecting previously unselected package python-pip.
Preparing to unpack .../python-pip_1.5.4-1_all.deb ...
Unpacking python-pip (1.5.4-1) ...
Selecting previously unselected package python3-setuptools.
Preparing to unpack .../python3-setuptools_3.3-1ubuntu1_all.deb ...
Unpacking python3-setuptools (3.3-1ubuntu1) ...
Selecting previously unselected package python3-pip.
Preparing to unpack .../python3-pip_1.5.4-1_all.deb ...
Unpacking python3-pip (1.5.4-1) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Setting up python-setuptools (3.3-1ubuntu1) ...
Setting up python-pip (1.5.4-1) ...
Setting up python3-setuptools (3.3-1ubuntu1) ...
Setting up python3-pip (1.5.4-1) ...
nickedes@nickedes ~> pip3
Traceback (most recent call last):
  File "/usr/bin/pip3", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/local/lib/python3.4/dist-packages/pkg_resources.py", line 989
    mode = ((os.stat(tempname).st_mode) | 0555) & 07777
                                             ^
nickedes@nickedes ~> pip

Usage:   
  pip <command> [options]

Commands:
  install                     Install packages.
  uninstall                   Uninstall packages.
  freeze                      Output installed packages in requirements format.
  list                        List installed packages.
  show                        Show information about installed packages.
  search                      Search PyPI for packages.
  wheel                       Build wheels from your requirements.
  zip                         DEPRECATED. Zip individual packages.
  unzip                       DEPRECATED. Unzip individual packages.
  help                        Show help for commands.

General Options:
  -h, --help                  Show help.
  --isolated                  Run pip in an isolated mode, ignoring environment variables and user configuration.
  -v, --verbose               Give more output. Option is additive, and can be used up to 3 times.
  -V, --version               Show version and exit.
  -q, --quiet                 Give less output.
  --log <path>                Path to a verbose appending log.
  --proxy <proxy>             Specify a proxy in the form [user:passwd@]proxy.server:port.
  --retries <retries>         Maximum number of retries each connection should attempt (default 5 times).
  --timeout <sec>             Set the socket timeout (default 15 seconds).
  --exists-action <action>    Default action when a path already exists: (s)witch, (i)gnore, (w)ipe, (b)ackup.
  --trusted-host <hostname>   Mark this host as trusted, even though it does not have valid or any HTTPS.
  --cert <path>               Path to alternate CA bundle.
  --client-cert <path>        Path to SSL client certificate, a single file containing the private key and the certificate in PEM format.
  --cache-dir <dir>           Store the cache data in <dir>.
  --no-cache-dir              Disable the cache.
  --disable-pip-version-check
                              Don't periodically check PyPI to determine whether a new version of pip is available for download. Implied with --no-index.
nickedes@nickedes ~> 
@nickedes
Copy link
Author

As you can see, the bug is only with pip3 while pip is working just fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment