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

bokeh 0.4.1 vs virtualenv #378

Closed
lebedov opened this issue Feb 23, 2014 · 5 comments
Closed

bokeh 0.4.1 vs virtualenv #378

lebedov opened this issue Feb 23, 2014 · 5 comments

Comments

@lebedov
Copy link

lebedov commented Feb 23, 2014

On Ubuntu 13.10 using Python 2.7.5, attempting to install bokeh 0.4.1 in a virtualenv 1.11.3 (i.e., the latest version as of the submission of this issue) fails because setup.py calls site.getsitepackages(), which currently isn't provided by the site module installed in a virtualenv. While this obviously isn't a bokeh problem, it might be nice to work around it until virtualenv is fixed.

@asimihsan
Copy link

I encountered this during PyData London 2014. In a frenzy of desperation
trying to get my laptop ready for the Bokeh tutorial I just copy/pasted
this function. You can read more here:

https://gist.github.com/asimihsan/9186003

One fix is to get virtualenv to use the system-native version of
site.py, rather than the Python 2.6 version. Another is to figure out
why bokeh requires the Python 2.7 version of site.py, since I've
never encountered this problem with any other Python module.

This reproduces on:

  • CPython 2.7.3 (native install) on Fedora 19 x64
  • CPython 2.7.5 (Homebrewed install) on Mac OS X 10.8.2

On reading your pull request you did exactly this!

@damianavila
Copy link
Contributor

@lebedov @asimihsan I opened a PR to fix this issue... it is referenced above... can you try it and let me know if it fix the issue? Thanks.

@lebedov
Copy link
Author

lebedov commented Feb 24, 2014

The PR seems to install in a virtualenv without any problems.

@damianavila
Copy link
Contributor

From the mailing list:

Get this when trying to install from source
OS X 10.7.5

File "setup.py", line 158, in <module>
    site_packages = getsitepackages()[0]
  File "setup.py", line 83, in getsitepackages
    prefixes.append(sys.real_prefix)
AttributeError: 'module' object has no attribute 'real_prefix'

Working in a fix...

@damianavila
Copy link
Contributor

The fix seems to work, closing...

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