2017-05-27 30 views
0

我無法導入datashader:不能導入datashader(使用miniconda安裝)

  • 在Jupyter筆記本我只是得到:

    導入錯誤:沒有模塊名爲 'datashader'

  • 在終端( linux ubuntu 17.04 32bit),運行python後,我得到:


[email protected]:~$ python 
Python 3.6.0 |Continuum Analytics, Inc.| (default, Dec 23 2016, 12:22:10) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux 
Type "help", "copyright", "credits" or "license" for more information. 
>>> import datashader 
/home/user1/miniconda3/lib/python3.6/site-packages/odo/backends/pandas.py:94: FutureWarning: pandas.tslib is deprecated and will be removed in a future version. 
You can access NaTType as type(pandas.NaT) 
    @convert.register((pd.Timestamp, pd.Timedelta), (pd.tslib.NaTType, type(None))) 
>>> 

我已經安裝了datashader使用miniconda。 所以先安裝miniconda,然後用

conda install -c bokeh datashader 

任何想法,爲什麼datashader是不是進口的?

回答

1

Jupyter筆記本可能只是使用與安裝datashader不同的Python安裝。如果是這樣,只需選擇與安裝datashader的內核相對應的內核,或者安裝Jupyter正在使用的內核的datashader。

在終端中,它看起來像我datashader成功導入;這只是一個警告。

+0

請問你能告訴我如何做到這兩點:選擇與datashader的安裝位置相對應的內核,安裝Jupyter正在使用的內核的datashader。 –

+0

在Jupyter筆記本「內核」菜單中,您可以選擇「更改內核」,並且您應該能夠選擇與安裝數據傳送器的位置相對應的那個(儘管對我而言,此列表有時只有一個項目,而其他時間它顯示所有可用的環境;不確定是什麼控制)。 一旦你在Jupyter中,你可以通過執行如下操作來找出你正在使用的內核:「import os; os .__ file__」,導致'/ Users/jbednar/anaconda/envs/ds/lib/python3 .6/os.py' (顯示我使用環境「ds」)。 –

相關問題