简体   繁体   English

从github导入python项目

[英]Importing python project from github

Im trying to download this project in python from github and import it to eclipse ubuntu. 我试图从github用python下载项目并将其导入eclipse ubuntu。

The interpreter of python is 3 and I noticed that after the git clone and running the setup.py , the output is in folder python 2.7 instead of python 3 python的解释器是3,我注意到在git clone并运行setup.py ,输出在python 2.7文件夹中,而不是在python 3

And when I try to import scapy_http.http I get an exeption (probably the interpreter looking for it inside python 2.7 folder). 当我尝试import scapy_http.http我得到了一个import scapy_http.http (可能是解释器在python 2.7文件夹中寻找它)。

When I try to replace the interpreter to python 2.7 I get other exeption on import scapy.all 当我尝试将解释器替换为python 2.7我在import scapy.all遇到了其他import scapy.all

  • the import scapy suppose to come before import scapy_http import scapy假设来之前import scapy_http

  • I installed scapy for python 3: pip3 install scapy-python3 我为python 3 pip3 install scapy-python3pip3 install scapy-python3

So how can I import the scapy-http project to my eclipse project given the interpreter is python 3 ? 那么如果解释器是python 3如何将scapy-http项目导入我的eclipse项目?

Thanks. 谢谢。

It should be ok if you did pip3 install scary-python3. 如果您在pip3上安装了scary-python3,应该没问题。 It's a bit hard to tell exactly what's going on (please provide error messages, etc.) but I would suggest you try: 确切说明正在发生的事情有点困难(请提供错误消息等),但我建议您尝试:

sudo python3 setup.py install

If you haven't already. 如果您还没有。 The problem might be that you left off the 3 and thus it was stored in python 2 libraries. 问题可能是您放弃了3,因此将其存储在python 2库中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM