8000 --user option broken? (when using relative path for PYTHONUSERBASE) · Issue #1153 · pypa/pip · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

--user option broken? (when using relative path for PYTHONUSERBASE) #1153

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
gdamjan opened this issue Aug 20, 2013 · 10 comments
Closed

--user option broken? (when using relative path for PYTHONUSERBASE) #1153

gdamjan opened this issue Aug 20, 2013 · 10 comments
Labels
auto-locked Outdated issues that have been locked by automation C: user scheme Handling of packages in user-specific directories type: bug A confirmed bug or unintended behavior

Comments

@gdamjan
Copy link
gdamjan commented Aug 20, 2013

PYTHONUSERBASE=py-env pip install --user Flask fails with:

Exception:
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/pip/basecommand.py", line 134, in main
    status = self.run(options, args)
  File "/usr/lib/python2.7/site-packages/pip/commands/install.py", line 241, in run
    requirement_set.install(install_options, global_options, root=options.root_path)
  File "/usr/lib/python2.7/site-packages/pip/req.py", line 1298, in install
    requirement.install(install_options, global_options, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/pip/req.py", line 663, in install
    f = open(os.path.join(egg_info_dir, 'installed-files.txt'), 'w')
IOError: [Errno 2] No such file or directory: 'py-env/lib/python2.7/site-packages/Flask-0.10.1-py2.7.egg-info/installed-files.txt'

py-env/lib/python2.7/site-packages/ is empty so normally it can't create installed-files.txt when it didn't even create the .egg-info directory yet.

Versions are:

$ pip --version
pip 1.4.1 from /usr/lib/python2.7/site-packages (python 2.7)

$ python -c 'import setuptools; print setuptools.__version__'
0.9.8
@qwcode
Copy link
Contributor
qwcode commented Aug 20, 2013

the relative py-env path for PYTHONUSERBASE is the problem here.
just using python setup.py install --user directly (i.e. what pip does internally), I wasn't able to get it to work either.
not sure that PYTHONUSERBASE supports relative path names.

@gdamjan
Copy link
Author
gdamjan commented Aug 20, 2013

afaik it did work previously ... but if it's documented to not work, that's ok too

@qwcode
Copy link
Contributor
qwcode commented Aug 20, 2013

hmm, I'll check some older pips and see.

@merwok
Copy link
merwok commented Mar 24, 2014

PEP 370 and/or what distutils does could also be checked.

@dstufft
Copy link
Member
dstufft commented Mar 22, 2017

I cannot reproduce this, it appears that the issue was not a pip issue to begin with and I'm assuming that at some point in the last 3 years, whoever's issue this actually was has solved it for us.

@dstufft dstufft closed this as completed Mar 22, 2017
@gdamjan
Copy link
Author
gdamjan commented Mar 22, 2017

happens still for me

$ PYTHONUSERBASE=py-env pip install --user Flask
Collecting Flask
  Using cached Flask-0.12-py2.py3-none-any.whl
Collecting Werkzeug>=0.7 (from Flask)
  Downloading Werkzeug-0.12.1-py2.py3-none-any.whl (312kB)
    100% |████████████████████████████████| 317kB 1.8MB/s 
Requirement already satisfied: Jinja2>=2.4 in /usr/lib/python3.6/site-packages (from Flask)
Collecting itsdangerous>=0.21 (from Flask)
  Using cached itsdangerous-0.24.tar.gz
Collecting click>=2.0 (from Flask)
  Using cached click-6.7-py2.py3-none-any.whl
Requirement already satisfied: MarkupSafe>=0.23 in /usr/lib/python3.6/site-packages (from Jinja2>=2.4->Flask)
Installing collected packages: Werkzeug, itsdangerous, click, Flask
  Running setup.py install for itsdangerous ... done
Exception:
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/usr/lib/python3.6/site-packages/pip/commands/install.py", line 342, in run
    prefix=options.prefix_path,
  File "/usr/lib/python3.6/site-packages/pip/req/req_set.py", line 784, in install
    **kwargs
  File "/usr/lib/python3.6/site-packages/pip/req/req_install.py", line 922, in install
    with open(inst_files_path, 'w') as f:
FileNotFoundError: [Errno 2] No such file or directory: 'py-env/lib/python3.6/site-packages/itsdangerous-0.24-py3.6.egg-info/installed-files.txt'
$ pip --version
pip 9.0.1 from /usr/lib/python3.6/site-packages (python 3.6)
$ python -c 'import setuptools; print(setuptools.__version__)'
34.3.2

@dstufft
Copy link
Member
dstufft commented Mar 22, 2017

What operating system?

@dstufft dstufft reopened this Mar 22, 2017
@gdamjan
Copy link
Author
gdamjan commented Mar 22, 2017

ArchLinux … setuptools and pip are installed from package, but should be vanilla (and I don't see anything suspicious in the PKGBUILDs)

@pradyunsg
Copy link
Member

This should be fixed by #4495?

@pradyunsg
Copy link
Member

@dstufft Since #4495 is merged, can this be closed now?

@dstufft dstufft closed this as completed Jun 13, 2017
@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 3, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation C: user scheme Handling of packages in user-specific directories type: bug A confirmed bug or unintended behavior
Projects
None yet
Development

No branches or pull requests

5 participants
0