Qt5 in Anaconda

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Qt5 in Anaconda

WingIDE - User mailing list
Hi,
Trying to use Qt5 in Anaconda, Python 3.5,2/32 on Win 7/64,  I've installed PyQt 5.5.1, Qt 5.5.1 and set the Python executable path to d:\SVNRepo\projects-sw\Qt5\trunk\env\python.exe.  I also added the Scripts directory to the project's Python path.  I tried both a PyQt and Generic project.

When I run qtdemo,py from the examples directory (following the PyQt How-to) and an example from another source I get this error:

File "D:\SVNRepo\projects-sw\Qt5\trunk\env\Lib\site-packages\examples\qtdemo\qtdemo.py", line 46, in <module>
  from PyQt5.QtCore import QEventLoop, QTime

builtins.ImportError: DLL load failed: The specified module could not be found.

If I go to the Debug Probe:
import PyQt5 <- no error
import PyQt5.QtWidgets <- autocomplete works fine but get:

Traceback (most recent call last):
  Debug Probe, prompt 8, line 1
builtins.ImportError: DLL load failed: The specified module could not be found.

QtWidgets.pyd is in the PyQt5 directory in site-packages.

If I open a command window, activate the environment, open a Python interpreter and type the above imports there are no errors.

I printed the Python path from Wing:
['d:\\SVNRepo\\projects-sw\\Qt5\\trunk\\env\\src',
 'd:\\SVNRepo\\projects-sw\\Qt5\\trunk\\env\\Scripts',
 'd:\\SVNRepo\\projects-sw\\Qt5\\trunk\\env\\src',
 'd:\\SVNRepo\\projects-sw\\Qt5\\trunk\\env\\python35.zip',
 'd:\\SVNRepo\\projects-sw\\Qt5\\trunk\\env\\DLLs',
 'd:\\SVNRepo\\projects-sw\\Qt5\\trunk\\env\\lib',
 'd:\\SVNRepo\\projects-sw\\Qt5\\trunk\\env',
 'd:\\SVNRepo\\projects-sw\\Qt5\\trunk\\env\\lib\\site-packages',
 'd:\\SVNRepo\\projects-sw\\Qt5\\trunk\\env\\lib\\site-packages\\Quamash-0.5.5-py3.5.egg',
 'd:\\SVNRepo\\projects-sw\\Qt5\\trunk\\env\\lib\\site-packages\\setuptools-25.1.6-py3.5.egg']

And the interpreter:
['',
 'd:\\SVNRepo\\projects-sw\\Qt5\\trunk\\env\\Scripts',
 'd:\\SVNRepo\\projects-sw\\Qt5\\trunk\\env\\src',
 'd:\\SVNRepo\\projects-sw\\Qt5\\trunk\\env',
 'd:\\SVNRepo\\projects-sw\\Qt5\\trunk\\env\\python35.zip',
 'd:\\SVNRepo\\projects-sw\\Qt5\\trunk\\env\\DLLs',
 'd:\\SVNRepo\\projects-sw\\Qt5\\trunk\\env\\lib',
 'd:\\SVNRepo\\projects-sw\\Qt5\\trunk\\env\\lib\\site-packages',
 'd:\\SVNRepo\\projects-sw\\Qt5\\trunk\\env\\lib\\site-packages\\Quamash-0.5.5-py3.5.egg',
 'd:\\SVNRepo\\projects-sw\\Qt5\\trunk\\env\\lib\\site-packages\\setuptools-25.1.6-py3.5.egg']

Seems like a Wing setting but having trouble figuring it out...

Thanks,
Eric

_________________________________________________
Wing IDE users list
http://wingware.com/lists/wingide
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Qt5 in Anaconda

WingIDE - User mailing list
Eric Earnst via wingide-users wrote:
> File
> "D:\SVNRepo\projects-sw\Qt5\trunk\env\Lib\site-packages\examples\qtdemo\qtdemo.py",
> line 46, in <module>
>   from PyQt5.QtCore import QEventLoop, QTime
>
> builtins.ImportError: DLL load failed: The specified module could not
> be found.

Since it's a DLL that's failing to load I think you need to add the
directory where it's located to the PATH env as well.  On Linux that
would be LD_LIBRARY_PATH and on OS X it is DYLD_LIBRARY_PATH.

Please let me know if this does not help.

Thanks,

--

Stephan Deibel
Wingware | Python IDE

The Intelligent Development Environment for Python Programmers

wingware.com

_________________________________________________
Wing IDE users list
http://wingware.com/lists/wingide
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Qt5 in Anaconda

WingIDE - User mailing list
Hi,
I added  'D:\\SVNRepo\\projects-sw\\Qt5\\trunk\\env\\Library\\bin', to the path, this is where Qt5Widgets.dll is located.  Still failing on:

import PyQt5.QtWidgets

 File "d:\SVNRepo\projects-sw\Qt5\trunk\env\src\demo.py", line 8, in <module>
  import PyQt5.QtWidgets

builtins.ImportError: DLL load failed: The specified module could not be found.

I opened a command window, activated the environment and ran qtdemo.py and my test program and the both ran without a problem.

Thanks,
Eric

Full python path for Wing:
['d:\\SVNRepo\\projects-sw\\Qt5\\trunk\\env\\src',
 'D:\\SVNRepo\\projects-sw\\Qt5\\trunk\\env\\Library\\bin',   (tried 'D:\\SVNRepo\\projects-sw\\Qt5\\trunk\\env\\Library' too)
 'd:\\SVNRepo\\projects-sw\\Qt5\\trunk\\env\\Scripts',
 'd:\\SVNRepo\\projects-sw\\Qt5\\trunk\\env\\src',
 'd:\\SVNRepo\\projects-sw\\Qt5\\trunk\\env\\python35.zip',
 'd:\\SVNRepo\\projects-sw\\Qt5\\trunk\\env\\DLLs',
 'd:\\SVNRepo\\projects-sw\\Qt5\\trunk\\env\\lib',
 'd:\\SVNRepo\\projects-sw\\Qt5\\trunk\\env',
 'd:\\SVNRepo\\projects-sw\\Qt5\\trunk\\env\\lib\\site-packages',
 'd:\\SVNRepo\\projects-sw\\Qt5\\trunk\\env\\lib\\site-packages\\Quamash-0.5.5-py3.5.egg',
 'd:\\SVNRepo\\projects-sw\\Qt5\\trunk\\env\\lib\\site-packages\\setuptools-25.1.6-py3.5.egg']


On Wed, Aug 24, 2016 at 5:47 AM, Wingware Support <[hidden email]> wrote:
Eric Earnst via wingide-users wrote:
File "D:\SVNRepo\projects-sw\Qt5\trunk\env\Lib\site-packages\examples\qtdemo\qtdemo.py", line 46, in <module>
  from PyQt5.QtCore import QEventLoop, QTime

builtins.ImportError: DLL load failed: The specified module could not be found.

Since it's a DLL that's failing to load I think you need to add the directory where it's located to the PATH env as well.  On Linux that would be LD_LIBRARY_PATH and on OS X it is DYLD_LIBRARY_PATH.

Please let me know if this does not help.

Thanks,

--

Stephan Deibel
Wingware | Python IDE

The Intelligent Development Environment for Python Programmers

wingware.com



_________________________________________________
Wing IDE users list
http://wingware.com/lists/wingide
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Qt5 in Anaconda

WingIDE - User mailing list
Eric Earnst wrote:

> I added  'D:\\SVNRepo\\projects-sw\\Qt5\\trunk\\env\\Library\\bin', to
> the path, this is where Qt5Widgets.dll is located.  Still failing on:
>
> import PyQt5.QtWidgets
>
>  File "d:\SVNRepo\projects-sw\Qt5\trunk\env\src\demo.py", line 8, in
> <module>
>    import PyQt5.QtWidgets
>
> builtins.ImportError: DLL load failed: The specified module could not be
> found.
>
> I opened a command window, activated the environment and ran qtdemo.py
> and my test program and the both ran without a problem.
>
> Thanks,
> Eric
>
> Full python path for Wing:
> ['d:\\SVNRepo\\projects-sw\\Qt5\\trunk\\env\\src',
>   'D:\\SVNRepo\\projects-sw\\Qt5\\trunk\\env\\Library\\bin',   (tried
> 'D:\\SVNRepo\\projects-sw\\Qt5\\trunk\\env\\Library' too)
>   'd:\\SVNRepo\\projects-sw\\Qt5\\trunk\\env\\Scripts',
>   'd:\\SVNRepo\\projects-sw\\Qt5\\trunk\\env\\src',
>   'd:\\SVNRepo\\projects-sw\\Qt5\\trunk\\env\\python35.zip',
>   'd:\\SVNRepo\\projects-sw\\Qt5\\trunk\\env\\DLLs',
>   'd:\\SVNRepo\\projects-sw\\Qt5\\trunk\\env\\lib',
>   'd:\\SVNRepo\\projects-sw\\Qt5\\trunk\\env',
>   'd:\\SVNRepo\\projects-sw\\Qt5\\trunk\\env\\lib\\site-packages',
>   'd:\\SVNRepo\\projects-sw\\Qt5\\trunk\\env\\lib\\site-packages\\Quamash-0.5.5-py3.5.egg',
>   'd:\\SVNRepo\\projects-sw\\Qt5\\trunk\\env\\lib\\site-packages\\setuptools-25.1.6-py3.5.egg']

Hi,

Please note that I'm not talking about PYTHONPATH but PATH -- the two
are different.  PYTHONPATH is used only by Python to load Python code
and extension modules.  PATH is the system path where Windows looks for
executables and DLLs.  As I noted in my earlier email, on Linux and OS X
the env name is different, but since you're on Windows you should be
setting PATH in the Environment tab of Project Properties.

Please let me know whether this helps.

Thanks,

--

Stephan Deibel
Wingware | Python IDE

The Intelligent Development Environment for Python Programmers

wingware.com

_________________________________________________
Wing IDE users list
http://wingware.com/lists/wingide
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Qt5 in Anaconda

WingIDE - User mailing list
Hi,
Sorry, didn't read your response carefully enough.  First I added os.getenv('PATH') to the top of the program and found that the bin directory was already there (first item in the path).  I diffed the differences between os.getenv('PATH') (after removing the changes to the Environment tab) with what I got in the command window with the activated environment and found a few differences.  I added:

PATH=D:\SVNRepo\projects-sw\Qt5\trunk\env\Scripts

And it worked!

Not sure what it was looking for though there are a bunch of icu dlls there that seem to be related to unicode (ICU Project).  I vaguely remember a dependency that Conda installed with icu in the name when I installed the Qt/PyQt packages.

Thanks for the help,
Eric

On Wed, Aug 24, 2016 at 9:24 AM, Wingware Support <[hidden email]> wrote:
Eric Earnst wrote:
I added  'D:\\SVNRepo\\projects-sw\\Qt5\\trunk\\env\\Library\\bin', to
the path, this is where Qt5Widgets.dll is located.  Still failing on:

import PyQt5.QtWidgets

 File "d:\SVNRepo\projects-sw\Qt5\trunk\env\src\demo.py", line 8, in
<module>
   import PyQt5.QtWidgets

builtins.ImportError: DLL load failed: The specified module could not be
found.

I opened a command window, activated the environment and ran qtdemo.py
and my test program and the both ran without a problem.

Thanks,
Eric

Full python path for Wing:
['d:\\SVNRepo\\projects-sw\\Qt5\\trunk\\env\\src',
  'D:\\SVNRepo\\projects-sw\\Qt5\\trunk\\env\\Library\\bin',   (tried
'D:\\SVNRepo\\projects-sw\\Qt5\\trunk\\env\\Library' too)
  'd:\\SVNRepo\\projects-sw\\Qt5\\trunk\\env\\Scripts',
  'd:\\SVNRepo\\projects-sw\\Qt5\\trunk\\env\\src',
  'd:\\SVNRepo\\projects-sw\\Qt5\\trunk\\env\\python35.zip',
  'd:\\SVNRepo\\projects-sw\\Qt5\\trunk\\env\\DLLs',
  'd:\\SVNRepo\\projects-sw\\Qt5\\trunk\\env\\lib',
  'd:\\SVNRepo\\projects-sw\\Qt5\\trunk\\env',
  'd:\\SVNRepo\\projects-sw\\Qt5\\trunk\\env\\lib\\site-packages',
  'd:\\SVNRepo\\projects-sw\\Qt5\\trunk\\env\\lib\\site-packages\\Quamash-0.5.5-py3.5.egg',
  'd:\\SVNRepo\\projects-sw\\Qt5\\trunk\\env\\lib\\site-packages\\setuptools-25.1.6-py3.5.egg']

Hi,

Please note that I'm not talking about PYTHONPATH but PATH -- the two are different.  PYTHONPATH is used only by Python to load Python code and extension modules.  PATH is the system path where Windows looks for executables and DLLs.  As I noted in my earlier email, on Linux and OS X the env name is different, but since you're on Windows you should be setting PATH in the Environment tab of Project Properties.

Please let me know whether this helps.


Thanks,

--

Stephan Deibel
Wingware | Python IDE

The Intelligent Development Environment for Python Programmers

wingware.com



_________________________________________________
Wing IDE users list
http://wingware.com/lists/wingide
Loading...