Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python Bokeh dependencies not found

This question has been asked but not answered. The only difference is I am on a Arch Linux 64 bit. I am using python 2.7 and the package that got installed of bokeh is 0.10.0

I followed the

conda install bokeh

instructions from here and did the conda update conda and conda update anaconda Still it does not work. Not only is bokeh.plotting not working, but neither is bokeh.sampledata which leads me to believe none of it is working.

Has any one else had this problem with this or any package and successfully solved it?

I do not know if this helps, but there are three versions of bokeh in my pkgs folder. Two of them are bokeh 0.9.0 and one of them is bokeh 0.10.0 which is the one that comes up when I call conda. In the site-packages/bokeh folder there is a plotting.py.

I tried to install it in python 3.4 and this is what the terminal returned

(py34)[bob@bob anaconda]$ conda install bokeh
Fetching package metadata: ....
Solving package specifications: .
Package plan for installation in environment /home/bob/anaconda/envs/py34:

The following packages will be downloaded:

package                    |            build
---------------------------|-----------------
numpy-1.9.3                |           py34_0         5.7 MB
pytz-2015.6                |           py34_0         173 KB
setuptools-18.3.2          |           py34_0         346 KB
tornado-4.2.1              |           py34_0         557 KB
wheel-0.26.0               |           py34_1          77 KB
jinja2-2.8                 |           py34_0         301 KB
bokeh-0.10.0               |           py34_0         3.9 MB
------------------------------------------------------------
                                       Total:        10.9 MB

The following NEW packages will be INSTALLED:

libgfortran: 1.0-0        
openblas:    0.2.14-3     
wheel:       0.26.0-py34_1

The following packages will be UPDATED:

bokeh:       0.9.0-np19py34_0 --> 0.10.0-py34_0
jinja2:      2.7.3-py34_1     --> 2.8-py34_0   
numpy:       1.9.2-py34_0     --> 1.9.3-py34_0 
pip:         7.0.3-py34_0     --> 7.1.2-py34_0 
pytz:        2015.4-py34_0    --> 2015.6-py34_0
setuptools:  17.1.1-py34_0    --> 18.3.2-py34_0
tornado:     4.2-py34_0       --> 4.2.1-py34_0 

Proceed ([y]/n)? y

Fetching packages ...
numpy-1.9.3-py 100% |##########################| Time: 0:00:00   6.21 MB/s
pytz-2015.6-py 100% |##########################| Time: 0:00:00   1.44 MB/s
setuptools-18. 100% |##########################| Time: 0:00:00   2.63 MB/s
tornado-4.2.1- 100% |##########################| Time: 0:00:00   3.57 MB/s
wheel-0.26.0-p 100% |##########################| Time: 0:00:00   1.28 MB/s
jinja2-2.8-py3 100% |##########################| Time: 0:00:00   2.19 MB/s
bokeh-0.10.0-p 100% |##########################| Time: 0:00:00   5.74 MB/s
 Extracting packages ...
 [      COMPLETE      ]|#############################################| 100%
 Unlinking packages ...
 [      COMPLETE      ]|#############################################| 100%
 Linking packages ...
 [      COMPLETE      ]|#############################################| 100%


(py34)[bob@bob anaconda]$ python bokeh.py
Traceback (most recent call last):
  File "bokeh.py", line 1, in <module>
    from bokeh import plotting
  File "/home/bob/anaconda/bokeh.py", line 1, in <module>
    from bokeh import plotting
 ImportError: cannot import name 'plotting'
like image 960
lost Avatar asked Sep 26 '22 15:09

lost


People also ask

How do you add a Bokeh chart in Python?

The easiest way to install Bokeh is to use conda . Conda is part of the Anaconda Python Distribution, which is designed with scientific and data analysis applications like Bokeh in mind. If you use Anaconda on your system, installing with conda is the recommended method. Otherwise, use pip .

How do I know if Bokeh is installed?

To check whether the Bokeh is successfully installed, do the following: Import bokeh package in Python terminal. Check the bokeh version.


1 Answers

You have a file /home/bob/anaconda/bokeh.py in your current directory, which is being imported instead of bokeh.

You might look at what that file is, if it is really needed. If it's a file you made, it's not recommended to put things in the anaconda directory (some subdirectory of your Documents directory is a better place). It's also not really a good idea to have anaconda be your current directory.

like image 89
asmeurer Avatar answered Sep 29 '22 03:09

asmeurer