我不能使用点子(Windows) [英] I can't use pip (Windows)
问题描述
我想学习机器学习,但这需要我使用"pip".我对这些东西仍然很陌生.我已经安装了64位Python 3.4和get-py.py.
I'm wanting to learn machine learning, but it requires that I use 'pip.' I'm still very new to a lot of this stuff. I've installed Python 3.4 64-bit and get-py.py.
当我运行pip install sklearn
时,我得到'pip' is not recognized as an internal or external command, operable program or batch file.
这是我的环境变量PATH的屏幕截图
Here's a screenshot of my environmental variable PATH
https://gyazo.com/c7ec926401878845d5c4f9a556cf00ee
任何帮助将不胜感激.我已经查看了其他人遇到类似问题的帖子,但是我尝试了各种方法,但没有任何效果.
Any help would be greatly appreciated. I have checked out other posts where people had similar issues, but I tried various things and nothing worked.
推荐答案
最简单的解决方案是例如下载Anaconda之类的平台.它是Python,具有许多库(sklearn,pandas,numpy等),还带有pip,所有这些都位于用户友好的Windows安装程序包中,可以帮您完成所有工作.
Easiest solution is to just download a platform like Anaconda for example. It is Python with many libraries (sklearn, pandas, numpy, ...) and also with pip, all in a user-friendly Windows installer package, that takes care of everything for you.
https://www.continuum.io/downloads
如果您真的想自己做,那么
If you really want to do it yourself, then
-
下载get-pip.py( https://bootstrap.pypa.io/get-pip.py )
确保已安装Python,并在PATH中安装了Python,例如通过在命令提示符下运行python --version
make sure you have Python installed and in your PATH, for example by running python --version
in command prompt
导航到下载get-pip.py的目录(在命令提示符下,使用命令cd
).
Navigate to the directory, where you downloaded get-pip.py (in command prompt using the command cd
).
从具有管理员权限的命令提示符中运行命令python get-pip.py
(可能不需要,但只是为了确保权限).
Run the command python get-pip.py
from a command prompt with admin privileges (possibly not needed, but just to make sure).
这应该是全部.关闭命令提示符,再次将其打开,然后运行pip --version
进行测试.如果它不起作用,则在计算机上搜索名为pip.exe
的文件(很可能在您的Python目录中),如果找到它,则将其路径添加到PATH变量中(鉴于屏幕截图,我假设您知道如何做到这一点.)
This should be all. Close your command prompt, open it again and run pip --version
to test it. If it doesn't work, then search your computer for a file named pip.exe
(most likely in your Python directory) and if you find it, add its path to your PATH variable (given the screenshot, I assume you know how to do this).
这篇关于我不能使用点子(Windows)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!