2016-05-12 24 views
0

Ich bin zu import pyperclip in einem Python REPL Tab erhabener Text versucht, 3, aber ich bekomme die folgende Fehlermeldung:sublimeREPL kann nicht importieren _ctypes

Python 3.5.1 (v3.5.1:37a07cee5969, Dec 6 2015, 01:54:25) [MSC v.1900 64 bit (AMD64)] on win32 
Type "help", "copyright", "credits" or "license" for more information. 
>>> import pyperclip 
Traceback (most recent call last): 
    File "<stdin>", line 1, in <module> 
    File "C:\Users\a\AppData\Local\Programs\Python\Python35\lib\site-packages\pyperclip\__init__.py", line 31, in <module> 
    from .clipboards import (init_osx_clipboard, 
    File "C:\Users\a\AppData\Local\Programs\Python\Python35\lib\site-packages\pyperclip\clipboards.py", line 3, in <module> 
    from .exceptions import PyperclipException 
    File "C:\Users\a\AppData\Local\Programs\Python\Python35\lib\site-packages\pyperclip\exceptions.py", line 1, in <module> 
    import ctypes 
    File "C:\Users\a\AppData\Local\Programs\Python\Python35\lib\ctypes\__init__.py", line 7, in <module> 
    from _ctypes import Union, Structure, Array 
ImportError: Module use of python33.dll conflicts with this version of Python. 

Es stellt sich heraus, dass ich nicht _ctypes überhaupt importieren :

>>> import _ctypes 
Traceback (most recent call last): 
    File "<stdin>", line 1, in <module> 
ImportError: Module use of python33.dll conflicts with this version of Python. 
>>> 

Gleiche Einfuhren auf eine Eingabeaufforderung oder IDLE arbeiten, also warum nicht in sublimeREPL?

Antwort

0

fanden folgende verwandte Themen auf GitHub:

Das Problem tritt auf, wenn ich versuche Befehle direkt in REPL zu laufen, anstatt die Ausführung eine Datei. In Ausgabe 140 wurde ein Patch vorgeschlagen, aber es ist für ST2. Ich weiß nicht, wie es für Windows und ST3 gilt. Eigentlich war es sehr einfach den Patch anzuwenden, ich musste nur die richtige Datei finden. Auf meiner Win 10 Maschine musste ich zu %APPDATA%/Sublime Text 3/Packages/SublimeREPL gehen (nicht dasselbe wie Hauptinstallationsordner) und die sublimerepl.py Datei bearbeiten, wie im Patch beschrieben.

+1

Es gibt eine Möglichkeit, es zu beheben, gib mir nur ein bisschen, da ich gerade nicht auf Windows bin ... – MattDMo

+0

Danke, @MattDMo! Ich konnte es leicht beheben. Ich musste nur wissen, dass es reparierbar ist, denke ich. :) – AXO