We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
from ..pyimagesearch.datasets.simpledatasetloader import SimpleDatasetLoader ImportError: attempted relative import with no known parent package
I am getting errors as above while importing the module. I am not using VM and I am on the python 3.9.12 version.
import code : from ..pyimagesearch.datasets.simpledatasetloader import SimpleDatasetLoader from ..pyimagesearch.preprocessing.simplepreprocessor import SimplePreprocessor
Dir structure . ├── changeDir.bat ├── Chapter07 │ └── knn.py ├── pyimagesearch │ ├── callbacks │ │ ├── init.py │ │ └── trainingmonitor.py │ ├── datasets │ │ ├── init.py │ │ └── simpledatasetloader.py │ ├── init.py │ ├── nn │ │ ├── conv │ │ │ ├── init.py │ │ │ ├── lenet.py │ │ │ ├── minivggnet.py │ │ │ └── shallownet.py │ │ ├── init.py │ │ ├── neuralnetwork.py │ │ └── perceptron.py │ ├── preprocessing │ │ ├── imagetoarraypreprocessor.py │ │ ├── init.py │ │ └── simplepreprocessor.py │ └── utils │ ├── captchahelper.py │ └── init.py └── Starter-Bundle.ipynb
The text was updated successfully, but these errors were encountered:
Hi @isahillohiya can you please use the absolute path rather than a relative path Add your directory to the path by using this code on top of py file
import sys sys.path.append("path_to_your_directory")
Sorry, something went wrong.
vikaskookna
No branches or pull requests
from ..pyimagesearch.datasets.simpledatasetloader import SimpleDatasetLoader ImportError: attempted relative import with no known parent package
I am getting errors as above while importing the module.
I am not using VM and I am on the python 3.9.12 version.
import code :
from ..pyimagesearch.datasets.simpledatasetloader import SimpleDatasetLoader
from ..pyimagesearch.preprocessing.simplepreprocessor import SimplePreprocessor
Dir structure
.
├── changeDir.bat
├── Chapter07
│ └── knn.py
├── pyimagesearch
│ ├── callbacks
│ │ ├── init.py
│ │ └── trainingmonitor.py
│ ├── datasets
│ │ ├── init.py
│ │ └── simpledatasetloader.py
│ ├── init.py
│ ├── nn
│ │ ├── conv
│ │ │ ├── init.py
│ │ │ ├── lenet.py
│ │ │ ├── minivggnet.py
│ │ │ └── shallownet.py
│ │ ├── init.py
│ │ ├── neuralnetwork.py
│ │ └── perceptron.py
│ ├── preprocessing
│ │ ├── imagetoarraypreprocessor.py
│ │ ├── init.py
│ │ └── simplepreprocessor.py
│ └── utils
│ ├── captchahelper.py
│ └── init.py
└── Starter-Bundle.ipynb
The text was updated successfully, but these errors were encountered: