antingshen / BeaverDam

Video annotation tool for deep learning training labels
BSD 2-Clause "Simplified" License
202 stars 99 forks source link

scripts/seed -f SyntaxError #120

Closed BluePackStack closed 7 years ago

BluePackStack commented 7 years ago

I got the following Error after scripts/seed -f command:

def from_list(cls, path_to_list, *, source, host, filename_prefix=''): ^ SyntaxError: invalid syntax

Does Anybody know how to handle this?

BluePackStack commented 7 years ago

I tried to just remove the ,*, . Since it's destiny isn't quite clear to me, cause I'm quite new to python. This will lead to an ImportError: from tqdm import tqdm ImportError: No module named tqdm

So I installed tqdm pip install tqdm and get ImportError: No module named parse which I cannot figure out how to install. pip install parse and installing the package from https://pypi.python.org/pypi/parse won't work.

sudo python setup.py install

[sudo] password for user: running install running bdist_egg running egg_info writing parse.egg-info/PKG-INFO writing top-level names to parse.egg-info/top_level.txt writing dependency_links to parse.egg-info/dependency_links.txt reading manifest file 'parse.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' writing manifest file 'parse.egg-info/SOURCES.txt' installing library code to build/bdist.linux-x86_64/egg running install_lib running build_py creating build creating build/lib.linux-x86_64-2.7 copying parse.py -> build/lib.linux-x86_64-2.7 creating build/bdist.linux-x86_64 creating build/bdist.linux-x86_64/egg copying build/lib.linux-x86_64-2.7/parse.py -> build/bdist.linux-x86_64/egg byte-compiling build/bdist.linux-x86_64/egg/parse.py to parse.pyc creating build/bdist.linux-x86_64/egg/EGG-INFO copying parse.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO copying parse.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO copying parse.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO copying parse.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO zip_safe flag not set; analyzing archive contents... creating dist creating 'dist/parse-1.8.2-py2.7.egg' and adding 'build/bdist.linux-x86_64/egg' to it removing 'build/bdist.linux-x86_64/egg' (and everything under it) Processing parse-1.8.2-py2.7.egg Copying parse-1.8.2-py2.7.egg to /usr/local/lib/python2.7/dist-packages Adding parse 1.8.2 to easy-install.pth file

Installed /usr/local/lib/python2.7/dist-packages/parse-1.8.2-py2.7.egg Processing dependencies for parse==1.8.2 Finished processing dependencies for parse==1.8.2_

But still: ImportError: No module named parse

Any Ideas? :(

clayshieh commented 7 years ago

The setup instructions are a bit incomplete, I will update them in a bit. The instructions should be:

  1. Clone this repository.
  2. cd BeaverDam
  3. Make sure Python 3 is installed (REQUIRED You cannot use python 2)
    • You can check what your default python version is by running python --version
    • If the output is 2.x.x then you need to install python 3
      • If Mac
        • install brew if not installed installation instructions here
        • brew install python3
      • if Ubuntu
        • sudo apt-get update
        • sudo apt-get upgrade
        • sudo apt-get install python3
  4. Install virtualenv OPTIONAL but highly recommended. If you do not wish to use virtualenv then skip to step 5
    • You can check if virtualenv is installed by running which virtualenv
    • If nothing shows up
      • pip3 install virtualenv or sudo pip3 install virtualenv (You MUST use pip3 otherwise virtualenv will not be installed for python 3 unless you aliased or changed your PATH variable to point to the python3 installation of Python 3)
    • Make the Python virtualenv for this project
      • Scripted
        • ./scripts/setup or sudo ./scripts/setup
        • skip to step 6
      • Manually
        • cd ..
        • virtualenv -p python3 venv
        • mv BeaverDam venv
        • cd venv/BeaverDam
        • source ../bin/activate
        • You should now see (venv) in front of terminal lines
  5. pip install -r requirements.txt or sudo pip install -r requirements.txt
  6. Setup, download and seed sample data by running ./scripts/seed -f
antingshen commented 7 years ago

Yes, using Python3 (3.4 or later recommended) should fix your issue