嗨,我是一個新手Python程序員。我需要逐行分析,因此試圖安裝line_profiler軟件包。但它不起作用。這是我所做的:Python line_profiler安裝
順便說一句,我在Windows 8.1,64位,我使用Enthought冠層。
我從這裏得到了Windows安裝包:https://pypi.python.org/pypi/line_profiler並安裝了它。
它說的是:a)我並不需要構建它還是需要用Cython,B的line_profiler網站),我應該這樣做:
For IPython 0.11+, you can install it by editing the IPython configuration file ~/.ipython/profile_default/ipython_config.py to add the 'line_profiler' item to the extensions list:
c.TerminalIPythonApp.extensions = [ 'line_profiler', ]
我重新啓動雨棚,沒有運氣。應該有一個魔術命令%lprun。它不在那裏。
我試過%load_ext line_profiler卻得到了這樣的信息:
C:\Users\OEM\AppData\Local\Enthought\Canopy\User\lib\site-packages\line_profiler.py in() 10 import sys 11 ---> 12 from _line_profiler import LineProfiler as CLineProfiler 13 14
ImportError: DLL load failed: %1 is not a valid Win32 application.
其他的事情:我看了這一個setup.py但無法找到一個,這似乎是安裝在C line_profiler :\ Users \ OEM \ AppData \ Local \ Enthought \ Canopy \ User \ Lib \ site-packages文件夾。
所以,任何幫助表示讚賞。
感謝,但我只是得到「line_profiler-1.0b3-cp26-none-win32.whl不是這個平臺上支持的輪子。」 我試了64和32位版本,同樣的錯誤。 – davo36