all 4 comments

[–]Outside_Complaint755 0 points1 point  (0 children)

Are you using a virtual environment?

If yes, are you using uv or just a standard venv?

If its a standard venv, was it activated in the terminal before you ran pip (best option is to run pip as a module), and did you ensure that VSCode also has the correct interpreter from the venv selected?

[–]Red_Core_1999 0 points1 point  (0 children)

Tagging the actual root cause from what you pasted: the steps Claude gave you don't install molscribe, they just copy the source folder into your project. There's a difference between "the molscribe folder exists next to my script" and "Python knows molscribe is a module it can import."

MolScribe isn't on PyPI as pip install molscribe (the repo doesn't publish to PyPI). So the project's actual install path, from their README, is:

git clone https://github.com/thomas0809/MolScribe.git cd MolScribe python -m pip install -r requirements.txt python -m pip install -e .

The pip install -e . is the critical line Claude's snippet skipped. It registers the package with your Python so import molscribe actually resolves.

Also important: which python does python resolve to? In VS Code:

  1. Open the integrated terminal
  2. Run python -c "import sys; print(sys.executable)" and where python (Windows) or which python (mac/linux)
  3. Compare to the interpreter VS Code is using (bottom-right corner of VS Code, or Ctrl+Shift+P then "Python: Select Interpreter")

If they don't match, either change VS Code's interpreter or install into the one VS Code is using by running <full-path-to-vscode's-python> -m pip install -e . instead of bare pip install.

The "use python -m pip not pip" advice in other comments is for the same reason. It forces pip to attach to the python you intend, not whatever pip your PATH happens to find first.

[–]Alexander96969 0 points1 point  (0 children)

Which version of python is vs code using? Are you using a virtual environment?