Module Not Found – No module named

All modules in Python have to have a certain directory structure. You can find details here. Create an empty file called __init__.py under the model directory, such that your directory structure would look something like that: . └── project └── src ├── hello-world.py └── model ├── __init__.py └── order.py Also in your hello-world.py file change … Read more

What’s the difference between a module and package in Python?

Any Python file is a module, its name being the file’s base name without the .py extension. A package is a collection of Python modules: while a module is a single Python file, a package is a directory of Python modules containing an additional __init__.py file, to distinguish a package from a directory that just … Read more

How to install Tensorflow on Python 2.7 on Windows?

If you only need TensorFlow because of Keras and your are on Python 2.7.x, you can avoid installing Tensorflow(Google) and replace it by CNTK(Microsoft). According to Jeong-Yoon Lee CNTK is a lot (about 2 to 4 times) faster than TensorFlow for LSTM (Bidirectional LSTM on IMDb Data and Text Generation via LSTM), while speeds for … Read more

Absolute module path resolution in TypeScript files in Visual Studio Code

To be able to use absolute paths from import in TypeScript using Visual Studio Code you should be using next version of TypeScript – typescript@next which is TypeScript v2. For that do the following: Install typescript@next via npm. For installing TypeScript v2.x npm i typescript@next -D In Visual Studio Code i) Go to menu File … Read more

Module not found error in VS code despite the fact that I installed it

After installing a new module via pip reloading vscode may work if vscode doesn’t recognize it. To do this, make sure that the module is installed inside the virtual environment by creating and activating a virtualenv: python3 -m venv env source env/bin/activate Make sure to use the correct way of installing a module with pip: … Read more