2017-06-15 1 views
0

importieren habe ich ein Pip von send2trash installieren und das ist die Botschaft, die ich habe:kann nicht Modul sent2trash in Python

Admins-MacBook-Pro-2:~ kylefoley$ pip install send2trash 
Collecting send2trash 
    Downloading Send2Trash-1.3.0.tar.gz 
Building wheels for collected packages: send2trash 
    Running setup.py bdist_wheel for send2trash 
    Stored in directory: /Users/kylefoley/Library/Caches/pip/wheels/15/76/b3/a81bb5d0bfc6157d1e5df52d34cbea6ffe8a0fc6fea83bddb0 
Successfully built send2trash 
Installing collected packages: send2trash 
Exception: 
Traceback (most recent call last): 
    File "/Library/Python/2.7/site-packages/pip/basecommand.py", line 211, in main 
    status = self.run(options, args) 
    File "/Library/Python/2.7/site-packages/pip/commands/install.py", line 311, in run 
    root=options.root_path, 
    File "/Library/Python/2.7/site-packages/pip/req/req_set.py", line 646, in install 
    **kwargs 
    File "/Library/Python/2.7/site-packages/pip/req/req_install.py", line 803, in install 
    self.move_wheel_files(self.source_dir, root=root) 
    File "/Library/Python/2.7/site-packages/pip/req/req_install.py", line 998, in move_wheel_files 
    isolated=self.isolated, 
    File "/Library/Python/2.7/site-packages/pip/wheel.py", line 339, in move_wheel_files 
    clobber(source, lib_dir, True) 
    File "/Library/Python/2.7/site-packages/pip/wheel.py", line 310, in clobber 
    ensure_dir(destdir) 
    File "/Library/Python/2.7/site-packages/pip/utils/__init__.py", line 71, in ensure_dir 
    os.makedirs(path) 
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 157, in makedirs 
    mkdir(name, mode) 
OSError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/send2trash' 
You are using pip version 7.1.2, however version 9.0.1 is available. 
You should consider upgrading via the 'pip install --upgrade pip' command. 

Wenn ich versuche, send2trash ich ModuleNotFoundError bekommen zu verwenden: Kein Modul namens ‚send2trash‘

Vielleicht ist das Problem, dass ich Python 3 verwende und der pip es in Python 2.7 installiert. Ich weiß nicht, wie man send2trash installiert, so dass Python 3 es jedoch verwendet.


Update:

Hallo Marekful, Vielen Dank für den Versuch, mir zu helfen. Ich habe versucht, Ihre Vorschläge, aber sie haben nicht funktioniert

Antwort

0

Build erfolgreich, aber die Installation schlägt fehl aufgrund von Berechtigungen Probleme.

OSError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/send2trash'

Führen Sie den Befehl mit sudo:

Admins-MacBook-Pro-2:~ kylefoley$ sudo pip install send2trash 
+0

Update zu sehen. (Ich weiß nicht, warum stackoverflow uns nicht erlaubt, längere Kommentare zu machen) – bobsmith76

+0

Diesmal erfolgreich installiert: 'send2trash-1.3.0 erfolgreich installiert ' – marekful

+0

ja, aber es funktioniert immer noch nicht. Ich bekomme immer noch den gleichen Fehler in Python. – bobsmith76