2015-04-03 126 views
1

我是一個完整的noob,所以請不要太可惜。已經在幾個小時內搜索了我的問題的答案,並且沒有取得進展。我使用的是IPython 3.4(筆記本)的Anaconda3 32bit Windows版本安裝tradingWithPython模塊 - ImportError:沒有名爲'lib.functions'的模塊

我想安裝tradingWithPython模塊,使用!pip install tr​​adingWithPython。它似乎正在尋找lib文件夾中的functions.py文件(在那裏),但它沒有找到它。這就是我得到:

收集tradingWithPython

使用緩存tradingWithPython-0.0.14.0.zip

Traceback (most recent call last): 

    File "<string>", line 20, in <module> 

    File "C:\Users\Gary\AppData\Local\Temp\pip-build-8doxz5zd\tradingWithPython\setup.py", line 3, in <module> 
    import tradingWithPython as twp 

    File "C:\Users\Gary\AppData\Local\Temp\pip-build-8doxz5zd\tradingWithPython\tradingWithPython\__init__.py", line 12, in <module> 
    from lib.functions import * 

ImportError: No module named 'lib.functions' 

Complete output from command python setup.py egg_info: 

Traceback (most recent call last): 

    File "<string>", line 20, in <module> 

    File "C:\Users\Gary\AppData\Local\Temp\pip-build-8doxz5zd\tradingWithPython\setup.py", line 3, in <module> 

    import tradingWithPython as twp 

    File "C:\Users\Gary\AppData\Local\Temp\pip-build-8doxz5zd\tradingWithPython\tradingWithPython\__init__.py", line 12, in <module> 

    from lib.functions import * 

ImportError: No module named 'lib.functions' 

我缺少什麼?我也嘗試從cmd行安裝,但結果相同。我有一個Python 2.7版本,它給了我相同的結果。

非常感謝!

回答

0

模塊已經寫入python 2.7,它應該正確安裝。只需檢查python版本。

如果你想基於Python 3.x都有Anaconda的運行模塊,你應該做的下一個步驟:

  • 解壓tradingWithPython-0.0.14.0.zip
  • 運行 「蟒蛇命令提示符」
  • 在命令提示符下寫入:

    cd %path_to_unzipped_folder%/tradingWithPython-0.0.14.0 
    2to3 -w -n --no-diffs . 
    
  • 完成。

運行

python setup.py install 

安裝包。

相關問題