简体   繁体   中英

pip freeze doesn't show anything in Windows installation?

I have Python27 installed in Windows 7

I am trying to build a reddit bot using this tutorial

I found instructions on how to install pip for windows from here

The page says that after installing pip, I can use pip freeze to check if the installation went correctly

It says pip freeze should display some information as shown below

Microsoft Windows [Version 6.2.9200] (c) 2012 Microsoft Corporation. All rights reserved.

C:\\Users\\Username>cd c:\\Python27\\Scripts

c:\\Python27\\Scripts>pip freeze
antiorm==1.1.1
enum34==1.0
requests==2.3.0 virtualenv==1.11.6

However pip freeze doesn't show me anything at all在此处输入图片说明

Did pip install correctly, or is there any problem? Is there any other way i can test proper installation?

If you want to test it thoroughly, you can use your actual pip installation to install something. For example, numpy would be a good sized example that can rule many problems out.

> pip install numpy

Now, run pip freeze again to check if pip is working as expected. It should then have something to show.

If you want to test it even further, you can open a terminal and

> python
> import numpy

That should be the complete test of your pip installation.

Additionally, whenever I install a new tool in my stack, I like to validate its path with where <executable name> (on Windows) and which <executable name> (on Linux). There are some compilers like Java that are always conflicting with other installations (like crazy, to the point that a complex setup may sometimes have to inject an absolute path to enforce the use of the correct version).

Also, asking the executable for its version can rule many other problems out. In your case, you can use pip --version to check which version you got and compare it to the stable or latest, according to what you want to use.

如果您来自 Linux 背景,windows 是一个令人困惑的软件......对我有用的解决方案如下

pip list

The problem you are facing is that if you only have de default packages in your installation lets say pip, wheel, pip freeze does not have anything to freeze at the moment so that's why dont show anything. try to install a new package then run the command again.

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