Could not import asyncio library in virtualenv.
Python 3.6.4 x32
Win 10 x64
Python 3.6.4 (v3.6.4:d48eceb, Dec 19 2017, 06:04:45) [MSC v.1900 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>import asyncio
Traceback (most recent call last):
File "C:\Python36\Lib\asyncio\__init__.py", line 16, in <module>
from . import _overlapped
ImportError: cannot import name '_overlapped'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python36\Lib\asyncio\__init__.py", line 18, in <module>
import _overlapped # Will also be exported.
OSError: [WinError 0] The operation completed successfully
There is no module _overlapped in asyncio folder "C:\Python36\Lib\asyncio\". Also I know that asyncio is a part of Python from version 3.4.
What is wrong and what should i do? Could it be due to x64 Win and not x64 Python?
Related
Working on a project Control your Computer with Hand Gestures using Arduino
but pyautogui is not supporting me.
Python 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:19:30) [MSC v.1500 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> import pyautogui
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import pyautogui
File "C:\Python27\lib\site-packages\pyautogui\__init__.py", line 80, in <module>
import pyscreeze
SyntaxError: 'return' with argument inside generator (__init__.py, line 168)
>>>
I'm trying to install Flask inside Wine so that I can package with cx_freeze. I've had it working for a while, but I've just added Flask to the project.
However, I can't seem to import Flask due to a missing library required by the core asyncio library. The cause of this is an import that is only included in windows systems called _overlapped. The code can be seen here.
I can confirm that there is a library contained within the dlls folder:
root#375a857194f3:/src# find /root/.wine -iname *overlapped*
/root/.wine/drive_c/Python36/DLLs/_overlapped.pyd
An example import and error message can be found below.
Python 3.6.1 (v3.6.1:69c0db5, Mar 21 2017, 17:54:52) [MSC v.1900 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import asyncio
Traceback (most recent call last):
File "C:\Python36\lib\asyncio\__init__.py", line 16, in <module>
from . import _overlapped
ImportError: cannot import name '_overlapped'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python36\lib\asyncio\__init__.py", line 18, in <module>
import _overlapped # Will also be exported.
OSError: [WinError 10045] Windows Error 0x273d
When I run a code which imports spynner, I get the following error:
> python .\spynner-test.py
Traceback (most recent call last):
File ".\spynner-test.py", line 10, in <module>
import spynner
File "C:\Anaconda\lib\site-packages\spynner\__init__.py", line 2, in <module>
from browser import *
File "C:\Anaconda\lib\site-packages\spynner\browser.py", line 56, in <module>
from PyQt4.QtNetwork import QNetworkCookie, QNetworkAccessManager, QSslConfiguration, QSslCipher
ImportError: DLL load failed: The specified procedure could not be found.
A funny thing is that I can import those things in normal python shell without any problem:
> python
Python 2.7.5 |Anaconda 1.9.2 (64-bit)| (default, Jul 1 2013, 12:37:52) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from PyQt4.QtNetwork import QNetworkCookie, QNetworkAccessManager, QSslConfiguration, QSslCipher
>>>
But after import spynner fails,
> python
Python 2.7.5 |Anaconda 1.9.2 (64-bit)| (default, Jul 1 2013, 12:37:52) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import spynner
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Anaconda\lib\site-packages\spynner\__init__.py", line 2, in <module>
from browser import *
File "C:\Anaconda\lib\site-packages\spynner\browser.py", line 56, in <module>
from PyQt4.QtNetwork import QNetworkCookie, QNetworkAccessManager, QSslConfiguration, QSslCipher
ImportError: DLL load failed: The specified procedure could not be found.
>>> from PyQt4.QtNetwork import QNetworkCookie, QNetworkAccessManager, QSslConfiguration, QSslCipher
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: DLL load failed: The specified procedure could not be found.
>>>
Okay I figured it out. The problem is that spynner first tries to import PySide, and it gets an error in importing QSslConfiguration from PyQt4.QtNetwork. And then it switches to PyQt4, and apparently the previously imported PySide makes the PyQt4 import fail. When I remove the try: part in browser.py I could import spynner fine.
I want to install paramiko on win 7 32bit ,the python is 3.3 .
I can compile it,but get follow errors:
Installed c:\python33\lib\site-packages\paramiko-1.8.0-py3.3.egg
Processing dependencies for paramiko==1.8.0
Searching for pycrypto==2.6
Best match: pycrypto 2.6
Adding pycrypto 2.6 to easy-install.pth file
Using c:\python33\lib\site-packages
Finished processing dependencies for paramiko==1.8.0
C:\Users\MC\Downloads\paramiko-paramiko-v1.8.0-9-g786920a>python
Python 3.3.0 (v3.3.0:bd8afb90ebf2, Sep 29 2012, 10:55:48) [MSC v.1600 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import paramiko
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File ".\paramiko\__init__.py", line 62, in <module>
from .transport import SecurityOptions, Transport
File ".\paramiko\transport.py", line 68, in <module>
class SecurityOptions (object):
ValueError: 'ciphers' in __slots__ conflicts with class variable
>>>
Paramiko does not run on Python 3. Yet. I'm working on a development branch (https://github.com/dorianpula/paramiko/tree/python3-support) to add support for Python 3, and I'm working on fixing this particular issue.
I have followed the installation directions to install the GHMM library. However, I still get the following error:
Python 2.6.6 (Apr 11 2011, 15:50:32)
[GCC 4.4.4 20100726 (Red Hat 4.4.4-13)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import ghmm
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "ghmm.py", line 112, in <module>
import ghmmwrapper
File "ghmmwrapper.py", line 25, in <module>
_ghmmwrapper = swig_import_helper()
File "ghmmwrapper.py", line 17, in swig_import_helper
import _ghmmwrapper
ImportError: libghmm.so.1: cannot open shared object file: No such file or directory
I tried to change my LD_PRELOAD_PATH variable to /usr/local/lib to no avail.
Also, when I try to locate libghmm, I get the following, so the libraries are definitely there:
% locate libghmm
/usr/local/lib/libghmm.a
/usr/local/lib/libghmm.la
/usr/local/lib/libghmm.so
/usr/local/lib/libghmm.so.1
/usr/local/lib/libghmm.so.1.0.0
Any ideas?