the-full-stack / fsdl-text-recognizer-2021-labs

Complete deep learning project developed in Full Stack Deep Learning, Spring 2021
https://bit.ly/berkeleyfsdl
MIT License
452 stars 281 forks source link

Lab1. ModuleNotFoundError: No module named 'text_recognizer' #7

Closed gauravkuppa closed 3 years ago

gauravkuppa commented 3 years ago

Hello. I am trying to complete Lab 1, and I get this error. I did not make any changes to the code, and the repo is the latest from the remote. Please advise.

Traceback (most recent call last):
  File "training/run_experiment.py", line 12, in <module>
    from text_recognizer import lit_models
ModuleNotFoundError: No module named 'text_recognizer'
gauravkuppa commented 3 years ago

I did another check by running all available packages, and text_recognizer is available in the local packages.

(fsdl-text-recognizer-2021) gauravkuppa24@gauravkuppa24-Lenovo-ideapad-FLEX-5-1570:~/Documents/Developer/fsdl-text-recognizer-2021-labs/lab1$ python
Python 3.6.12 |Anaconda, Inc.| (default, Sep  8 2020, 23:10:56) 
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> help('modules')

Please wait a moment while I gather a list of all available modules...

/home/gauravkuppa24/miniconda3/envs/fsdl-text-recognizer-2021/lib/python3.6/site-packages/IPython/kernel/__init__.py:13: ShimWarning: The `IPython.kernel` package has been deprecated since IPython 4.0.You should import from ipykernel or jupyter_client instead.
  "You should import from ipykernel or jupyter_client instead.", ShimWarning)
[W CUDAFunctions.cpp:100] Warning: CUDA initialization: The NVIDIA driver on your system is too old (found version 10010). Please update your GPU driver by downloading and installing a new version from the URL: http://www.nvidia.com/Download/index.aspx Alternatively, go to: https://pytorch.org to install a PyTorch version that has been compiled with your version of the CUDA driver. (function operator())

The matplotlib.compat module was deprecated in Matplotlib 3.3 and will be removed two minor releases later.
The twython library has not been installed. Some functionality from the twitter package will not be available.
Created a temporary directory at /tmp/tmp57xmqua7
Writing /tmp/tmp57xmqua7/_remote_module_non_sriptable.py
zmq.eventloop.minitornado is deprecated in pyzmq 14.0 and will be removed.
    Install tornado itself to use zmq with the tornado IOLoop.

