-
Notifications
You must be signed in to change notification settings - Fork 430
New issue
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
no module named 'text_recognizer' #7
Comments
Same issue. |
its the problem with the PYTHONPATH environment variable.. use this code on the file you want to run from the sub directories
its basically setting the environment path value to that of the parent directory |
Same issue here |
Hi, i am a bit confused by the solution, are you refering adding the code to emnist_dataset.py? |
Hello, I had the same issue and following this answer, what helped me was to add the following code to the top of
Note the first last on the output of executing the script:
For some reason, only the folder |
Your solution worked for me @sebastian-sosa |
I'm running the code locally (not on GCP) and I had the same issue. Then I found these instructions in the
This solved my issue FWIW. |
@sebastian-sosa Thanks! It works! |
Had a similar issue , worked for me too. Thank you |
@sebastian-sosa Thanks it worked! |
Any way to replicate in a Windows 10 machine?
|
I think this is a good solution as the |
Hello. Here are so far the two solved issues I was having: !pip install pytorch_lightning ### Added
!pip install torchtext ### Added
import pytorch_lightning as pl
version = pl.__version__
docs_url = f"https://pytorch-lightning.readthedocs.io/en/{version}/" # version can also be latest, stable
docs_url The other one with "No module named 'text_recognizer' was solved this by using %cd instead of !cd as I was used to on Jupyter Notebooks. %ls
%cd '/content/fsdl-text-recognizer-2022-labs/lab02'
from text_recognizer.lit_models import BaseLitModel |
Had issue running the code. Hope this help. # Download bootstrap.py
!wget --quiet https://gist.githubusercontent.com/charlesfrye/f73b5fbcb3a662df8fbd58e1a488a105/raw/5b588a0500c598f0893a39371d890b1bd8d3b0a1/bootstrap.py -O bootstrap.py
# Download files
import bootstrap
# Set path
import sys
sys.path.append('/content/fsdl-text-recognizer-2022-labs')
print('paths: ', sys.path)
# Verify path
import os
print(os.path.exists('requirements/prod.in'))
# Downgrade pip for old packages
!pip install pip==23.3.1
# Install packages without wandb
!pip install -r requirements/prod.in
# Install wandb
!pip install wandb
# To fix Text recognizer
sys.path.append('/home/path-to-project/fsdl-text-recognizer-project/lab1')
print('paths: ', sys.path) |
from the lab2_sln directory I entered
$python text_recognizer/datasets/emnist_dataset.py
and got
The emnist_dataset.py script DOES have this line
from text_recognizer.datasets.dataset import _download_raw_dataset, Dataset, _parse_args
and the dataset.py script has this line in it:
from text_recognizer import util
There is however NO text_recognizer.py script. However there is a text_recognizer directory with the lab2_sln directory
The text was updated successfully, but these errors were encountered: