如何在 python 3.4 - .whl 文件中安装 [英] How to install in python 3.4 - .whl files

查看:21
本文介绍了如何在 python 3.4 - .whl 文件中安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近尝试为 python 3.4 重新安装 numpy,因为我买了一台新电脑,并且很挣扎.我在 Windows 8.1 上,我记得我以前使用过一个 .exe 文件,它为我完成了所有工作.但是,这次我得到了一个 .whl 文件(显然这是一个轮子"文件),我不知道如何安装.

其他帖子已经解释了我必须使用 PIP,但是我能够找到的关于如何安装这些文件的解释是可怕的.命令python install pip"或pip install numpy"或我见过的所有其他各种命令只返回一个错误,即python 未被识别为内部或外部命令、可运行的程序或批处理文件",或pip is未被识别为内部...."等.

我也试过python3.4"、python.exe"和许多其他的,因为它不喜欢python.我下载的numpy文件的文件名是numpy-1.9.2+mkl-cp34-none-win_amd64.whl".

那么任何人都可以给我一个关于如何使用这些的详细教程,从外观上看,所有模块现在都在使用这些.另外,为什么人们不再使用 .exe 文件来安装这些文件?轻松多了!

解决方案

Python 3.4 附带 PIP 已包含在包中,因此您应该能够在安装 Python 3.4 后立即开始使用 PIP.pip install 之类的命令仅在您的 path 环境变量中包含 PIP 的路径时才有效.如果不是,并且您不想编辑环境变量,则需要提供完整路径.Python 3.4 中 PIP 的默认位置在 C:Python34Scriptspip3.4.exe.如果该文件存在(应该),请输入命令 C:Python34Scriptspip3.4.exe install ,其中 是 numpy .whl 文件的完整路径.例如:C:Python34Scriptspip3.4.exe install C:UsersmwinfieldDownloads umpy‑1.9.2+mkl‑cp34‑none‑win_amd64.whl.>

I recently tried to re-install numpy for python 3.4, since I got a new computer, and am struggling. I am on windows 8.1, and from what I remember I previously used a .exe file that did everything for me. However, this time I was given a .whl file (apparently this is a "Wheel" file), which I cannot figure out how to install.

Other posts have explained that I have to use PIP, however the explanations of how to install these files that I have been able to find are dreadful. The command "python install pip" or "pip install numpy" or all the other various commands I have seen only return an error that "python is not recognized as an internal or external command, operable program or batch file", or "pip is not recognised as an internal...." ect.

I have also tried "python3.4", "python.exe" and many others since it does not like python. The file name of the numpy file that I downloaded is "numpy-1.9.2+mkl-cp34-none-win_amd64.whl".

So can anybody give me a Detailed tutorial of how to use these, as by the looks of things all modules are using these now. Also, why did people stop using .exe files to install these? It was so much easier!

解决方案

Python 3.4 comes with PIP already included in the package, so you should be able to start using PIP immediately after installing Python 3.4. Commands like pip install <packagename> only work if the path to PIP is included in your path environment variable. If it's not, and you'd rather not edit your environment variables, you need to provide the full path. The default location for PIP in Python 3.4 is in C:Python34Scriptspip3.4.exe. If that file exists there (it should), enter the command C:Python34Scriptspip3.4.exe install <numpy_whl_path>, where <numpy_whl_path> is the full path to your numpy .whl file. For example: C:Python34Scriptspip3.4.exe install C:UsersmwinfieldDownloads umpy‑1.9.2+mkl‑cp34‑none‑win_amd64.whl.

这篇关于如何在 python 3.4 - .whl 文件中安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