Ich bin neu in Python Welt. Ich versuche plotly zu installieren, um die Visualisierung zu erkunden. Ich habe Pip installiert. verbesserte es. Danach habe ich plotly heruntergeladen. Beim Importieren wird jedoch weiterhin ein Fehler angezeigt.Fehler bei der Installation von Plotly, obwohl es Pip und Plotly zeigt erfolgreich aktualisiert
!python -m pip install --upgrade pip
Es zeigte sich,
Collecting pip
Using cached pip-9.0.1-py2.py3-none-any.whl
Installing collected packages: pip
Found existing installation: pip 7.0.3
Uninstalling pip-7.0.3:
Successfully uninstalled pip-7.0.3
Rolling back uninstall of pip
You are using pip version 7.0.3, however version 9.0.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
Exception:
Traceback (most recent call last):
File "C:\Python27\lib\site-packages\pip-7.0.3-py2.7.egg\pip\basecommand.py", line 223, in main
status = self.run(options, args)
File "C:\Python27\lib\site-packages\pip-7.0.3-py2.7.egg\pip\commands\install.py", line 297, in run
root=options.root_path,
File "C:\Python27\lib\site-packages\pip-7.0.3-py2.7.egg\pip\req\req_set.py", line 622, in install
**kwargs
File "C:\Python27\lib\site-packages\pip-7.0.3-py2.7.egg\pip\req\req_install.py", line 808, in install
self.move_wheel_files(self.source_dir, root=root)
File "C:\Python27\lib\site-packages\pip-7.0.3-py2.7.egg\pip\req\req_install.py", line 1003, in move_wheel_files
isolated=self.isolated,
File "C:\Python27\lib\site-packages\pip-7.0.3-py2.7.egg\pip\wheel.py", line 449, in move_wheel_files
generated.extend(maker.make(spec))
File "C:\Python27\lib\site-packages\pip-7.0.3-py2.7.egg\pip\_vendor\distlib\scripts.py", line 323, in make
self._make_script(entry, filenames, options=options)
File "C:\Python27\lib\site-packages\pip-7.0.3-py2.7.egg\pip\_vendor\distlib\scripts.py", line 227, in _make_script
self._write_script(scriptnames, shebang, script, filenames, ext)
File "C:\Python27\lib\site-packages\pip-7.0.3-py2.7.egg\pip\_vendor\distlib\scripts.py", line 163, in _write_script
launcher = self._get_launcher('t')
File "C:\Python27\lib\site-packages\pip-7.0.3-py2.7.egg\pip\_vendor\distlib\scripts.py", line 302, in _get_launcher
result = finder(distlib_package).find(name).bytes
AttributeError: 'NoneType' object has no attribute 'bytes'
I Pip aufgerüstet,
!python -m pip install --upgrade pip
es zeigt,
Requirement already up-to-date: pip in c:\python27\lib\site-packages
Nach,
!pip install plotly --upgrade
es zeigte,
Requirement already up-to-date: plotly in c:\python27\lib\site-packages
Requirement already up-to-date: requests in c:\python27\lib\site-packages (from plotly)
Collecting six (from plotly)
Downloading six-1.10.0-py2.py3-none-any.whl
Requirement already up-to-date: pytz in c:\python27\lib\site-packages (from plotly)
Installing collected packages: six
Found existing installation: six 1.9.0
Uninstalling six-1.9.0:
Successfully uninstalled six-1.9.0
Successfully installed six-1.10.0
You are using pip version 7.0.3, however version 9.0.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
wenn ich plotly am Import
import plotly
Es zeigt,
No module named plotly
ich für die lange Frage aplogozise. Aber wie soll ich damit umgehen? Gibt es etwas mit API-Schlüssel zu tun?
erzeugen ich meinen API-Schlüssel und versuchte, mit
plotly.tools.set_credentials_file(username='DemoAccount', api_key='hcv50j3UCMhj6Q0iRXZr')
es plotly sagt, ist nicht definiert. Ist es die korrekte Syntax? Kann mir bitte jemand bitte Schritt für Schritt den Prozess vom Pip aus erzählen? Gibt es anders herum?
Vielen Dank.
Es hat funktioniert! Ich habe meinen Pfad, wo Site-Pakete waren und plotly importiert. Vielen Dank. –
Ich wäre dankbar, wenn Sie meine Antwort als die richtige akzeptiert und gab es eine positive Bewertung :) –