Reputation: 77
I'm having trouble importing plotly using pip install. The error I get is as follows:
The following command must be run outside of the IPython shell:
$ pip install plotly
The Python package manager (pip) can only be used from outside of IPython.
Please reissue the `pip` command in a separate terminal or command prompt.
I'm very new to programming, so I simply tried this in the windows command prompt and it said "pip is not recognized as an internal or external command, operable program, or batch file". I'm using Spyder if that helps, but I'm not sure what I'm missing here.
Thanks for your help.
Upvotes: 3
Views: 18043
Reputation: 81
If you are getting below error while installing any python packages in window using command "pip install packageName".
The following command must be run outside of the IPython shell:
$ pip install configobj
The Python package manager (pip) can only be used from outside of IPython.
Please reissue the `pip` command in a separate terminal or command prompt.
See the Python documentation for more information on how to install packages:
https://docs.python.org/3/installing/
solution: add "!" at beginning of pip
!pip install configobj(packageName)
It will work. It worked in my case.
Upvotes: 1
Reputation: 113
I guess you forgot to put ! before pip. try:
!pip install plotly
in your notebook, should work.
Upvotes: 6
Reputation: 125
What worked for me was going to the directory in which Spyder is located, which you can do by searching Spyder
on your computer and then right clicking → directory, and then in the directory opening the Anaconda Prompt. In this Prompt you can type in:
pip install [packagename]
and it will work.
Upvotes: 0
Reputation: 46
For windows the cleanest way to install a python package is to:
python -m pip install [packagename]
This removes the ambiguity if pip is added to the path variable or not.
Upvotes: 2