我安装了Python 2.7,我正在尝试使用tensorflow和windows看起来它只适用于python 3.5,我下载了python安装程序,它显然已安装,但在哪里?
Python 2.7在C:中有一个Python27目录,但我无法在任何地方找到3.5.我再次尝试安装程序,它询问我是否要修复或删除.
编辑:我真的想找到pip3,我假设它在python35/scripts目录中
我需要一次从 sqlite3 数据库中检索 160 行结果,并重复该操作,直到没有任何行可供查询,这就是我所拥有的:
conn = sqlite3.connect("C:\\Users\\%s\\AppData\\Roaming\\GridcoinResearch\\reports\\Rain.db" % user_account)
c = conn.cursor()
conn.text_factory = str
address = c.execute('select Address from NNDATA where NeuralMagnitude != 0 and NeuralMagnitude is not null and CPID in (select cpids from GRIDCOINTEAM)').fetchmany(160)
conn.text_factory = float
nn_mag = c.execute('select NeuralMagnitude from NNDATA where NeuralMagnitude != 0 and NeuralMagnitude is not null and CPID in (select cpids from GRIDCOINTEAM)').fetchmany(160)
conn.close()
while True:
if nn_mag == ():
sys.exit("Complete")
Run Code Online (Sandbox Code Playgroud)
原因是我在和 之间sys.exit还有一堆其他代码,所以当最后一个循环完成时我可以退出程序。现在它正在执行第一遍,然后 cmd.exe 挂起。conn.close()while True: …