Categories
Development

Python3, gcc and clang on MacOS

I am trying to make a Python script on my Mac (MacOS 10.14.6 Mojave) and I am getting trouble with installing a module (watchdog). I have the built-in Python 2 and I installed Python 3 with Homebrew. If a type in the terminal python, I get: Python 2.7.16 (default, Oct 16 2019, 00:34:56) [GCC 4.2.1 […]

Categories
Development

matplotlib Error: No module named matplotlib even though it is installed

No module named matplotlib after installing I have already installed matplotlib using >> pip3 install matplotlib. As I’m using latest version of python 3.8.0. Even updated the PIP to the latest version After selecting import matplotlib, it says ” No module named matplotlib” While if I tried to install again received message ” Requirement already […]

Categories
Development Linux Python

Why does the following simple Python 3 strptime() code run on OSX but not on Linux?

The following code to read and validate an ISO8601 format date works as expected on python 3.7.4 OSX. It raises an error on Linux Python 3.6.8 (default, Oct 14 2019, 21:22:53) [GCC 4.8.5 20150623 (Red Hat 4.8.5-28)] on linux Type “help”, “copyright”, “credits” or “license” for more information. >>> format_string = ‘%Y-%m-%dT%H:%M:%S%z’ >>> from datetime […]

Categories
Development Python

PyWin32 and Python 3.8.0

Python 3.8.0 has been recently released (on 20191014, and can be downloaded from [Python]: Python 3.8.0). PyWin32 has builds for it on [PyPI]: pywin32 225 (released on 20190915). Unfortunately, after pip installing, it doesn’t work. Sample: [cfati@CFATI-5510-0:e:\Work\Dev\StackOverflow\q058631512]> sopr.bat *** Set shorter prompt to better fit when pasted in StackOverflow (or other) pages *** [prompt]> “e:\Work\Dev\VEnvs\py_064_03.07.03_test0\Scripts\python.exe” […]

Categories
Development Linux Windows

python/tkinter popup window appears fine on windows or linux but not on OSX Mojave. NO ERRORS

“I’m learning Tkinter from the “GUI Programming Cookbook”. Using my MacBook Pro running Mojave, python3.8 and the Tkinter that came packaged. There is one method where a popup tool tip shows when the mouse is hovered over a widget. It works fine on Win 10 and linux, but the popup does not appear on my […]

Categories
Development

nose unittest discovery broken on python 3.8

Upgraded from python 3.7 to 3.8 today. Unittest discovery in nose no longer works. Simplified project layout x:\proj\src\__init__.py x:\proj\src\first.py x:\proj\tests\__init.py x:\proj\tests\testfirst.py From project root x:\proj, run: nosetests -v ———————————————– Ran 0 tests in 0.016s OK Can only run unittests by specifying them, eg: nosetests tests.testfirst . ———————————————————————- Ran 1 test in 0.000s OK Platform nosetests […]

Categories
Development Drivers

i am trying to convert text to speech using pyttsx3 in python. but i am getting the error maybe on driverName

i am trying to convert text to speech using pyttsx3 in python. but i am getting the error maybe on driverName. Here is my code import pyttsx3 engine = pyttsx3.init() engine.say(“I will speak this text”) engine.runAndWait() Here is the Output which gives error. Python 3.8.0 (tags/v3.8.0:fa919fd, Oct 14 2019, 19:37:50) [MSC v.1916 64 bit (AMD64)] […]