IPython             blib2to3            jupyter_server      resource
PIL                 boltons             jupyterlab          rlcompleter
__future__          builtins            jupyterlab_pygments rsa
_ast                bz2                 jupyterlab_server   runpy
_asyncio            cProfile            keyword             safety
_bisect             cached_property     kiwisolver          sched
_black_version      cachetools          lazy_object_proxy   scipy
_blake2             caffe2              lib2to3             secrets
_bootlocale         calendar            libfuturize         select
_bz2                certifi             libpasteurize       selectors
_cffi_backend       cffi                linecache           send2trash
_codecs             cgi                 locale              sentry_sdk
_codecs_cn          cgitb               logging             setup
_codecs_hk          chardet             lzma                setuptools
_codecs_iso2022     chunk               macpath             shelve
_codecs_jp          click               macurl2path         shlex
_codecs_kr          cmath               mailbox             shortuuid
_codecs_tw          cmd                 mailcap             shutil
_collections        code                markdown            signal
_collections_abc    codecs              markupsafe          site
_compat_pickle      codeop              marshal             six
_compression        collections         math                smmap
_crypt              colorsys            matplotlib          smtpd
_csv                compileall          mccabe              smtplib
_ctypes             concurrent          mimetypes           sndhdr
_ctypes_test        configparser        mistune             sniffio
_curses             contextlib          mmap                snowballstemmer
_curses_panel       contextvars         modulefinder        socket
_datetime           copy                multidict           socketserver
_decimal            copyreg             multiprocessing     spwd
_distutils_hack     crypt               mypy                sqlite3
_dummy_thread       csv                 mypy_extensions     sre_compile
_elementtree        ctypes              mypyc               sre_constants
_functools          curses              nbclassic           sre_parse
_hashlib            cv2                 nbclient            ssl
_heapq              cycler              nbconvert           stat
_imp                dataclasses         nbformat            statistics
_io                 datetime            nest_asyncio        stevedore
_json               dateutil            netrc               string
_locale             dbbd1b679b3c31e8ff5a__mypyc nis                 stringprep
_lsprof             dbm                 nltk                struct
_lzma               decimal             nntplib             subprocess
_markupbase         decorator           notebook            subprocess32
_md5                defusedxml          ntpath              sunau
_multibytecodec     difflib             nturl2path          symbol
_multiprocessing    dis                 numbers             symtable
_opcode             distutils           numpy               sys
_operator           dockerpycreds       oauthlib            sysconfig
_osx_support        doctest             opcode              syslog
_pickle             dparse              operator            tabnanny
_posixsubprocess    dummy_threading     optparse            tarfile
_pydecimal          editdistance        os                  telnetlib
_pyio               email               ossaudiodev         tempfile
_pyrsistent_version encodings           packaging           tensorboard
_pytest             ensurepip           pandocfilters       tensorboard_plugin_wit
_random             entrypoints         parser              terminado
_sha1               enum                parso               termios
_sha256             errno               past                test
_sha3               faulthandler        pathlib             testpath
_sha512             fcntl               pathspec            tests
_signal             filecmp             pathtools           text_recognizer
_sitebuiltins       fileinput           pbr                 textwrap
_socket             flask               pdb                 this
_sqlite3            fnmatch             pexpect             threading
_sre                formatter           pickle              time
_ssl                fractions           pickleshare         timeit
_stat               fsspec              pickletools         tkinter
_string             ftplib              pip                 token
_strptime           functools           pipes               tokenize
_struct             future              piptools            toml
_symtable           gc                  pkg_resources       torch
_sysconfigdata_i686_conda_cos6_linux_gnu genericpath         pkgutil             torchvision
_sysconfigdata_m_linux_x86_64-linux-gnu getopt              pl_examples         tornado
_sysconfigdata_powerpc64le_conda_cos7_linux_gnu getpass             platform            tqdm
_sysconfigdata_x86_64_apple_darwin13_4_0 gettext             plistlib            trace
_sysconfigdata_x86_64_conda_cos6_linux_gnu git                 pluggy              traceback
_testbuffer         gitdb               poplib              tracemalloc
_testcapi           glob                posix               training
_testimportmultiple google_auth_oauthlib posixpath           traitlets
_testmultiphase     gql                 pprint              tty
_thread             graphql             profile             turtle
_threading_local    grp                 prometheus_client   turtledemo
_tkinter            grpc                promise             typed_ast
_tracemalloc        gzip                prompt_toolkit      types
_warnings           h5py                pstats              typing
_weakref            hashlib             psutil              typing_extensions
_weakrefset         heapq               pty                 unicodedata
abc                 hmac                ptyprocess          unittest
absl                html                pvectorc            urllib
aifc                http                pwd                 urllib3
aiohttp             idlelib             py                  uu
antigravity         idna                py_compile          uuid
anyio               idna_ssl            pyasn1              venv
appdirs             imaplib             pyasn1_modules      wandb
argon2              imghdr              pyclbr              warnings
argparse            immutables          pycodestyle         watchdog
array               imp                 pycparser           wave
ast                 importlib           pydoc               wcwidth
astroid             importlib_metadata  pydoc_data          weakref
async_generator     iniconfig           pydocstyle          webbrowser
async_timeout       inspect             pyexpat             webencodings
asynchat            io                  pygments            werkzeug
asyncio             ipaddress           pylab               whaaaaat
asyncore            ipykernel           pylint              wheel
atexit              ipykernel_launcher  pynvml              wrapt
attr                ipython_genutils    pyparsing           wsgiref
audioop             isort               pyrsistent          xdrlib
babel               itermplot           pytest              xml
backcall            itertools           pytorch_lightning   xmlrpc
backports           itsdangerous        pytz                xxlimited
bandit              jedi                queue               xxsubtype
base64              jinja2              quopri              yaml
bdb                 joblib              random              yarl
binascii            json                re                  zipapp
binhex              json5               readline            zipfile
bisect              jsonschema          regex               zipimport
black               jupyter             reprlib             zipp
blackd              jupyter_client      requests            zlib
bleach              jupyter_core        requests_oauthlib   zmq

Enter any module name to get more help.  Or, type "modules spam" to search
for modules whose name or summary contain the string "spam".
gauravkuppa commented 3 years ago

Oops, I had to set PYTHONPATH to lab1 as well. Fixed it.