Microsoft Windows Python-3.6 PyCrypto installation error

The file include\pyport.h in Python installation directory does not have #include < stdint.h > anymore. This leaves intmax_t undefined. A workaround for Microsoft VC compiler is to force include stdint.h via OS environment variable CL: Open command prompt Setup VC environment by runing vcvars*.bat (choose file name depending on VC version and architecture) set CL=-FI”Full-Path\stdint.h” … Read more

Multiline f-string in Python

From Style Guide for Python Code: The preferred way of wrapping long lines is by using Python’s implied line continuation inside parentheses, brackets and braces. Given this, the following would solve your problem in a PEP-8 compliant way. return ( f'{self.date} – {self.time}\n’ f’Tags: {self.tags}\n’ f’Text: {self.text}’ ) Python strings will automatically concatenate when not … Read more

Issue installing Tensorflow — not a CUDA/CuDNN issue

@user1735003 figured it out. I unistalled the latest version of tensorflow pip uninstall tensorflow and then installed tensorflow 1.5 pip install tensorflow==1.5 then I verified the installation worked with the script import tensorflow as tf hello = tf.constant(‘Hello, TensorFlow!’) sess = tf.Session() print(sess.run(hello)) I got the correct output Hello, TensorFlow!