ioam / topographica

A general-purpose neural simulator focusing on topographic maps.
topographica.org
BSD 3-Clause "New" or "Revised" License
53 stars 32 forks source link

Problems: Can't install Topographica successfully.(use latest github version of topographica) #581

Closed youngjt closed 10 years ago

youngjt commented 10 years ago

The error info is:

Traceback (most recent call last): File "/home/yangjiangtao/git/topo_youngjt/topographica", line 9, in import sys, topo File "/home/yangjiangtao/git/topo_youngjt/topo/init.py", line 218, in import imagen.random, imagen.image, imagen.patterncoordinator ImportError: No module named patterncoordinator

img_20140813_205022

Note: I have already installed topographica successfully in my local ubuntu(version 12.04).

Tobias-Fischer commented 10 years ago

Which version of Topographica are you running? It seems like you are trying to work with a recent Github version of Topographica, but imagen seems to be out of date.

Could you please try updating your imagen version? Did you try running

git submodule update --init

Within your topographica directory?

youngjt commented 10 years ago

(1)I don't use the recent Github version of topographica directly. I have got the latest version of topographica firstly,then I builde a branch of topophica in my own Github.The url is:https://github.com/youngjt/topo_youngjt.git.

(2)I have got a imagen package from:https://pypi.python.org/simple/imagen/,and install it,but the error also exists .

Tobias-Fischer commented 10 years ago

Hi, you can't use the latest Github version of topographica with the 1.0 release of imagen. Instead, you have to use the latest Github version of imagen. Once you do that, your issue will be resolved.

