I am new to python world. I am trying to install plotly to explore visualization. I installed pip. upgraded it. after that, I downloaded plotly. However, while importing it, it still shows error.
!python -m pip install --upgrade pip
It showed,
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 upgraded pip,
!python -m pip install --upgrade pip
it shows,
Requirement already up-to-date: pip in c:\python27\lib\site-packages
After,
!pip install plotly --upgrade
it showed,
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.
when I am importing plotly,
import plotly
It shows,
No module named plotly
I aplogozise for the long question. But how should I deal with this? Is there something to do with API key?
I generated my API key and tried with
plotly.tools.set_credentials_file(username='DemoAccount', api_key='hcv50j3UCMhj6Q0iRXZr')
it says plotly is not defined. is it the correct syntax? Can someone please tell me step by step process roght from pip? Is there other way around?
Thank you.