1

UPDATE

I fully uninstalled anaconda: https://setapp.com/how-to/uninstall-anaconda-on-mac

I reinstalled it, updated it, and I can even see in the list: sqlalchemy

sqlalchemy                1.4.32           py39hca72f7f_0 

But I keep on getting: No module named 'sqlalchemy'

So, it's like if Visual Studio Code doesn't have the correct path to the new version of Anaconda or Python.

I just installed:

pip3 install Flask-SQLAlchemy

but nothing changed

ORIGINAL

My terminal was constantly redirected to a specific folder, which was very annoying, so I deleted it.

So, now I'm in the root.

But when I try to import a file in VSCode it can't find any of the modules:

So, following many suggestions, in Visual Studio Code I changed the cwd and tried many things:

Terminal › Integrated: Cwd => Empty, ${fileDirname}, public, ... none work

I tried to reinstall:

Conda install sqlalchemy

conda install psycopg2

It installed it, but if I run:

sqlalchemy --version

I get => -bash: sqlalchemy: command not found

These are the versions at root level:

pip --version => pip 21.2.4
python --version => Python 3.9.7
conda --version => conda 4.12.0
conda list anaconda$ => anaconda  2021.11  py39_0  
conda list python -f => python  3.9.7  h88f2d9e_1
conda list => I could publish this if you think it would help ( long list though )
conda info => same thing
sebseb
  • 93
  • 1
  • 1
  • 8

1 Answers1

0

This solved my problem:

Activating Anaconda Environment in VsCode

Basically,

  1. Shift + Cmd + P

  2. Search Select Interpreter

  3. It was suggesting me a " Recommended version 3.9.10 64 bit". So, every time I would select that one.

  4. The solution was to go to Terminal and check which version I had.

 > python3 --version

it gave me version 3.9.7. So, I selected that one, which was called "Conda"

जलजनक
  • 3,072
  • 2
  • 24
  • 30
sebseb
  • 93
  • 1
  • 1
  • 8