#๐Ÿ”’ Problem with pywin32 on Windows (VS Code, Python 3.13.1)

12 messages ยท Page 1 of 1 (latest)

mortal root
#

Hi everyone! ๐Ÿ‘‹

I am on Windows, and I use VS Code for development with Python 3.13.1

I am working on a Python project that allows changing the dates (of creation, modification and access) of files in a given directory. I am encountering some problems with the use of the pywin32, win32file, and win32con modules to modify the date of creation of a file on Windows.

VS Code do not recognize them and after launching the program, the terminal tells me that there is an error.

However, I have successfully installed pywin32 with the command pip install pywin32 and when I retype the command it shows me Requirement already satisfied: pywin32 in c: users idris appdata local programs python python313 lib site-packages (311)

past elbowBOT
#

@mortal root

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

mortal root
#

How to solve this problem so that I can use pywin32
Here is the piece of code :
(errors are underlined in yellow.)

eager matrix
#

in the bottom right of your vscode window, click on the python version

#

is the interpreter the one you expected?

#

@mortal root i forget to ping - sorry

mortal root
#

Where is it down there?

mortal root
eager matrix
mortal root
#

Yes, the interpreter is indeed the one I was expecting. I use Python 3.13.1, and I see that it is selected in VS Code.

past elbowBOT
#
Python help channel closed for inactivity

This help channel has been closed. Feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.