0
所以我有一个问题。有一个简单的Python控制台应用。当我通过python filename.py从命令行运行它时,它正常工作。但是,当我尝试在VS(安装pytools,环境配置,安装的软件包)我得到这个错误:Pytools for VS 2015
我的代码如下所示:
import urllib2
from bs4 import BeautifulSoup
import html5lib
url = "http://www.yellowpages.com/search?search_terms=Coffee+Shops&geo_location_terms=Los+Angeles%2C+CA"
r = urllib2.urlopen(url)
soup = BeautifulSoup(r, "html5lib")
print soup
g_data = soup.find_all("div", {"class": "info"})
print "\nWell, those are our cofee shops:\n"
x=1
for item in g_data:
try:
if item.contents[0].find_all("a", {"class": "business-name"})[0].text != "Buy on eBay Today!":
print "%d. %s\n" % (x, item.contents[0].find_all("a", {"class": "business-name"})[0].text)
print "Adress: " + item.contents[1].find_all("p", {"class": "adr"})[0].text + "\n"
x+=1
except:
pass
而且我得到这个错误:error1
所以我想我会再次去我的新项目,我看到,我可以安装另一个Python工具,但当我尝试这样做,我得到这个:error2
这是因为我有社区版本?这里的学生,可以随时获取企业版)
我该怎么办?
是的,但PyCharm吃我所有的PC资源。 50倍以上VS ... – Frynio
不完全。我经常在linux上使用它,它很棒 - 它在Windows上并不是很好,但它不应该使用那么多的资源。如果这是您过去版本的体验,我会建议您下载最新版本并再次尝试 –