Closed tuelwer closed 4 years ago
Hello. As far as I can tell, this is due to Google Colab still being on Python 3.6. We're relying on a Python 3.7 feature for some of our imports, as it turns out.
I will look into fixing this, as we don't seem to use any other >=3.7 features, and supporting Colab is a good idea.
Meanwhile using Python 3.7 should do the trick, although it is either hard or impossible to do in Colab, from my quick research. It's a bit strange that they're still on 3.6, but oh well.
A bunch of other users will still have Python 3.6, e.g. those with Ubuntu LTS 18.04, or any distribution more than 2 years old. While it's not that hard to install another version as a user, it seems a bit early to insist on 3.7 unless it's a real pain to be compatible.
I've pushed some code to fix this. from nflows.flows import autoregressive as ar
works fine for me now in Python 3.6 (tested in Colab as well). For now you can use the following in Collab to get the latest code:
!pip install git+https://github.com/bayesiains/nflows@master
I think we'll release a new version after #8 is fixed (hopefully soon), and then !pip install nflows
will work as expected.
Thanks for reporting, @tuelwer ! If you run into further problems -- do let us know.
Thanks for the fast fix, @arturbekasov! Works now without problems.
Hello,
first of all, thanks for sharing your toolbox!
However, I have a minor problem using it. When I try to import the masked autoregressive flow using
from nflows.flows import autoregressive as ar
, I get the following error:I am using Google Colab and installed the toolbox using
!pip3 install nflows
. Any help is appreciated. Thank you!