Building PySide 1.2.0: no pyside-uic - python-3.x

I compiled PySide 1.2.0 for python 3.3 on my machine (Ubuntu 13.04 x64), but, for some reason, pyside-tools don't get "compiled".
When I try to execute pyside-uic (after install) I get this error:
Traceback (most recent call last):
File "/usr/local/bin/pyside-uic", line 9, in <module>
load_entry_point('PySide==1.2.0', 'console_scripts', 'pyside-uic')()
File "/usr/local/lib/python3.3/dist-packages/distribute-0.6.49-py3.3.egg/pkg_resources.py", line 345, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/local/lib/python3.3/dist-packages/distribute-0.6.49-py3.3.egg/pkg_resources.py", line 2382, in load_entry_point
return ep.load()
File "/usr/local/lib/python3.3/dist-packages/distribute-0.6.49-py3.3.egg/pkg_resources.py", line 2088, in load
entry = __import__(self.module_name, globals(),globals(), ['__name__'])
File "/usr/local/lib/python3.3/dist-packages/PySide-1.2.0-py3.3.egg/PySide/scripts/uic.py", line 28, in <module>
from pysideuic.driver import Driver
ImportError: No module named 'pysideuic'
The egg file doesn't have the pysideuic folder. And when I check the pyside_install/py3.3-qt4.8.4-64bit-release/lib folder, I found that a "python2.7" folder exist!!
I build the sources using the instructions from this page: https://pypi.python.org/pypi/PySide.
Please, help.

It should be fixed now. Please get latest version of pyside-setup from github [1] and rebuild pyside distribution. Let me know if you have any issues.
[1] https://github.com/PySide/pyside-setup

Try to find the pyside-uic.exe or uic.exe in python folder/scripts and copy it in the required directory. or if not found any script in the particular directory, then reinstall PySide and check for any logs that say where pyside UIC is installed. Because I have also used python 2.x and I have personally experienced this problem. Check out for the scripts subfolder in python installation directory

Related

cx_Freeze ConfigError: No file named C:\Python\Scripts\cxfreeze.exe\__main__.py (for module __main__)

I would like to create a .exe file of a file named ZCasinoinsulte.py located in C:\Python\Scripts. Moreoever, every time I execute cxfreeze ZCasinoinsulte.py it never works and tells me it does not find _main_.py in cxfreeze.exe.
Specs: I have python 3.9.1 on Windows 10 64bit.
I have installed cx_Freeze-6.5.1 with whl.
It does create an exe file, but it opens and shuts down instantly (even though I put os.system("pause") in ZCasinoinsulte.py).
old code
Any help would be appreciated :D
Edit: I have used the cxfreeze version 6.4.2 and the code runs better without errors. But the exe file closes as soon as I clic on it.
Here is my pip list traceback:
C:\Users\Hmili>pip list
Package Version
------------------ -------
cx-Freeze 6.4.2
importlib-metadata 3.4.0
pip 20.3.3
setuptools 49.2.1
zipp 3.4.0
Here is the traceback when I execute the exe file from cmd:
C:\Python\Mes fichiers python\dist>ZCasinoinsulte.exe
Traceback (most recent call last):
File "c:\python\lib\site-packages\cx_Freeze\initscripts\__startup__.py", line 41, in run
module.run()
File "c:\python\lib\site-packages\cx_Freeze\initscripts\Console.py", line 36, in run
exec(code, m.__dict__)
File "ZCasinoinsulte.py", line 3, in <module>
File "c:\python\lib\site-packages\cx_Freeze\__init__.py", line 1, in <module>
import setuptools
File "c:\python\lib\site-packages\setuptools\__init__.py", line 24, in <module>
from setuptools.depends import Require
File "c:\python\lib\site-packages\setuptools\depends.py", line 6, in <module>
from .py33compat import Bytecode
File "c:\python\lib\site-packages\setuptools\py33compat.py", line 11, in <module>
from setuptools.extern.six.moves import html_parser
File "c:\python\lib\site-packages\setuptools\_vendor\six.py", line 92, in __get__
result = self._resolve()
File "c:\python\lib\site-packages\setuptools\_vendor\six.py", line 115, in _resolve
return _import_module(self.mod)
File "c:\python\lib\site-packages\setuptools\_vendor\six.py", line 82, in _import_module
__import__(name)
ModuleNotFoundError: No module named 'html.parser'
Here are the first ten lines of ZCasinoinsulte.py:
# -*-coding:Latin-1 -*
import os,time
from cx_Freeze import setup, Executable
from random import randrange
argent=3000
while argent>0:
condition1=0
condition2=0
argent=int(argent)
How do I resolve this? (Thanks for the help by the way :) )
I reverted cx_Freeze back to version 6.4.2, seemed to compile fine after that
pip install --upgrade cx-Freeze==6.4.2
Seems to be a bug or something.
First I downgraded pip as James Mackey advised me. The code ran properly and created an exe file. So the first issue was a comptability one.
Moreover, the exe file created crashed instantly when executed. From the traceback of the execution of ZCasinoinsulte.exe with cmd, James Mackey figured the third line of ZCasinoinsulte.py had an error related to it.
The third line of ZCasinoinsulte.py was:
from cx_Freeze import setup, Executable
I erased this line as it has nothing to do with the actual code.
I opened cmd and executed again the command: cxfreeze ZCasinoinsulte.py. The exe file now functions properly.

