SKLearn Syntax error

import sklearn
print('sklearn: {}'.format(sklearn.__version__))

I have this code written in VScode to start learning ML. However, when it is run, I get a long string of errors that leads to:

File"C:\Users\...\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\joblib\externals\loky\__init__.py", line 18, in <module>
    from .backend.context import cpu_count
SyntaxError: source code string cannot contain null bytes

And I cant figure out what is wrong.

Run python -v so that you see the file names that are being imported when you run your code.

You should then have the name of the file that causes the error.
Try opening that file in your editor. Is it text? Is it encoded as utf-8?
(Might be utf-16 that will not work).

I checked all the files SKLearn imports and none of them seem to have a problem with encoding.

Can you show the output with the error when you run your code using python -v?