Skip to content

Can't import psutil #313

@giampaolo

Description

@giampaolo

From michal.s...@gmail.com on August 01, 2012 15:07:26

What steps will reproduce the problem?  
1. Install psutil 0.5.1 from source (on Linux)
2. python setup.py install
3. >>> import psutil 

What is the expected output?  
psutil should be imported 

What do you see instead?  
michal@cdn-controller:~/psutil-0.5.1$ python
Python 2.6.6 ( r266 :84292, Dec 26 2010, 22:31:48) 
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import psutil
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "psutil/__init__.py", line 94, in <module>
    TOTAL_PHYMEM = _psplatform.phymem_usage()[0]
  File "psutil/_pslinux.py", line 140, in phymem_usage
    cached = cached_phymem()
  File "psutil/_pslinux.py", line 121, in cached_phymem
    raise RuntimeError("line not found")
RuntimeError: line not found
>>> 

What version of psutil are you using? What Python version?  
psutil 0.5.1
python 2.6.6 

On what operating system? Is it 32bit or 64bit version?  
Debian 6.0 (Squeeze), 64b, kernel 2.6.32-5-openvz-amd64
I'm running virtualized Linux inside OpenVZ. 

Please provide any additional information below.  
_pslinux.py tries to read "Cached:" in /proc/meminfo, but there is no such line 
in my file:
cat /proc/meminfo
MemTotal:        4194304 kB
MemFree:         3757852 kB
SwapTotal:             0 kB
SwapFree:              0 kB

Original issue: http://code.google.com/p/psutil/issues/detail?id=313

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions