我是一个完整的菜鸟所以请怜悯。几个小时以来我一直在寻找问题的答案,但没有取得任何进展。我正在使用Anaconda3 32bit Windows版本的IPython 3.4(笔记本)
我想使用!pip install tradingWithPython安装tradingWithPython模块。它似乎正在寻找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 :(得分:0)
模块已经为python 2.7编写,它应该正确安装。只需检查python版本。
如果你想在基于python 3.x的Anaconda中运行模块,你应该做下一步:
在命令提示符下写:
if [type] == "rg_counters" {
grok{
match => ["message", "%{YEAR}%{MONTHNUM}%{MONTHDAY}\s*%{HOUR}:%{MINUTE}:%{SECOND}\s*(?<counters_raw_data>[0-9\-A-Z]*)\s*(?<counters_operation_type>[\-A-Z]*)\s*%{GREEDYDATA:counters_extradata}"]
}
}
output {
elasticsearch { host => ["elastichost1","elastichost1" ] port => "9200" protocol => "http" }
stdout { codec => rubydebug }
}
运行
cd %path_to_unzipped_folder%/tradingWithPython-0.0.14.0
2to3 -w -n --no-diffs .
安装包。