艰难地学习Python练习46:在Windows上安装Python软件包(pip,nose等) [英] Learn Python the Hard Way Exercise 46: Installing Python packages (pip, nose etc.) on Windows

查看:181
本文介绍了艰难地学习Python练习46:在Windows上安装Python软件包(pip,nose等)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用PowerShell在Windows上使用Zed Shaw的以艰难的方式学习Python"来学习Python.我在练习46 中,您在其中建立了一个斯克尔顿项目.我下载了 pip 分发鼻子 virtualenv ,我通过输入以下内容进行安装:

I am learning Python using Zed Shaw's "Learn Python the Hard Way" on Windows using PowerShell. I am in Exercise 46 where you set up a skelton project. I downloaded pip, distribute, nose, and virtualenv and I installed them by typing:

python <filename>.py install

但是,可能是因为我尝试时未将其安装在应有的位置

However, probably because they were not installed where they were supposed to, when I try

nosetests

我收到以下错误消息:术语'nosetests'未被识别为cmdelt,函数,脚本文件或可运行程序的名称.请检查mae的拼写,或者是否包含路径,请验证该路径是正确的,然后重试....CommandNotFoundException".

I get errors saying "The term 'nosetests' is not recognized as the name of a cmdelt, function, script file, or operable program. Check the spelling of the mae, or if a path was included, verify that the path is correct and try again.... CommandNotFoundException".

我一直在进行练习,所以我认为路径是正确的,但是您现在必须更改它吗?现在,我将软件包放在我的skelton(..project/skelton)所在的目录下.对于一个初学者的问题我很抱歉,但是如果有人可以帮助我,我将非常感激!!

I have been going through the exercises fine, so I thought that the path was correct but do you have to change it now? Right now, I have the packages under the directory where I have my skelton (..project/skelton). I am sorry for a real-beginner question but if anybody could help me with this, I highly appreciate it!!

推荐答案

我有相同的错误,但答案在书中.将其输入powershell,希望它也对您有用.

I had the same error but the answer was in the book. Type this into powershell, hope it works for you too.

[Environment]::SetEnvironmentVariable("Path", "$env:Path;C:\Python27", "User")

这篇关于艰难地学习Python练习46:在Windows上安装Python软件包(pip,nose等)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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