distutils.util missing after upgrading to 3.8

I just upgraded to Pop OS(Ubuntu) 20.04, which upgraded Python 3.7 to 3.8. Now I get this error below when I run sam (from the AWS SAM CLI). Solutions found online all had to do with making sure python3-distutils is installed. I have verified that python3-disutils is installed. /usr/lib/python3.8/distutils looks fine, just not getting picked up for some reason.
One thing I noticed is that in the traceback below, it's using the system-wide pip, while I have a later version of pip installed under my .local. I don't know if those two symptoms are related but looks like I'm missing some config somewhere so none of the 3.8 or user space stuff is picked up.
Build Failed
Error: PythonPipBuilder:ResolveDependencies - Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python3/dist-packages/pip/_internal/main.py", line 14, in main
from pip._internal.utils.entrypoints import _wrapper
File "/usr/lib/python3/dist-packages/pip/_internal/utils/entrypoints.py", line 3, in <module>
from pip._internal.cli.main import main
File "/usr/lib/python3/dist-packages/pip/_internal/cli/main.py", line 10, in <module>
from pip._internal.cli.autocompletion import autocomplete
File "/usr/lib/python3/dist-packages/pip/_internal/cli/autocompletion.py", line 9, in <module>
from pip._internal.cli.main_parser import create_main_parser
File "/usr/lib/python3/dist-packages/pip/_internal/cli/main_parser.py", line 7, in <module>
from pip._internal.cli import cmdoptions
File "/usr/lib/python3/dist-packages/pip/_internal/cli/cmdoptions.py", line 19, in <module>
from distutils.util import strtobool
ModuleNotFoundError: No module named 'distutils.util'
I have the same issue on Debian Bullseye (or rather mixed Bullseye/Buster).
Package python3-distutils (3.8.6) contains module for Python 3.8 and 3.9 (!).
Old package (3.7.3) for Python 3.7. You have to choose.
My workaround is just copy module.
mkdir -p /usr/lib/python3.7/distutils
cp -a /usr/lib/python3.8/distutils/* /usr/lib/python3.7/distutils/

ImportError: Version check of the existing lazylinker compiled file. Looking for version 0.211, but found None

C:\Users\meela\Anaconda3\python.exe E:/TTIGAN/test.py
You can find the C code in this temporary file: C:\Users\meela\AppData\Local\Temp\theano_compilation_error_zncbj7_k
Traceback (most recent call last):
File "C:\Users\meela\Anaconda3\lib\site-packages\theano\gof\lazylinker_c.py", line 81, in <module>
actual_version, force_compile, _need_reload))
ImportError: Version check of the existing lazylinker compiled file. Looking for version 0.211, but found None. Extra debug information: force_compile=False, _need_reload=True
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\meela\Anaconda3\lib\site-packages\theano\gof\lazylinker_c.py", line 105, in <module>
actual_version, force_compile, _need_reload))
ImportError: Version check of the existing lazylinker compiled file. Looking for version 0.211, but found None. Extra debug information: force_compile=False, _need_reload=True
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "E:/TTIGAN/test.py", line 1, in <module>
import skipthoughts
File "E:\TTIGAN\skipthoughts.py", line 6, in <module>
import theano
File "C:\Users\meela\Anaconda3\lib\site-packages\theano\__init__.py", line 110, in <module>
from theano.compile import (
File "C:\Users\meela\Anaconda3\lib\site-packages\theano\compile\__init__.py", line 12, in <module>
from theano.compile.mode import *
File "C:\Users\meela\Anaconda3\lib\site-packages\theano\compile\mode.py", line 11, in <module>
import theano.gof.vm
File "C:\Users\meela\Anaconda3\lib\site-packages\theano\gof\vm.py", line 674, in <module>
from . import lazylinker_c
File "C:\Users\meela\Anaconda3\lib\site-packages\theano\gof\lazylinker_c.py", line 140, in <module>
preargs=args)
File "C:\Users\meela\Anaconda3\lib\site-packages\theano\gof\cmodule.py", line 2388, in compile_str
(status, compile_stderr.replace('\n', '. ')))
.
Process finished with exit code 1
Same problem here, solved by installing a mingw-w64 import library for python(on Windows via conda) in your CLI type:
conda install -c anaconda libpython
I had the same problem, got me 2 days to resolve!
It was from path environment, i had another mingw path imported in variables and i removed it!
I had the same issue on my Mac. Installing theano via pip should fix this issue.
pip install theano
I had the same problem, it was caused by an old version of anaconda from 2014 that I forgot I even had. Just renaming the old directory fixed the problem.
The solution that worked for me was to uninstall my MinGW gcc compiler and reinstall the latest one. Make sure to restart your CLI before testing it.

openslide python import show:windows error

I am using python 2.7 win 32
I need to install openslide in python
in below page show
Install openslide
http://openslide.org/download/
which item download for windows.
i tried every thing.and pip installation
the error shows below
import openslide
Traceback (most recent call last):
File "<pyshell#2>", line 1, in <module>
import openslide
File "C:\Python27\lib\site-packages\openslide\__init__.py", line 29, in >>>> <module>
from openslide import lowlevel
File "C:\Python27\lib\site-packages\openslide\lowlevel.py", line 41, in <module>
_lib = cdll.LoadLibrary('libopenslide-0.dll')
File "C:\Python27\lib\ctypes\__init__.py", line 443, in LoadLibrary
return self._dlltype(name)
File "C:\Python27\lib\ctypes\__init__.py", line 365, in __init__
self._handle = _dlopen(self._name, mode)
WindowsError: [Error 126] The specified module could not be found
Thanks
This question may be old, but perhaps an answer will help a future viewer.
To fix this error, you need to download the openslide binaries at http://openslide.org/download/ look under (Windows Binaries)
Next, add the location of the bin folder to your system path (this will allow python to know where the module is). And that should solve the problem.
Install instructions found here: https://pypi.python.org/pypi/openslide-python

pip install xlutils python3

I'm trying to install xlutils package to access xls sheets in Python but unfortunately I'm unable to install it.
Python version 3.5.1
using spyder editor, have got this error.
runfile('E:/python_practice/task2/gen1.py', wdir='E:/python_practice/task2')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Anaconda3\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py", line 699, in runfile
execfile(filename, namespace)
File "C:\Anaconda3\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py", line 88, in execfile
exec(compile(open(filename, 'rb').read(), filename, 'exec'), namespace)
File "E:/python_practice/task2/gen1.py", line 10, in <module>
from xlutils.copy import copy
ImportError: No module named 'xlutils'
so, downloaded xlutils from https://pypi.python.org/pypi/xlutils and unzipped, copied and pasted in sitepackages folder of python35 folder and as well as anaconda3 folder.But still i'm getting above mentioned error.
Have you read the docs of this module? It clearly explains everythinf you should do. There is a way to install it using pip. Type this in your command-line: pip install xlutils. That should install it. For any further problems, read the documentation.
EDIT: Never mind, this package is unavailable for Python 3.5
This package is support on Python 2.5, 2.6 and 2.7 on Linux, Mac OS X and Windows.

Resources