Installation error on Dash

Hi everyone, I am new to Plotly, and trying to follow the tutorial to get familiar to it.
But stuck with installation, need your help.

pip 10.0.0
python 2.7.12
ubuntu 16.04

pip install dash==0.21.0 # The core dash backend
After the first commond entered,it shows:

pip install dash-renderer==0.12.1 # The dash front-end
After second:

“Collecting dash-renderer==0.12.1
Installing collected packages: dash-renderer”

pip install dash-html-components==0.10.0 # HTML components
After third:

pip install dash-core-components==0.22.1 # Supercharged components
After fourth:

pip install plotly --upgrade # Plotly graphing library used in examples
After the fifth:

"Collecting plotly
Requirement not upgraded as not directly required: six in ./.local/lib/python2.7/site-packages (from plotly) (1.11.0)
Requirement not upgraded as not directly required: nbformat>=4.2 in ./.local/lib/python2.7/site-packages (from plotly) (4.4.0)
Requirement not upgraded as not directly required: pytz in ./.local/lib/python2.7/site-packages (from plotly) (2018.4)
Requirement not upgraded as not directly required: decorator>=4.0.6 in ./.local/lib/python2.7/site-packages (from plotly) (4.3.0)
Requirement not upgraded as not directly required: requests in ./.local/lib/python2.7/site-packages (from plotly) (2.18.4)
Requirement not upgraded as not directly required: traitlets>=4.1 in ./.local/lib/python2.7/site-packages (from nbformat>=4.2->plotly) (4.3.2)
Requirement not upgraded as not directly required: ipython-genutils in ./.local/lib/python2.7/site-packages (from nbformat>=4.2->plotly) (0.2.0)
Requirement not upgraded as not directly required: jupyter-core in ./.local/lib/python2.7/site-packages (from nbformat>=4.2->plotly) (4.4.0)
Requirement not upgraded as not directly required: jsonschema!=2.5.0,>=2.4 in ./.local/lib/python2.7/site-packages (from nbformat>=4.2->plotly) (2.6.0)
Requirement not upgraded as not directly required: certifi>=2017.4.17 in ./.local/lib/python2.7/site-packages (from requests->plotly) (2018.1.18)
Requirement not upgraded as not directly required: chardet<3.1.0,>=3.0.2 in ./.local/lib/python2.7/site-packages (from requests->plotly) (3.0.4)
Requirement not upgraded as not directly required: idna<2.7,>=2.5 in ./.local/lib/python2.7/site-packages (from requests->plotly) (2.6)
Requirement not upgraded as not directly required: urllib3<1.23,>=1.21.1 in ./.local/lib/python2.7/site-packages (from requests->plotly) (1.22)
Requirement not upgraded as not directly required: enum34; python_version == “2.7” in ./.local/lib/python2.7/site-packages (from traitlets>=4.1->nbformat>=4.2->plotly) (1.1.6)
Requirement not upgraded as not directly required: functools32; python_version == “2.7” in ./.local/lib/python2.7/site-packages (from jsonschema!=2.5.0,>=2.4->nbformat>=4.2->plotly) (3.2.3.post2)
Installing collected packages: plotly
“”

Then I create and copy the code into the file app.py ,but when execute ‘‘python app.py’’
It shows:

Traceback (most recent call last):
** File “app.py”, line 2, in **
** import dash**
ImportError: No module named dash

Anyone can help me to find out the reason of this error?
Thanks!

It looks like the python installation you’re getting on the command line is either not the same as the one used to install those libraries, or its just not picking up the libraries somehow (and nothing to do with Dash in particular). I see that the packages are being installed into ~/.local. Is that because you used the --user flag to pip?

Using virtualenvs to manage locally installed packages is generally easier than installing them with the --user flag. I would suggest going down that route instead. There’s plenty of tutorials out there on how to start with virtualenvs.