Join the Kedro community

Updated 3 weeks ago

Vscode error with kedro project: yaml module not found

I use vs code with my kedro project. When I open it, I got error message like this:
Traceback (most recent call last):
File "c:\Users\wushuchu\.vscode\extensions\kedro.kedro-0.2.2\bundled\tool\lsp_server.py", line 75, in <module><br /> import yaml<br />ModuleNotFoundError: No module named 'yaml'<br /><br />2024-10-30 14:51:13.157 [info] [<strong>Error</strong> - 2:51:13 PM] Server initialization failed.<br />2024-10-30 14:51:13.157 [info] Message: Pending response rejected since connection got disposed<br /> Code: -32097<br />2024-10-30 14:51:13.157 [info] [Info - 2:51:13 PM] Connection to server got closed. Server will restart.<br />2024-10-30 14:51:13.157 [info] true<br />2024-10-30 14:51:13.158 [info] [<strong>Error</strong> - 2:51:13 PM] Kedro client: couldn't create connection to server.<br /><br />But I have installed PyYAML==6.0.2 and also kedro extension in vs code.<br />Can anyone help here?

d
N
S
5 comments

Can you make sure you select the correct python environment in VSCode? This is usually the one you can do a kedro run successfully

You can use the command >Python: Select Interpreter to pick

interesting, I just reselect the same one and it works now πŸ˜ƒ

another thing, for each virtual environment, can we only use to create one kedro project? Or can I use same virtual environment for different projects/folders, if I am pretty sure that I need same libraries?

That's completely fine, same for any python projects

Add a reply
Sign up and join the conversation on Slack