3

I am getting No files/directories in /tmp/* errors while I try to install any package on my Ubuntu 18.04.2 LTS/ Python 3.6.8 / Python 2.7.15+ machine.

For instance,

pip install pyx
Collecting pyx
  Using cached https://files.pythonhosted.org/packages/f7/25/59c136568c1b61ee087155c874fcd9f7196a943a6a5ee3429efeb30ea2a8/PyX-0.15.tar.gz
No files/directories in /tmp/pip-build-nRurCC/pyx/pip-egg-info (from PKG-INFO)

This happens for every package I am trying to install.

  • sudo is not helping.
  • Solution presented here, using --no-cache-dir option, is not helping.

Output of running the pip install command with vvv option gives the following output.

No files/directories in /tmp/pip-build-VU1cex/pyx/pip-egg-info (from PKG-INFO)
Exception information:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 342, in run
    requirement_set.prepare_files(finder)
  File "/usr/lib/python2.7/dist-packages/pip/req/req_set.py", line 380, in prepare_files
    ignore_dependencies=self.ignore_dependencies))
  File "/usr/lib/python2.7/dist-packages/pip/req/req_set.py", line 634, in _prepare_file
    abstract_dist.prep_for_dist()
  File "/usr/lib/python2.7/dist-packages/pip/req/req_set.py", line 129, in prep_for_dist
    self.req_to_install.run_egg_info()
  File "/usr/lib/python2.7/dist-packages/pip/req/req_install.py", line 455, in run_egg_info
    metadata_name = canonicalize_name(self.pkg_info()["Name"])
  File "/usr/lib/python2.7/dist-packages/pip/req/req_install.py", line 533, in pkg_info
    data = self.egg_info_data('PKG-INFO')
  File "/usr/lib/python2.7/dist-packages/pip/req/req_install.py", line 471, in egg_info_data
    filename = self.egg_info_path(filename)
  File "/usr/lib/python2.7/dist-packages/pip/req/req_install.py", line 515, in egg_info_path
    'No files/directories in %s (from %s)' % (base, filename)
InstallationError: No files/directories in /tmp/pip-build-VU1cex/pyx/pip-egg-info (from PKG-INFO)
kingmakerking
  • 2,017
  • 2
  • 28
  • 44

3 Answers3

7

I think it is an upstream issue I tried multiple things even installing using the latest commit pip install git+https://github.com/pyx-project/pyx.git@fc66c078727b02693b122ad346b9fa5472e06eb7, please try this version: pip install PyX==0.12 it should work.

dejanualex
  • 3,872
  • 6
  • 22
  • 37
1

If using pip 6.0 or newer, check if it works with the --no-cache-dir option.

You can also try to get a detailed output from pip using the -vvv argument

Source: https://stackoverflow.com/a/9510610/2542835

1

Apparently pip3 install x works for me. pip install x does not.

geoyws
  • 3,326
  • 3
  • 35
  • 47