初学者安装nosetests包
我正在尝试按照 learnpythonthehardway 教程安装以下内容:
- pip from http://pypi.python.org/pypi/pip< /a>
- 从 http://pypi.python.org/pypi/distribute
- 鼻子 分发href="http://pypi.python.org/pypi/nose/">http://pypi.python.org/pypi/nose/
- virtualenv 来自 http://pypi.python.org/pypi/virtualenv
我访问了这些链接并单击了下载按钮;现在每个文件都在我的下载文件夹中,我解压/解压了它们 - 不确定这意味着什么,但似乎是必需的。它们是“安装”的吗?如果没有,真正安装它们意味着什么?我尝试在终端中输入 nosetests
(正如书中所说的那样),也尝试过 easy_install
但这似乎不起作用。看来我的理解在很多方面都是有限的。
我收到以下 -bash: nosetests: command not found
,但我正在尝试获取:
nosetests 。 -------------------------------------------------- -------------------- 在 0.007 秒内进行 1 次测试 好的
I'm trying to install the following as per the learnpythonthehardway tutorial:
- pip from http://pypi.python.org/pypi/pip
- distribute from http://pypi.python.org/pypi/distribute
- nose from http://pypi.python.org/pypi/nose/
- virtualenv from http://pypi.python.org/pypi/virtualenv
I've visited these links and clicked the download button; each file is in my downloads folder now, and I unarchive/unzipped them- not sure what this means but it seemed required. Are they "installed"? If not, what does it mean to really install them? I've tried typing nosetests
in the terminal (as the book says you should), as well as tried easy_install
but that doesn't seem to work. It appears my understanding is limited in a number of ways here.
I get the following -bash: nosetests: command not found
, but am trying to get:
nosetests . ---------------------------------------------------------------------- Ran 1 test in 0.007s
OK
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
这适用于 Mac,也可能适用于 Linux
1)打开终端(准备输入密码)
2)输入:
sudo easy_install pip
3)输入:
sudo pip install distribution
4)类型:
sudo pip install noose
5)类型:
sudo pip install virtualenv
希望有所帮助,干杯!
This works on mac, it may work on linux
1)Open terminal (Be prepared to enter your password)
2)Type:
sudo easy_install pip
3)Type:
sudo pip install distribute
4)Type:
sudo pip install nose
5)Type:
sudo pip install virtualenv
Hope that helps, cheers!
它们尚未安装。
每个软件包对于安装过程的具体工作方式都有自己的变幻莫测,事实上,其中一些软件包将包含其他软件包。 IE
作为一个相对较新的 python 用户,(不久前也经历过类似的过程)我热切地等待着这个问题的更完整的答案。
They are not yet installed.
Each has its own vagaries about how exactly the install process works and in fact some of those packages will include the other packages with them. I.e.
As a relatively new python user myself, (and having gone thru a similar process not long ago) I am eagerly awaiting the more complete answers that come back for this one.
你是在正确的轨道上,但这个包实际上被称为“鼻子”。鼻子的文档(nosetests 是脚本)可以在这里找到:
https://nose.readthedocs.org/en/latest/
简短的答案是,您有 2 个基本选项: easy_install 或 pip。使用setuptools/distribute安装:
easy_install noose
。使用 pip 安装:pip install noose
You were on the right track, but the package is actually called "nose". The documentation for nose (nosetests is the script) can be found here:
https://nose.readthedocs.org/en/latest/
The short answer is that you have 2 basic options: easy_install or pip. Install using setuptools/distribute:
easy_install nose
. Install using pip:pip install nose
找出nosetests脚本在哪里。在 OSX 上:
直接执行,或者设置 bash 别名,也许在 .bash_profile 中:
Find out where the nosetests script is. On OSX:
Execute directly, or set up a bash alias, perhaps in .bash_profile:
安装 Python 2.7,然后执行此操作(仅在 Windows - Windows PowerShell 上):
3.
4.
5.
Install Python 2.7 and after just do this (only on Windows - Windows PowerShell):
3.
4.
5.