Alternatively, you can use the latest release (read: not the most recent Github) of topographica (see http://ioam.github.io/topographica/Downloads/index.html). This has the disadvantage that these packages are older.

PS: Rather than building your own branch by putting all files in a directory and committing them, why don't you fork Topographica from the main repository, and then do the changes on your fork?

youngjt commented 10 years ago

(1)Can you tell me the url of the latest Github version of imagen?I want to download the latest version of imagen package.

(2)I have already installed the latest release of topographica successfully in my local ubuntu.

Tobias-Fischer commented 10 years ago

Most dependencies such as imagen are available here: https://github.com/ioam/

youngjt commented 10 years ago

Thank you very much,I have seen it.

youngjt commented 10 years ago

I have downloaded (1)dataviews package from https://github.com/ioam/dataviews (2)lancet package from https://github.com/ioam/lancet (3)imagen package from https://github.com/ioam/imagen (4)featuremapper package from https://github.com/ioam/featuremapper (5)param package https://github.com/ioam/param (6)paramtk package https://github.com/ioam/paramtk then have installed them all successfully,But I find that the errors still exist. The errors are: e1

Other problem is that I can not run "topographica -g" instruction successfully.

$ topographica -g Traceback (most recent call last): File "/usr/local/bin/topographica", line 13, in import topo File "/usr/local/lib/python2.7/dist-packages/topo/init.py", line 216, in from topo.base.simulation import Simulation File "/usr/local/lib/python2.7/dist-packages/topo/base/init.py", line 18, in from imagen import boundingregion,sheetcoords,patterngenerator # pyflakes:ignore (API import) File "/usr/local/lib/python2.7/dist-packages/imagen/init.py", line 32, in from .patterngenerator import Constant, PatternGenerator File "/usr/local/lib/python2.7/dist-packages/imagen/patterngenerator.py", line 20, in from dataviews import SheetView File "/usr/local/lib/python2.7/dist-packages/imagen/../dataviews/dataviews.py", line 6, in from .ndmapping import Dimension, NdMapping ValueError: Attempted relative import in non-package

youngjt commented 10 years ago

Just now I have created other virtual machine of ubuntu and try to install topograrphica again. I find that I can install topographica successfully,but can not run it successfully. The detail information of the installation process is here:

(1)@ubuntu:~$ sudo apt-get update successful (2)@ubuntu:~$ sudo apt-get install python-pip python-tk python-imaging-tk python-numpy successful (3)@ubuntu:~$ sudo apt-get install ipython python-gmpy python-matplotlib python-scipy successful (4)@ubuntu:~$ sudo pip install topographica Requirement already satisfied (use --upgrade to upgrade): PIL>=1.1.6 in /usr/lib/python2.7/dist-packages/PIL (from topographica) Downloading/unpacking imagen>=1.0 (from topographica) Could not find any downloads that satisfy the requirement imagen>=1.0 (from topographica) No distributions at all found for imagen>=1.0 (from topographica) Storing complete log in /home/yangjiangtao/.pip/pip.log

(5)@ubuntu:~$ sudo pip install topographica Downloading/unpacking topographica Running setup.py install for paramtk Running setup.py install for imagen Running setup.py install for param

Successfully installed topographica paramtk imagen param Cleaning up...

(6)@ubuntu:/usr/local/bin$ topographica -g Creating /home/yangjiangtao/Documents/Topographica Traceback (most recent call last): File "/usr/local/bin/topographica", line 13, in import topo File "/usr/local/lib/python2.7/dist-packages/topo/init.py", line 216, in from topo.base.simulation import Simulation File "/usr/local/lib/python2.7/dist-packages/topo/base/init.py", line 18, in from imagen import boundingregion,sheetcoords,patterngenerator # pyflakes:ignore (API import) File "/usr/local/lib/python2.7/dist-packages/imagen/init.py", line 798, in class Translator(PatternGenerator): File "/usr/local/lib/python2.7/dist-packages/imagen/init.py", line 842, in Translator time_fn = param.Callable(default=numbergen.constanttime,doc=""" AttributeError: 'module' object has no attribute 'constanttime'

Tobias-Fischer commented 10 years ago

Can you please try using the offically documented way of installing the GitHub version of topographica? See: https://github.com/ioam/topographica

Thanks PS: You are still encountering issues as you try mixing incompatible versions of imagen and topographica.

ceball commented 10 years ago

Oh dear, what a mess. Sorry for the trouble. I have replicated your problem.

You have two choices:

  1. As Tobias has said, install the latest development (git) version of topographica. I have not tested this, but several developers are using this daily, so it ought to be working!
  2. Install the latest official release of topographica (0.9.8) from pip, but fixing an error in our packaging. The advantage is that I have tested this (see below), and it's an official release - but the disadvantage is that in practice most topographica users are probably using the latest git version.

For both methods, you should first uninstall the ioam packages you already have:

sudo pip uninstall topographica imagen paramtk param

Then, for method 1 see the link Tobias sent. Or, for method 2, which I've tested starting from the same (broken) position as you, follow these steps:

  1. uninstall ioam packages, as above
  2. create a text file called toporeq.txt (contents below):
  3. sudo pip install -r toporeq.txt

toporeq.txt:

topographica
param==1.0
paramtk==0.8
imagen==1.0
youngjt commented 10 years ago

ubuntu 12.02 (0) sudo apt-get update (1)install git (2)sudo git clone git://github.com/ioam/topographica.git cd topographica sudo git submodule update --init (3)install pip $ sudo apt-get install python-pip python-dev build-essential

(4)sudo pip install numpy (5)sudo apt-get install python-setuptools (6)sudo apt-get build-dep python-matplotlib (7)sudo easy_install -U distribute (8)sudo pip install matplotlib (9)sudo apt-get install python-scipy ipython ipython-notebook python-pandas python-sympy python-nose (10)sudo pip install cython (11)sudo pip install pyzmq jinja2 (12)sudo pip install pillow(this is a very important step) (13)sudo python topographica -g File "/home/yangjiangtao/git/topographica/external/dataviews/dataviews/ipython/magics.py", line 10, in raise SkipTest("IPython extension requires IPython >= 0.13") unittest.case.SkipTest: IPython extension requires IPython >= 0.13 (14)download the ipython-2.2.0.tar.gz install latest version of ipython (15)sudo python topographica -g (16)install topographic successfully

jbednar commented 10 years ago

Thanks, everyone, for helping out with this, and sorry I caused problems by moving numbergen into param! I think that #582 is the one that needs fixing, as this one looks like it has been addressed. But if someone wants to re-open this one, please explain what still needs to be done that's not already listed in #582.