question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Traceback on Windows 10 involving _psutil_windows

See original GitHub issue

Be sure to check the existing issues, both open and closed.

Describe the issue briefly here.

Describe your environment
  1. OS Type: Windows 10
  2. Python version: $ python -V: 3.6.4
  3. Pipenv version: $ pipenv --version: 11.1.2
Expected result

No traceback

Actual result
PS C:\Users\brcan\Desktop\pipenv-test> py -3 -m pipenv install
Creating a virtualenv for this project…
Traceback (most recent call last):
  File "C:\Users\brcan\AppData\Local\Programs\Python\Python36\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "C:\Users\brcan\AppData\Local\Programs\Python\Python36\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\brcan\AppData\Local\Programs\Python\Python36\lib\site-packages\pipenv\pew\__main__.py", line 1, in <module>
    import pew
  File "C:\Users\brcan\AppData\Local\Programs\Python\Python36\lib\site-packages\pew\__init__.py", line 3, in <module>
    from . import pew
  File "C:\Users\brcan\AppData\Local\Programs\Python\Python36\lib\site-packages\pew\pew.py", line 39, in <module>
    import psutil
  File "C:\Users\brcan\AppData\Local\Programs\Python\Python36\lib\site-packages\pipenv\vendor\psutil\__init__.py", line 126, in <module>
    from . import _pswindows as _psplatform
  File "C:\Users\brcan\AppData\Local\Programs\Python\Python36\lib\site-packages\pipenv\vendor\psutil\_pswindows.py", line 16, in <module>
    from . import _psutil_windows as cext
ImportError: cannot import name '_psutil_windows'

Virtualenv location:
Creating a Pipfile for this project…
Creating a virtualenv for this project…
Traceback (most recent call last):
  File "C:\Users\brcan\AppData\Local\Programs\Python\Python36\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "C:\Users\brcan\AppData\Local\Programs\Python\Python36\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\brcan\AppData\Local\Programs\Python\Python36\lib\site-packages\pipenv\pew\__main__.py", line 1, in <module>
    import pew
  File "C:\Users\brcan\AppData\Local\Programs\Python\Python36\lib\site-packages\pew\__init__.py", line 3, in <module>
    from . import pew
  File "C:\Users\brcan\AppData\Local\Programs\Python\Python36\lib\site-packages\pew\pew.py", line 39, in <module>
    import psutil
  File "C:\Users\brcan\AppData\Local\Programs\Python\Python36\lib\site-packages\pipenv\vendor\psutil\__init__.py", line 126, in <module>
    from . import _pswindows as _psplatform
  File "C:\Users\brcan\AppData\Local\Programs\Python\Python36\lib\site-packages\pipenv\vendor\psutil\_pswindows.py", line 16, in <module>
    from . import _psutil_windows as cext
ImportError: cannot import name '_psutil_windows'

Virtualenv location:
Pipfile.lock not found, creating…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
Updated Pipfile.lock (625834)!
Installing dependencies from Pipfile.lock (625834)…
  ================================ 0/0 - 00:00:00
To activate this project's virtualenv, run the following:
 $ pipenv shell
Steps to replicate

Command in output above.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:21 (15 by maintainers)

github_iconTop GitHub Comments

1reaction
kennethreitzcommented, Mar 7, 2018

will get a fix out shortly

0reactions
randycoulmancommented, Mar 8, 2018

I can confirm that 11.1.5 now works for me. Thanks for the quick turnaround!

Read more comments on GitHub >

github_iconTop Results From Across the Web

python psutil on windows gives access denied
i am trying to use psutil to get a list of processes and their cpu usage, i ran the script as administrator and...
Read more >
ModuleNotFoundError: No module named 'psutil' in Python
Conclusion # The Python "ModuleNotFoundError: No module named 'psutil'" occurs when we forget to install the psutil module before importing it ...
Read more >
Solved: Traceback (most recent call last)
I'm getting this issue on windows 10, does the answer above mean I have to install Visual Studio C++ 2012 Redistributable?
Read more >
[Python-Dev] Tests failing on Windows with TESTFN
instance, the traceback you pasted refers to a test class which doesn't do this. In psutil I've had occasional Windows failures like this...
Read more >
Print or retrieve a stack traceback
Source code: Lib/traceback.py This module provides a standard interface to extract, format and print stack traces of Python programs.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found