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.

ImportError: No module named win32con

See original GitHub issue

I was just trying to use this on AppVeyor with Python 2.7 but its fails with this:

Traceback (most recent call last):
  File "c:\projects\python-language-server\.tox\py27\lib\site-packages\_pytest\config.py", line 365, in _importconftest
    mod = conftestpath.pyimport()
  File "c:\projects\python-language-server\.tox\py27\lib\site-packages\py\_path\local.py", line 668, in pyimport
    __import__(modname)
  File "c:\projects\python-language-server\.tox\py27\lib\site-packages\_pytest\assertion\rewrite.py", line 213, in load_module
    py.builtin.exec_(co, mod.__dict__)
  File "c:\projects\python-language-server\.tox\py27\lib\site-packages\py\_builtin.py", line 221, in exec_
    exec2(obj, globals, locals)
  File "<string>", line 7, in exec2
  File "C:\projects\python-language-server\test\conftest.py", line 4, in <module>
    from pyls.__main__ import LOG_FORMAT
  File "C:\projects\python-language-server\pyls\__main__.py", line 8, in <module>
    from concurrent_log_handler import ConcurrentRotatingFileHandler
  File "c:\projects\python-language-server\.tox\py27\lib\site-packages\concurrent_log_handler\__init__.py", line 61, in <module>
    from concurrent_log_handler.portalocker import lock, unlock, LOCK_EX, LOCK_NB, LockException
  File "c:\projects\python-language-server\.tox\py27\lib\site-packages\concurrent_log_handler\portalocker.py", line 89, in <module>
    import win32con
ImportError: No module named win32con
ERROR: could not load C:\projects\python-language-server\test\conftest.py
  1. https://github.com/palantir/python-language-server/pull/254
  2. https://ci.appveyor.com/project/gatesn/python-language-server/build/1.0.375/job/ln3alujea5t1e329

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
evandrocoancommented, Jan 30, 2018

I had it working on Python 2 by adding to install these dependencies:

    pywin32
    pypiwin32

But tox is failing when running on Python 3 because pywin32 it is already built-in on it:

  1. https://github.com/tox-dev/tox/issues/758 How to not install Python 2 dependencies on Python 3?

I am not sure if you can include these as dependencies here because they should fail to install when running Python 3.

2reactions
Preston-Landerscommented, Jan 30, 2018

I will investigate how the prerequisites are handled, yes. Thanks for the report.

Read more comments on GitHub >

github_iconTop Results From Across the Web

What's win32con module in python? Where can I find it?
When I try to run this I get the following error: " Could not find a version that satisfies the requirement pywin32>=223 (from...
Read more >
ImportError: No module named win32con - Esri Community
Solved: I updated from ArcMap 10.4 to 10.5 and now Pythonwin is not opening. Here is the full error message: Traceback (most recent...
Read more >
Importerror no module named win32com client - Intellipaat
ImportError : No module named win32com.client. Is there any chance of getting the error since I am using 64-cycle Windows machine?
Read more >
No module named 'win32com' error : r/learnpython - Reddit
client (”import win32com.client as client”) in PyCharm, it gives me the following error: ”ModuleNotFoundError: No module named 'win32com'”.
Read more >
[python-win32] ImportError: No module named win32com.shell
ImportError : No module named win32com.shell. Thanks, Agnel. $ pythonw ssc.py scanlist -v. Traceback (most recent call last): File "ssc.py", line 52, ...
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