本文介绍了“导入py"; >没有名为py的模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试运行py.test脚本.当脚本尝试导入py时,出现没有名为py的模块"
I am trying to run a py.test script. When the script try to import py, I get a "No module named py"
我已经成功安装了py.test和python.
I have py.test and python successfully installed.
我的错误消息:
$ python
>>> import py
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named py
我要运行的sqript名为run_tests.py,由我的大学制造.它为所有其他人运行.它是这样开始的:
The sqript I am trying to run, are named run_tests.py, and are made by my University. It runs for all other people. It starts like this:
# This script can be used to automatically check the assignments of students
import py
import os
import sys
import argparse
verbose = True
# List of assignment names and achie.....
我的py.test版本:2.7.2,python版本:2.7.9,正在运行OSX
My py.test version: 2.7.2, python version: 2.7.9, runing OSX
推荐答案
在系统上安装py
库:
pip install py
这篇关于“导入py"; >没有名为py的模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!