lmnt-com / haste

Haste: a fast, simple, and open RNN library
Apache License 2.0
325 stars 27 forks source link

Problem installing on Ubuntu 20.04, tensorflow 2.2 #19

Closed doubleapple123 closed 4 years ago

doubleapple123 commented 4 years ago

I'm getting an issue while installing using make haste_tf or just make

File "setup.py", line 54 with open(f'tf/_version.py', 'wt') as f: ^ SyntaxError: invalid syntax make: *** [Makefile:61: haste_tf] Error 1

not sure what the problem might be here, I can train models using gpu in tensorflow so I don't think it's a cuda or tensorflow problem but I'm not sure.

sharvil commented 4 years ago

Which version of Python are you using? Looks like there's an issue with the f-string.

doubleapple123 commented 4 years ago

python2.7, is there a way to try installing with a different version of python?

sharvil commented 4 years ago

Haste requires Python 3.5 or above. Python 2 is end-of-life as of January 2020. Most projects, including TensorFlow and PyTorch, have dropped support for Python 2.

My preferred way to use a specific Python version is to create a conda environment. Once you have conda installed on your machine, I'd suggest running something like:

conda create -n haste
conda activate haste
conda install python==3.7
# run standard Haste installation process
doubleapple123 commented 4 years ago

Thanks, I'll try this