Skip to content
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

Cannot install in custom directory #1261

Closed
davidedelvento opened this issue Dec 15, 2015 · 4 comments
Closed

Cannot install in custom directory #1261

davidedelvento opened this issue Dec 15, 2015 · 4 comments

Comments

@davidedelvento
Copy link

In py.test v2.7.0 the following worked:

pip install pytest --install-option="--prefix=/path/to/my/dir"

In current 2.8.5 the option is silently ignored, and it tries to install in /path/to/my/python/install/lib/python2.7/site-packages/ (it may succeed or fail depending on the permissions)

@davidedelvento
Copy link
Author

This may be related to pypa/pip#3252 (I'm running pip v1.5.6 from python v2.7.7) but the current workaround of using --target instead does not work since py.test needs to install scripts, beside pure python modules.

@nicoddemus
Copy link
Member

Sorry but I think this is clearly a pip issue, so I'm closing this, but feel free to reopen if you disagree. 😄

@davidedelvento
Copy link
Author

Yes, it is a pip issue, which it affects everything up to the latest release.
The fix has been merged, however it is not clear when it will be available for install. Until then, pytest is not usable for me. As a workaround, I could use pip's --target option, but that installs only stuff that would be installed into lib/python2.7/site-packages/, which clearly is not enough for pytest.

Can you confirm that in the current version only bin/py.test and bin/py.test-2.8 needs to be installed outside of lib/python2.7/site-packages/

@nicoddemus
Copy link
Member

I think if the directory for your --target option is on PYTHONPATH, python -m pytest should work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants