Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/python-3.x/19.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python异步IO'_重叠';不是进口的_Python_Python 3.x_Python 3.6_Python Asyncio - Fatal编程技术网

Python异步IO'_重叠';不是进口的

Python异步IO'_重叠';不是进口的,python,python-3.x,python-3.6,python-asyncio,Python,Python 3.x,Python 3.6,Python Asyncio,无法在virtualenv中导入异步IO库 Python 3.6.4 x32 赢10 x64 win32上的Python 3.6.4(v3.6.4:d48eceb,2017年12月19日,06:04:45)[MSC v.1900 32位(英特尔)] 有关详细信息,请键入“帮助”、“版权”、“信用证”或“许可证”。 >>>导入异步 回溯(最近一次呼叫最后一次): 文件“C:\Python36\Lib\asyncio\\uuuuu init\uuuuuu.py”,第16行,在 从…起导入重叠 I

无法在virtualenv中导入异步IO库

  • Python 3.6.4 x32
  • 赢10 x64
win32上的Python 3.6.4(v3.6.4:d48eceb,2017年12月19日,06:04:45)[MSC v.1900 32位(英特尔)] 有关详细信息,请键入“帮助”、“版权”、“信用证”或“许可证”。 >>>导入异步 回溯(最近一次呼叫最后一次): 文件“C:\Python36\Lib\asyncio\\uuuuu init\uuuuuu.py”,第16行,在 从…起导入重叠 ImportError:无法导入名称“\u重叠” 在处理上述异常期间,发生了另一个异常: 回溯(最近一次呼叫最后一次): 文件“”,第1行,在 文件“C:\Python36\Lib\asyncio\\uuuuu init\uuuuuu.py”,第18行,在 导入重叠也将导出。 操作错误:[WinError 0]操作已成功完成 异步IO文件夹“C:\Python36\Lib\asyncio\”中没有重叠的模块。我还知道asyncio是3.4版Python的一部分


怎么了?我该怎么办?这可能是因为x64 Win而不是x64 Python吗?

我猜您的virtualenv是使用不同比特数的Python创建的,当前安装在您的系统中。尝试使用当前安装的Python重新创建VirtualEnvironment,看看asyncio是否有效。@MikhailGerasimov,非常感谢,我的解决方案是删除Python 3.6.4 x32,删除虚拟环境并使用新的Python 3.6.4 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