question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

/tmp/pip-build can't be shared by several linux users

See original GitHub issue

A second bug related to the fixed temporary directory /tmp/pip-build.

This does not work if several linux-users use pip.

First user was modwork_egs_d and now the second user modwork_vums_dt tries to use pip:

modwork_vums_dt@workepdevel113:~$ pip install --user pep8
Downloading/unpacking pep8
  Downloading pep8-1.3.3.tar.gz
Exception:
Traceback (most recent call last):
  File "/usr/local/lib/python2.6/site-packages/pip-1.2.1.post1-py2.6.egg/pip/basecommand.py", line 107, in main
    status = self.run(options, args)
  File "/usr/local/lib/python2.6/site-packages/pip-1.2.1.post1-py2.6.egg/pip/commands/install.py", line 263, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "/usr/local/lib/python2.6/site-packages/pip-1.2.1.post1-py2.6.egg/pip/req.py", line 1032, in prepare_files
    self.unpack_url(url, location, self.is_download)
  File "/usr/local/lib/python2.6/site-packages/pip-1.2.1.post1-py2.6.egg/pip/req.py", line 1159, in unpack_url
    retval = unpack_http_url(link, location, self.download_cache, self.download_dir)
  File "/usr/local/lib/python2.6/site-packages/pip-1.2.1.post1-py2.6.egg/pip/download.py", line 481, in unpack_http_url
    unpack_file(temp_location, location, content_type, link)
  File "/usr/local/lib/python2.6/site-packages/pip-1.2.1.post1-py2.6.egg/pip/util.py", line 558, in unpack_file
    untar_file(filename, location)
  File "/usr/local/lib/python2.6/site-packages/pip-1.2.1.post1-py2.6.egg/pip/util.py", line 472, in untar_file
    os.makedirs(location)
  File "/usr/lib64/python2.6/os.py", line 157, in makedirs
    mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/tmp/pip-build/pep8'

Storing complete log in /home/modwork_vums_dt/.config/pip/pip.log

modwork_vums_dt@workepdevel113:~$ ls -l /tmp/pip-build/
-rw-r--r-- 1 modwork_egs_d modwork_egs_d 185 20. Nov 12:27 pip-delete-this-directory.txt

modwork_vums_dt@workepdevel113:~$ pip --version
pip 1.2.1.post1 from /usr/local/lib/python2.6/site-packages/pip-1.2.1.post1-py2.6.egg (python 2.6)

Related: #725

Issue Analytics

  • State:closed
  • Created 11 years ago
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
guettlicommented, Nov 20, 2012

I found a workaround:

export TMPDIR=$HOME/tmp
mkdir -p $TMPDIR
pip install --user ...
1reaction
guettlicommented, Jan 23, 2013

If you can inject code from one user to the next it is a big security problem. But somehow nobody seems to care.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to install a module for all users with pip on linux?
By using the following, the package is installed with root permissions only: $ sudo pip install loremipsum Downloading/unpacking loremipsum ...
Read more >
Installing the Python Connector - Snowflake Documentation
This topic provides instructions for installing the Snowflake Connector for Python. The connector can currently be installed in Linux, macOS, and Windows ...
Read more >
Chapter 4. Managing Users and Groups
This chapter explains how to add, manage, and delete users and groups in the graphical user interface and on the command line, and...
Read more >
Build from source - TensorFlow
Build a TensorFlow pip package from source and install it on Ubuntu Linux and macOS. While the instructions might work for other systems,...
Read more >
How to Package Python dependencies with PIP setuptools
Use Python 3.9 by ActiveState and build your own runtime with the ... provide an email address in quotes where users can contact...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found