1

I've installed ezdxf running following library in the same folder that my .py file is located, with this command:

pip install ezdxf

I see this error when hovering on import ezdxf

Import ezdxf could not be resolved Pylance

When I try to run the project it says:

ModuleNotFoundError: No module named 'ezdxf'

I've tried to install again, but I see this:

Requirement already satisfied: ezdxf in c:\users\robert\appdata\local\programs\python\python38\lib\site-packages (0.17.2b1)
Requirement already satisfied: pyparsing>=2.0.1 in c:\users\robert\appdata\local\programs\python\python38\lib\site-packages (from ezdxf) (3.0.6)
Requirement already satisfied: typing_extensions in c:\users\robert\appdata\local\programs\python\python38\lib\site-packages (from ezdxf) (4.0.0)

How could I solve this issue?

Patrick Yoder
  • 1,065
  • 4
  • 14
  • 19
Arie
  • 3,041
  • 7
  • 32
  • 63
  • Are you using venv or something like that? Then, did you activate it? –  Nov 27 '21 at 07:39
  • @asnerdyasSteveWozniak i use Visual studio code, created folder and added file.py. not sure about venv? – Arie Nov 27 '21 at 07:40
  • Oh, then I don't think you used venv or some kind. If you are curious you can Google what venv is. –  Nov 27 '21 at 07:41
  • @asnerdyasSteveWozniak i additionaly just executed this command: python -m venv .venv nevertheless error still appears – Arie Nov 27 '21 at 07:43
  • It is likely that the `pip` you are using to install the module belongs to a different installation of Python from the one VS Code is using. Navigate to the `Scripts` folder of the installation you want to use and reinstall from there. – BoarGules Nov 27 '21 at 08:39
  • @BoarGules i navigated to MyProject/.venv/Sripts and ran pip install ezdxf nvertheless i still see messages like "requirments already satisfied" – Arie Nov 28 '21 at 09:23
  • Then that is *not* the installation you want to use, that is where the command `pip`is pointing. Do `where python` to find the one you want to use, or find out from your IDE which one it is using. – BoarGules Nov 28 '21 at 11:06
  • @BoarGules where python gives me nothing P.S i use vscode – Arie Nov 29 '21 at 00:07
  • *Gives me nothing*. You must at least have got an error message. What was it? On SO, "it doesn't work" is not considered an adequate problem statement. Ask VScode what Python installation it is using: `ctrl-shift-P`. – BoarGules Nov 29 '21 at 08:56

0 Answers0