ryankiros / neural-storyteller

A recurrent neural network for generating little stories about images
2.97k stars 544 forks source link

No module named theano #33

Open quintendewilde opened 6 years ago

quintendewilde commented 6 years ago

I'm giving this project a 3third try. Even installed ubuntu on my Imac for this.

After installing all dependencies and adjusting the config.py file (except for two lines I don't know what to place in) # Skip-thoughts paths['skmodels'] = '/u/rkiros/public_html/models/' paths['sktables'] = '/u/rkiros/public_html/models/' But that's not the problem for now, I get a import theano error. Even though i've installed it via conda.

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-e2356e8a9459> in <module>()
----> 1 import generate

/home/quinten/Documents/neuralstory/neural-storyteller-master/generate.py in <module>()
      8 import skimage.transform
      9 
---> 10 import skipthoughts
     11 import decoder
     12 import embedding

/home/quinten/Documents/neuralstory/neural-storyteller-master/skipthoughts.py in <module>()
      4 import os
      5 
----> 6 import theano
      7 import theano.tensor as tensor
      8 

ImportError: No module named theano

conda list theano gives = theano 0.9.0 py27_0

any help would be appriciated!

cuuupid commented 6 years ago

If you run python -c "import theano" what is the output?

Make sure you're running Anaconda python (if you type python and hit enter it should have a preface about Anaconda).

Also--Theano is now at 1.0 and pip install theano should work as well (you will likely need BLAS, I recommend conda install mkl-service as OpenBLAS is a pain to install).

LucasYEAST commented 6 years ago

I'm encountering the same issue. First tried to install theano using conda install. This gave me version 0.9. Next, I uninstalled that version and installed version 1.0 using pip install theano==1.0 within a conda environment. Now I can't seem to import theano. Running python -c "import theano" gives the same output:

File "<string>", line1, in <module>
    ImportError: No module named theano
cuuupid commented 6 years ago

Try running:

pip install theano; python -c "import theano"

Should work, otherwise pip and python are pointing to two different versions/site_modules. Btw--a pip install in an anaconda environment will not work anywhere outside of that environment. I recommend keeping all your AI in a separate environment and working only within that.