我有AWS EC2实例与东西运行和蟒蛇分析器坏了有如何配置Amazon EC2实例以支持python profiler?
Traceback (most recent call last):
File "test.py", line 6, in <module>
cProfile.run("test()")
File "/usr/lib/python2.6/cProfile.py", line 36, in run
result = prof.print_stats(sort)
File "/usr/lib/python2.6/cProfile.py", line 80, in print_stats
import pstats
ImportError: No module named pstats
我宁愿不重新安装所有的Python的,因为有东西在系统上运行。 我只想添加/修复分析器。我找到了如何做到这一点的建议,例如http://www.cherrypy.org/wiki/ProfilingOnDebian。无论我尝试我得到
$ sudo apt-get install python-profiler
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package python-profiler is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package python-profiler has no installation candidate
任何帮助吗?重申一遍,我已经尝试在sources.list文件中添加各种行,并且 没有任何工作,所以请不要只搜索和发布链接,除非您自己成功解决了 此问题,谢谢!