the-full-stack / fsdl-text-recognizer-project

Lab materials for the Full Stack Deep Learning Course
https://fullstackdeeplearning.com/course
1.21k stars 428 forks source link

no module named 'boltons' #6

Open bwanaaa opened 5 years ago

bwanaaa commented 5 years ago

navigated to correct folder and tried this:

fsdl-text-recognizer-project/lab2_sln$ python text_recognizer/datasets/emnist_dataset.py

python emnist_dataset.py 
Traceback (most recent call last):
  File "emnist_dataset.py", line 10, in <module>
    from boltons.cacheutils import cachedproperty
ModuleNotFoundError: No module named 'boltons'

How can I install this project without pipenv?
bwanaaa commented 5 years ago

BTW, I installed pipenv and ran the recommeded command

pipenv run python text_recognizer/datasets/emnist_dataset.py

and got the same error.

I did

pip install cacheutils

installed the above library but it has no 'cachedproperty'

bwanaaa commented 5 years ago

and yes, I also did pip install boltons so that pip freeze shows

boltons==19.1.0
cachetools==3.1.1
cacheutils==0.1.1
certifi==2019.3.9
six==1.12.0
w3lib==1.20.0

and I still get

pipenv run python text_recognizer/datasets/emnist_dataset.py
Traceback (most recent call last):
  File "text_recognizer/datasets/emnist_dataset.py", line 10, in <module>
    from boltons.cacheutils import cachedproperty
ModuleNotFoundError: No module named 'boltons'
bwanaaa commented 5 years ago

However if I start a python shell at the command line

Python 3.7.3 | packaged by conda-forge | (default, Mar 27 2019, 23:01:00) 
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from boltons.cacheutils import cachedproperty
>>> 

So clearly, boltons is installed in my conda environment and is seen. However pipenv does not respect that. simply running python text_recognizer/datasets/emnist_dataset.py

works.

BTW, can you add a requirements.text file to the github project so I dont have to guess which packages are needed.

adriangrepo commented 5 years ago

@bwanaaa see the readme.md in the root folder. From project root run: pipenv install --dev

changtraisitinh commented 5 years ago

i using macos and colab, pls help me?

1. In root folder

$ls
fsdl-text-recognizer-project.zip  Pipfile   sample_data  training
lab2_sln.zip              Pipfile.lock  tasks
notebooks             readme.md text_recognizer

2. init env

$pipenv install --dev
Pipfile.lock not found, creating…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
Updated Pipfile.lock (ca72e7)!
Installing dependencies from Pipfile.lock (ca72e7)…
  🐍   β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰ 0/0 β€” 00:00:00
To activate this project's virtualenv, run pipenv shell.
Alternatively, run a command inside the virtualenv with pipenv run.

3.

$ pipenv run python text_recognizer/datasets/emnist_dataset.py
Traceback (most recent call last):
  File "text_recognizer/datasets/emnist_dataset.py", line 10, in <module>
    from boltons.cacheutils import cachedproperty
ModuleNotFoundError: No module named 'boltons'