简体   繁体   中英

Pip install giving SyntaxError in Anaconda

I installed anaconda2 over python 2.7 and i am on Windows 10. when I am trying to use pip , Syntax error is coming. I am using basic cmd to access pip , even without the environment variable thing , it's not working . Can anybody explain what am I doing wrong ?

Error:

C:\Users\Yash gupta\Anaconda2\Scripts>python
Python 2.7.13 |Anaconda 4.4.0 (64-bit)| (default, May 11 2017, 13:17:26) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://anaconda.org
>>> pip install bs4
  File "<stdin>", line 1
    pip install bs4
              ^
SyntaxError: invalid syntax
>>>

you are using pip in python environment.

You must quit python and run pip install bs4 with the shell.

If you want to install the library only in a specific anaconda environment, lunch the source activate <yourEnv> command and then use pip install .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM