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

virtualenv 20.0.x changes break default layout install #2566

Open
earthgecko opened this issue Mar 15, 2020 · 3 comments
Open

virtualenv 20.0.x changes break default layout install #2566

earthgecko opened this issue Mar 15, 2020 · 3 comments
Assignees

Comments

@earthgecko
Copy link
Contributor

Changes introduced in virtualenv 20.0.x appear to have invalidated the installation documentation.
When installing graphite-web in a virtualenv neither the export PYTHONPATH="/opt/graphite/lib/:/opt/graphite/webapp/" method, nor the method passing the pip --install-option works any longer (related to pypa/pip#7309).

Passing the --install-option

DEPRECATION: Location-changing options found in --install-option: ['--prefix', '--install-lib'] from command line. This configuration may cause unexpected behavior and is unsupported. pip 20.2 will remove support for this functionality. A possible replacement is using pip-level options like --user, --prefix, --root, and --target. You can find discussion regarding this at https://github.com/pypa/pip/issues/7309.

This results in graphite not being installed the in /opt/graphite/webapp/graphite but in /opt/graphite/lib/python3.7/site-packages/graphite

I have not been able to debug why the exported PYTHONPATH is not being honoured by pip (20.0.2) yet.

To Reproduce
Steps to reproduce the behaviour:

pip install virtualenv==20.0.10  # system pip virtualenv
cd /opt
# Using a virtualenv with Python 3.7.6 built from source, set python interpretator as appropriate
virtualenv --python=/opt/python_virtualenv/versions/3.7.6/bin/python3.7 graphite
cd /opt/graphite
source bin/activate
export PYTHONPATH="/opt/graphite/lib/:/opt/graphite/webapp/"
bin/pip3 install --no-binary=:all: https://github.com/graphite-project/graphite-web/tarball/1.1.6

Expected behaviour

Create /opt/graphite/webapp/graphite but creates /opt/graphite/lib/python3.7/site-packages/graphite.

Environment:

  • OS flavor: CentOS 8.1.1911
  • Graphite-web version: 1.1.6
  • Python version: 3.7.6
  • Setup type: pip (from sources)
  • pip versions: system - 9.03, virtualenv - 20.0.2

Additional context

This affects carbon in the same way, carbon is not installed in /opt/graphite/lib/carbon but as /opt/graphite/lib/python3.7/site-packages/carbon.

I believe this may have been responsible for the issue reported in #2415 and @pszafer may find that when py3-virtualenv updated on Alpine the --install-options method may no longer work.

Workaround for users

For now a simple workaround for users is to use virtualenv 16.7.9 or 16.7.10 as virtualenv is still releasing 16.7.x along with 20.0.x

If you know what you are doing and you have virtualenv 20.0x installed with the system pip, then you can install 16.7.10

pip uninstall virtualenv
pip install virtualenv==16.7.10

Your installation will now work as per the docs.

@earthgecko earthgecko added the bug label Mar 15, 2020
@ploxiln
Copy link
Contributor

ploxiln commented Mar 15, 2020

this might be addressed by (long un-merged) #2409

@deniszh
Copy link
Member

deniszh commented Mar 16, 2020

Btw, py3-virtualenv on Alpine is still 16.7.x

@piotr1212
Copy link
Member

time to get rid of the prefix.

@deniszh deniszh added the pinned label May 3, 2020
earthgecko added a commit to earthgecko/skyline that referenced this issue Nov 1, 2020
IssueID #3788: snab_flux_load_test

- Added snab_flux_load_test
- Updated SNAB doc
- Updated skyline.dawn.sh to SNAB branch and mitigated Graphite setuptools issue
  as per graphite-project/graphite-web#2566

Added:
bin/snab_flux_load_test.d
skyline/snab/snab_flux_load_test.py
skyline/snab/snab_flux_load_test_agent.py
Modified:
docs/SNAB.rst
utils/dawn/skyline.dawn.sh
@deniszh deniszh self-assigned this Nov 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants