enthought / traitsui

TraitsUI: Traits-capable windowing framework
http://docs.enthought.com/traitsui
Other
297 stars 96 forks source link

Tabbed view in OSX 11+ #1795

Closed glinsky007 closed 2 years ago

glinsky007 commented 2 years ago

I am getting the following result for the tabbed label in OSX 11+, regardless of the the Python or TraitsUI version.

image

using this code: traits_error_demo.py.zip

corranwebster commented 2 years ago

I haven't seen that before - I'm on 11.6 and things seem to be working. I do need to have QT_MAC_WANTS_LAYER=1 environment variable set depending on the version of Qt and how it was built.

Can you tell me which version of Qt/PyQt/PySide or Wx you are on, as this feels like it could be a problem at that level.

Are you using dark mode or anything similar?

glinsky007 commented 2 years ago

Will get that info to you. Also note my most recent comment on issue #1539 (https://github.com/enthought/traitsui/issues/1539)

glinsky007 commented 2 years ago

MacOS 12.1, Anaconda Python 3.8.12, Traits 6.2.0, TraitsUI 7.2.1, Qt 5.9.7, PyQt 5.9.2. Other Qt libraries: qdarkstyle 3.0.2, QtAwesome 1.0.3, QtPy 1.10.0. Also for good measure here is a screen where the fonts and the horizontal lines are really messed up:

image
glinsky007 commented 2 years ago

I am also getting the same behavior from an EDM installation that was working correctly on Catalina. The lines do look correct using Python 2.7, but the Tabbing still shows this behavior.

corranwebster commented 2 years ago

The issue with the horizontal lines is fixed in the current main (can't find the original issue in a quick search).

The issue with the tabs is odd. For me they match the Accent Color that I have set in the system preferences:

image

How is that set on your system?

Another possibility is that qdarkstyle is interfering with the color selection. How does it look with qdarkstyle removed?

Finally PyQt 5.9 is fairly old. You might try updating to something more recent and see if that helps. More recent Qt versions also understand new MacOS themes, so you shouldn't need to have any special styling.

glinsky007 commented 2 years ago

I built a new Python 3.6 EDM virtual environment (with PyQt5 5.14.2-4 and no qdarkstyle), and it works fine. It is probably the antique version (the most recent version available in Anaconda) and qdarkstyle. If I would remove qdarkstyle Anaconda would remove 74 other packages, many that I need.

glinsky007 commented 2 years ago

I have submitted this as an issue to Conda to resolve.

corranwebster commented 2 years ago

Thanks - I'll close this. Feel free to re-open if the Conda folks discover anything.

glinsky007 commented 2 years ago

When will TraitsUI be available via EDM in Python 3.8?

Sent from my iPhone

On Feb 17, 2022, at 8:30 AM, Corran Webster @.***> wrote:

 Closed #1795.

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you authored the thread.

corranwebster commented 2 years ago

No promises, but I am actively working towards a release of TraitsUI, hopefully early next week, and then you should expect TraitsUI to appear on EDM for 3.8. It will likely take a little while longer to get Chaco and Mayavi on 3.8

glinsky007 commented 2 years ago

The part that I need from Mayavi is tvtk to handle our simulation grids. That works fine after a ‘pip install mayavi’.

I really need 3.8 to get the cutting edge of the TensorFlow, TensorFlowProbability, and PyTorch AI stuff.

It is a real pain that PyMC only works with 3.7 or less. We are looking to put that functionality into TensorFlowProbability long term, though.

Sent from my iPhone

On Feb 17, 2022, at 10:26 AM, Corran Webster @.***> wrote:

 No promises, but I am actively working towards a release of TraitsUI, hopefully early next week, and then you should expect TraitsUI to appear on EDM for 3.8. It will likely take a little while longer to get Chaco and Mayavi on 3.8

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you authored the thread.

glinsky007 commented 2 years ago

How about Jupyter notebooks (I only finding jupyter_core and jupyter_client and I am getting the error "Jupyter command jupyter-notebook not found.” when I execute the command ‘jupyter notebook'.

On Feb 17, 2022, at 10:26 AM, Corran Webster @.***> wrote:

No promises, but I am actively working towards a release of TraitsUI, hopefully early next week, and then you should expect TraitsUI to appear on EDM for 3.8. It will likely take a little while longer to get Chaco and Mayavi on 3.8

— Reply to this email directly, view it on GitHub https://github.com/enthought/traitsui/issues/1795#issuecomment-1043216102, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABGY5X3QEG46DOEXORE3WITU3UVUNANCNFSM5M3R7MEQ. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you authored the thread.

corranwebster commented 2 years ago

They are all coming but it can take some time - VTK is time-consuming to build, for example, as is Qt and most of the ML libraries.

glinsky007 commented 2 years ago

Thanks for your responsiveness to this Corran.

What is the best way of staying up to date with the EDM Python 3.8 distribution? The main driver for using it is for TensorFlowProbability, TensorFlow and PyTorch.

It does look like all the issues that I had reported with the TraitsUI help and Table Editor, tabs are solved in the most recent releases (see my 3.8 notes below). The Table Editor issue is not resolved yet in the EDM Python 3.6 (not running on recent enough versions where the bug has been fixed). I need to downgrade the version of TraitsUI in Python 2.7 to avoid the bugs.

We are using Spyder 5.1.5 installed as an app on our Macs for Python 3.6 and 3.8 for an IDE. We then point it to our EDM 3.6 or 3.8 installations. We explicitly install it in 3.8 (it also brings Qt in with it enabling TraitsUI which we are pip installing with Mayavi for TVTK, jupyter, scikit_learn, PyMC3, TensorFlow and PyTorch for now). For the most part, things look to work. Note that we are installing TensorFlow on the Mac so that it uses the GPU. We do not install Spyder in EDM 3.6 because it conflicts with other packages, but do install the Spyder-kernels. We use SourceTree for our Git GUI. We explicitly install Spyder2 with EDM 2.7 and execute it from the command line.

Here are our our current installations:

Install Spyder 5.1.5 (https://github.com/spyder-ide/spyder/releases/download/v5.1.5/Spyder.dmg)

install Python 3.8 for install Python 3.8 for tensorflow-probability, pyTorch, scikit_learn and blusky and PyMC3

edm envs create --version 3.8 python38 edm shell -e python38 edm install numpy scipy ipython tabulate traits edm install sphinx swig cython flake8

MacOS GPU version https://towardsdatascience.com/accelerated-tensorflow-model-training-on-intel-mac-gpus-aa6ee691f894

SYSTEM_VERSION_COMPAT=0 python -m pip install tensorflow-macos tensorflow-metal # MacOS 11+ python -m pip install tensorflow # all other OS python -m pip install tensorflow-probability python -m pip install seaborn python -m pip install mpi4py # need to install openmpi first python -m pip install astroml astropy pyorick sdafile table pyabel xraydb python -m pip install lasio intervaltree statsmodels xlrd xlwt # for rspy python -m pip install spyder==5.1.5 traitsui mayavi jupyter scikit_learn pymc3 pip3 install torch torchvision torchaudio # not tested (errors in installation)

git clone @.***:enthought/blusky.git cd blusky

edit setup.py and change dependancy from "tensorflow" to "tensorflow-macos" if MacOS GPU version

python -m pip install -e .

To put into environment (compatible with Anaconda)

conda deactivate source ~meglins/.edm/envs/python38/bin/activate deactivate or edm shell-e python38 # do not use if python set in .zshrc exit

install Python 3.6 (for PyMC and PyMC3, tabs work!, issue with TraitsUI Table Editor, antiquated TensorFlow)

edm envs create --version 3.6 python36 edm shell -e python36 edm install numpy scipy ipython mayavi statsmodels tabulate pyqt5 matplotlib traits jupyter pymc pymc3 edm install scikit_learn scikits.image edm install sphinx swig cython h5py chaco xlrd xlwt pytables pydot seaborn tensorflow keras python -m pip install mpi4py # need to install openmpi first python -m pip install flake8 astropy python -m pip install astroml pyorick sdafile table pyabel xraydb python -m pip install intervaltree lasio # for rspy python -m pip install spyder-kernels==2.1

install Python 2.7 (everything works, TraitsUI works but tab blanks in MacOS 11+)

edm envs create --version 2.7 python27 edm shell -e python27 edm install numpy scipy ipython pyside mayavi statsmodels tabulate matplotlib traits jupyter pymc spyder edm install ipaddress # to get jupyter to work edm install scikit_learn scikits.image scikits.timeseries edm install sphinx swig cython h5py chaco weave xlrd xlwt pytables pydot seaborn python -m pip install mpi4py # need to install openmpi first python -m pip install pyorick astroml==0.4 astropy==2.0.14 pyabel table sdafile dill xraydb python -m pip install intervaltree lasio # for rspy edm install traitsui==5.1.0-2 # downgrade to get rid of bug with help file

Michael Glinsky

On Feb 23, 2022, at 3:58 AM, Corran Webster @.***> wrote:

They are all coming but it can take some time - VTK is time-consuming to build, for example, as is Qt and most of the ML libraries.

— Reply to this email directly, view it on GitHub https://github.com/enthought/traitsui/issues/1795#issuecomment-1048663728, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABGY5XY62TXZSFZGS55GTV3U4S4WRANCNFSM5M3R7MEQ. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you authored the thread.

glinsky007 commented 2 years ago

How are things going? What is the status of the builds for 3.8?

Michael Glinsky 7 Sueño de Santa Fe Santa Fe, NM 87505, USA @.*** +1 832 729 7601 (cell) http://www.qiTech.biz http://www.qitech.biz/

On Feb 23, 2022, at 3:58 AM, Corran Webster @.***> wrote:

They are all coming but it can take some time - VTK is time-consuming to build, for example, as is Qt and most of the ML libraries.

— Reply to this email directly, view it on GitHub https://github.com/enthought/traitsui/issues/1795#issuecomment-1048663728, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABGY5XY62TXZSFZGS55GTV3U4S4WRANCNFSM5M3R7MEQ. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you authored the thread.

glinsky007 commented 2 years ago

This is Corran Webster?

On Feb 23, 2022, at 3:58 AM, Corran Webster @.***> wrote:

They are all coming but it can take some time - VTK is time-consuming to build, for example, as is Qt and most of the ML libraries.

— Reply to this email directly, view it on GitHub https://github.com/enthought/traitsui/issues/1795#issuecomment-1048663728, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABGY5XY62TXZSFZGS55GTV3U4S4WRANCNFSM5M3R7MEQ. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you authored the thread.

corranwebster commented 2 years ago

Yes.

For reference TraitsUI 7.3.0 is now available in EDM with Python 3.8. There are a couple of critical bugs which have been found, so we'll likely do a 7.3.1 release next week.

glinsky007 commented 2 years ago

Great!

Any other packages like Mayavi (I use tvtk), from my list?

Sent from my iPhone

On Mar 11, 2022, at 4:29 AM, Corran Webster @.***> wrote:

 Yes.

For reference TraitsUI 7.3.0 is now available in EDM with Python 3.8. There are a couple of critical bugs which have been found, so we'll likely do a 7.3.1 release next week.

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you authored the thread.

glinsky007 commented 2 years ago

Is there somewhere that you announce releases?

Sent from my iPhone

On Mar 11, 2022, at 4:29 AM, Corran Webster @.***> wrote:

 Yes.

For reference TraitsUI 7.3.0 is now available in EDM with Python 3.8. There are a couple of critical bugs which have been found, so we'll likely do a 7.3.1 release next week.

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you authored the thread.