Tag Archives: py

python sqlite Error IntegrityError: UNIQUE constraint failed: table_area1.user_name

This error is caused by the fact that when you were building the table, you set the key to be UNIQUE. When a user with the same name appears, the user will report
It’s also possible that this is the key that you just want to make unique but you insert this key twice later
for example you insert something with id 1
and then you insert something with id 1 because you can only have one field with id 1 so you get an error here

numpy.core.umath How to solve the problem of failed to import

install the gpu version of TensorFlow

encountered this problem when installing the gpu version of TensorFlow.

the solution is

  • at the command line:
pip install -U numpy -i https://pypi.tuna.tsinghua.edu.cn/simple/

and then it’s good ~

Python 3.6.6 (v3.6.6:4cf1f54eb7, Jun 27 2018, 03:37:03) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf