简体   繁体   中英

Did I install pip correctly?

I'm new to python and the tutorial I'm using suggested for me to install four important packages (distribute, pip, nose and virtual env).

I've installed the first two using setup.py in Windows PowerShell

Problem is I can't figure out how to use pip. I've tried doing commands for pip in the cmd, python idle shell and powershell. All of them return something similar to pip is not defined or there is a syntax error

Here's what i type which results to syntax error

pip freeze

pip list --outdated

Anyone know if I've done something wrong installing pip?

Notes: I'm using Windows 7 I've checked the Python2.7 directory and pip is in the Scripts folder. I've also used help("modules") in the Python Idle shell and it lists pip in the modules

To add an answer to this question (it was provided in the comments by Joran Beasley), the issue here was that pip installs to the python/Scipts directory, but that was not in the path by default on Windows. Adding C:\\Python27\\Scripts to the path fixed the issue. This answer describes adding a directory to the path on Windows 7.

如果你是ubuntu,你只需要用aptget安装pip

sudo apt-get install python-pip

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