I installed PySide2, but pyside2-uic didn't work, so I managed to do it.

[Last article] I installed PySide2 under Pyenv + Virtualenv environment at (http://qiita.com/Keck/items/60bdbc0869abb89287b0), but pyside2-uic, a tool for converting UI files created by Qt Designer, does not work well. So, make a note of how to deal with it

$ pyside2-uic 
Traceback (most recent call last):
(Omission)
  File "/home/hoge_user/.pyenv/versions/pyside_test/lib/python3.5/site-packages/PySide2-2.0.0.dev0-py3.5-linux-x86_64.egg/pyside2uic/__init__.py", line 27, in <module>
    from pyside2uic.Compiler import indenter, compiler

Note the path to the pyside2uic directory in the error display (the path depends on the Virtualenv name etc.)

$ cd [Noted directory]
$ ll
88 in total
drwxrwxr-x 3 hoge_user hoge_user 4096 april 10 11:37 ./
drwxrwxr-x 5 hoge_user hoge_user 4096 april 10 11:35 ../
-rw-rw-r-- 1 hoge_user hoge_user 5027 april 10 11:37 __init__.py
drwxrwxr-x 2 hoge_user hoge_user 4096 april 10 11:37 __pycache__/
-rw-rw-r-- 1 hoge_user hoge_user 4039 april 10 11:35 driver.py
-rw-rw-r-- 1 hoge_user hoge_user 1101 april 10 11:35 exceptions.py
-rw-rw-r-- 1 hoge_user hoge_user 4533 april 10 11:35 icon_cache.py
-rw-rw-r-- 1 hoge_user hoge_user 3986 april 10 11:35 objcreator.py
-rw-rw-r-- 1 hoge_user hoge_user 16295 April 10 11:35 properties.py
-rw-rw-r-- 1 hoge_user hoge_user 32268 April 10 11:35 uiparser.py

When I look into the directory, I can't actually find the Compiler directory.

So, if you look at the git repository cloned in the previous article ...

$ cd pyside2-setup/pyside_package/pyside2uic/
$ ll
96 in total
drwxr-xr-x 5 hoge_user hoge_user 4096 april 10 11:35 ./
drwxrwxr-x 5 hoge_user hoge_user 4096 april 10 11:35 ../
drwxr-xr-x 2 hoge_user hoge_user 4096 april 10 11:35 Compiler/
-rw-r--r-- 1 hoge_user hoge_user 5000 april 10 11:35 __init__.py
-rw-r--r-- 1 hoge_user hoge_user 4039 april 10 11:07 driver.py
-rw-r--r-- 1 hoge_user hoge_user 1101 april 10 11:07 exceptions.py
-rw-r--r-- 1 hoge_user hoge_user 4533 april 10 11:07 icon_cache.py
-rw-r--r-- 1 hoge_user hoge_user 3986 april 10 11:15 objcreator.py
drwxr-xr-x 2 hoge_user hoge_user 4096 april 10 11:35 port_v3/
-rw-r--r-- 1 hoge_user hoge_user 16295 April 10 11:07 properties.py
-rw-r--r-- 1 hoge_user hoge_user 32268 April 10 11:07 uiparser.py
drwxr-xr-x 2 hoge_user hoge_user 4096 april 10 11:35 widget-plugins/

Find Compiler directory port_v3, widget-plugins directory, etc. Copy all for the time being

$ cp -r port_v3 [Noted directory]
$ cp -r widget-plugins [Noted directory]
$ cp -r Compiler [Noted directory]

$ pyside2-uic 
Error: one input ui-file must be specified

Import errors no longer occur Execution with a UI file also worked fine

Recommended Posts

I installed PySide2, but pyside2-uic didn't work, so I managed to do it.
I tried to install Docker on Windows 10 Home but it didn't work
Docker x visualization didn't work and I was addicted to it, so I summarized it!
I tried my best to make an optimization function, but it didn't work.
I tried to scrape YouTube, but I can use the API, so don't do it.
The sound of tic disorder at work is ... I managed to do it with the code
I want to do it with Python lambda Django, but I will stop
I didn't understand the Resize of TensorFlow so I tried to summarize it visually.
I tried to use Twitter Scraper on AWS Lambda and it didn't work.
When I tried to create a project using Python on Docker with PyCharm, it didn't work, but it worked with Docker Compose.
I introduced black to vscode, but it doesn't autoformat
[Streamlit] I installed it
When I try to push with heroku, it doesn't work
PyTorch's book was difficult to understand, so I supplemented it
Insecure Platform Warning still appears with pip install, but I didn't do it because it was troublesome.
I tried to use deep learning to extract the part where the plant is shown from the photo of the balcony, but it didn't work, so I will summarize the contents of trial and error. Part 2