phy install issues

347 views
Skip to first unread message

Kevin Bolding

unread,
Aug 6, 2015, 1:12:21 PM8/6/15
to phy-users
just posted this on Gitter. Checking in over here as well.

Hi All, I've just tried to install phy using the quick install instructions on Windows. There is a previous installation of klusta-suite running on the same machine. There were a number of errors and warnings during installation and I apparently have issue #465. Anyone around to help?

Best,
Kevin B.

Kevin Bolding

unread,
Aug 6, 2015, 1:14:56 PM8/6/15
to phy-users
Actually I'll go ahead and attach the Powershell output during installation.
phy_install_log.txt

Kevin Bolding

unread,
Aug 7, 2015, 11:08:13 AM8/7/15
to phy-users
I installed on Windows Server 2012. There was a previous Anaconda installation and a previous version of Microsoft Visual C++ 2010 Redistributable and a previous installation of klusta-suite (installed using klustaviewa-setup.exe).

Round 1:
I opened up a Windows Powershell and copied and pasted this command:

iex ((new-object net.webclient).DownloadString('http://phy.cortexlab.net/install/latest.ps1'))

There were several errors during the installation as detailed in the log attached to the previous email.
The installer found my previous Anaconda installation and tried to alter/update packages there. This was not allowed because I had not chosen to run PowerShell as an Administrator.
phy.exe was finally installed in the python directory originally created by
klustaviewa-setup.exe
I assume this was because that was the first python directory found on my PATH.

At this point, I tried using "phy describe" on one of my KWIK files and rather than describing the KWIK file it reprinted the phy instructions.
Reading here led me to believe it may be an issue with having previous installations of Python: https://github.com/kwikteam/phy/issues/465

Since the installation had lots of errors and phy wasn't working correctly I decided to start over.

Round 2:
I uninstalled Anaconda Python using the Windows Control Panel.
I uninstalled my version of the
Microsoft Visual C++ 2010 Redistributable.
I also edited the system path
using the Windows Control Panel to remove any mention of the python installation performed by klustaviewa-setup.exe.
At this point I could type python at the PowerShell prompt and nothing would be found.

I reinstalled
Microsoft Visual C++ 2010 Redistributable from the link on the phy quick install page: http://phy.readthedocs.org/en/latest/
I opened PowerShell as an Administrator.
I thought better of using the quick-install since it seems there are multiple obstacles and I'd rather pick them apart one by one.
Proceeding from Step 2 of Advanced Install:
I downloaded and installed the
Python 3.4, 64-bit version of miniconda
In PowerShell I tried to copy and paste the commands listed in Step 3 but got an error: "The token '&&' is not a valid statement separator in this version."
So I'll do each statement separately. The first statement worked fine.
The second statement failed. I didn't the error copied down but it was about a connection terminated by remote host.
Googling around with the error I found it had something to do with the firewall (something I can't do anything about), but it's strange because the installation during Round 1 didn't have this issue.
Looking at the commands run by the quick-install, the difference is here:

conda install -c https://conda.binstar.org/kwikteam klustakwik2 -y
I copied and pasted this command and it worked fine.
The rest of the installation (vispy and phy) went fine.

Trying phy describe again:
Traceback (most recent call last):
  File "C:\Miniconda3\Scripts\phy-script.py", line 9, in <module>
    load_entry_point('phy==0.2.1', 'console_scripts', 'phy')()
  File "C:\Miniconda3\lib\site-packages\setuptools-18.0.1-py3.4.egg\pkg_resources\__init__.py", line 558, in load_entry_
point
  File "C:\Miniconda3\lib\site-packages\setuptools-18.0.1-py3.4.egg\pkg_resources\__init__.py", line 2682, in load_entry
_point
  File "C:\Miniconda3\lib\site-packages\setuptools-18.0.1-py3.4.egg\pkg_resources\__init__.py", line 2355, in load
  File "C:\Miniconda3\lib\site-packages\setuptools-18.0.1-py3.4.egg\pkg_resources\__init__.py", line 2361, in resolve
  File "C:\Miniconda3\lib\site-packages\phy\__init__.py", line 17, in <module>
    from .gui.qt import enable_qt, qt_app
  File "C:\Miniconda3\lib\site-packages\phy\gui\__init__.py", line 7, in <module>
    from .dock import DockWindow
  File "C:\Miniconda3\lib\site-packages\phy\gui\dock.py", line 11, in <module>
    from .qt import QtCore, QtGui
ImportError: cannot import name 'QtCore'

The generous and wise Justin Kiggins helped me out at this point and suggested this:
"let's make sure pyqt is installed...
conda install pyqt"

I got this:
The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    pyqt-4.10.4                |           py34_1        30.6 MB

The following packages will be UPDATED:

    pyqt: 4.10.4-py33_1 --> 4.10.4-py34_1

I proceeded and "phy describe" worked after that.

Apparently all of my packages were installed for Python 3.3, but I have Python 3.4.
I guess maybe you could fix this by changing the conda command?
conda install conda python=3.4 pip numpy matplotlib scipy h5py pyqt ipython-notebook requests six --yes

I went ahead and ran
conda update -all
and a lot of other packages switched from 3.3 to 3.4.

So I think I have a working copy now. Hopefully this is helpful to Windows users. This installation is on a remote server so I can't use OpenGL so I can't actually see anything yet, but hopefully I can use it for the non-manual stages of spikesorting now.

Best,
Kevin B.

Max Hunter

unread,
Aug 10, 2015, 4:54:52 AM8/10/15
to Kevin Bolding, phy-users
Hi Kevin, thanks for the detailed write-up! You've noted a couple of issues with the user guide that I've now fixed - thanks!

The python=3 issue seems to be a new bug in conda - I've filed an issue with them on GitHub and also changed the script so it should just work...

The only thing, as you mentioned, is that the 'easy install script' is likely to have some unintended consequences if you want to preserve an existing Python installation. On Linux (assuming you already have an Anaconda installation) you can do bash latest.sh -s (to skip the Anaconda install and simply create a virtual environment within an existing installation) but on Windows it's easiest to follow the latter half of the advanced instructions, which should now work...

Max

--
You received this message because you are subscribed to the Google Groups "phy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to phy-users+...@googlegroups.com.
To post to this group, send email to phy-...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/phy-users/dbd89da4-7c94-4028-b43f-874a70537801%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Ahmet Tugrul Ozdemir

unread,
Aug 28, 2015, 11:00:06 AM8/28/15
to phy-users
Hi all! I decided to switch to phy for my 64ch silicon probe data as you recommended earlier. I am having an issue with installation. I cannot download the example data set.

Please find a screen shot of windows shell in the attachment. If you can tell me whats wrong with it I will be grateful.

I never used this, perhaps the problem is very obvious.
Thanks,
Tugrul 

Phy Installation Problem.JPG

Cyrille Rossant

unread,
Aug 28, 2015, 11:03:40 AM8/28/15
to Ahmet Tugrul Ozdemir, phy-users
Hi,

We are aware of this problem on Windows, we will fix it very soon
(probably early next week).

Best,
Cyrille
> --
> You received this message because you are subscribed to the Google Groups
> "phy-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to phy-users+...@googlegroups.com.
> To post to this group, send email to phy-...@googlegroups.com.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/phy-users/90210238-e7b2-4df2-b929-40ded25c4a16%40googlegroups.com.

Ahmet Tugrul Ozdemir

unread,
Aug 28, 2015, 11:30:25 AM8/28/15
to phy-users
Hi Cyrille, 
Thanks for the quick reply. I will be waiting for it. In the mean time, I wanted to try it out on our linux server. Although i could proceed to spikesort, after computing the features it ended up with an error. Could you please take a look at it:

omputing the features: 63.64%. chunk 7/11.
Computing the features: 72.73%. chunk 8/11.
Computing the features: 81.82%. chunk 9/11.
Computing the features: 90.91%. chunk 10/11.
All features computed and saved.
17:29:08 [I] Switched to channel group 0.
Traceback (most recent call last):
  File "/4TB/Tugrul/miniconda/envs/myvirtualTugrul/bin/phy", line 11, in <module>
    sys.exit(main())
  File "/4TB/Tugrul/miniconda/envs/myvirtualTugrul/lib/python3.4/site-packages/phy/scripts/phy_script.py", line 416, in main
    exec_(cmd, {}, ns)
  File "<string>", line 1, in <module>
  File "/4TB/Tugrul/miniconda/envs/myvirtualTugrul/lib/python3.4/site-packages/phy/cluster/session.py", line 367, in cluster
    from klustakwik2.default_parameters import default_parameters
  File "/4TB/Tugrul/miniconda/envs/myvirtualTugrul/lib/python3.4/site-packages/klustakwik2/__init__.py", line 3, in <module>
    from .mask_starts import *
  File "/4TB/Tugrul/miniconda/envs/myvirtualTugrul/lib/python3.4/site-packages/klustakwik2/mask_starts.py", line 5, in <module>
    from .numerics import mask_start_clusters
  File "/4TB/Tugrul/miniconda/envs/myvirtualTugrul/lib/python3.4/site-packages/klustakwik2/numerics/__init__.py", line 7, in <module>
    from .cylib import *
  File "/4TB/Tugrul/miniconda/envs/myvirtualTugrul/lib/python3.4/site-packages/klustakwik2/numerics/cylib/__init__.py", line 3, in <module>
    from .compute_cluster_masks import *
  File "/4TB/Tugrul/miniconda/envs/myvirtualTugrul/lib/python3.4/site-packages/klustakwik2/numerics/cylib/compute_cluster_masks.py", line 1, in <module>
    from .compute_cluster_masks_cy import doaccum
ImportError: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /4TB/Tugrul/miniconda/envs/myvirtualTugrul/lib/python3.4/site-packages/klustakwik2/numerics/cylib/compute_cluster_masks_cy.cpython-34m.so)





Best, Tugrul


28 Ağustos 2015 Cuma 17:03:40 UTC+2 tarihinde Cyrille Rossant yazdı:

Cyrille Rossant

unread,
Aug 28, 2015, 11:32:56 AM8/28/15
to Ahmet Tugrul Ozdemir, phy-users
We've also seen this error before on some Linux machines: try doing
"conda uninstall klustakwik2" and then "pip install klustakwik2". This
will remove the precompiled version (incompatible with your system)
and recompile it.

Ahmet Tugrul Ozdemir

unread,
Aug 28, 2015, 11:40:36 AM8/28/15
to phy-users
Thanks again.
However 'pip install klustakwik2' gives the following error:

(myvirtualTugrul)[Tugrul@romulus ~]$ pip install klustakwik2
Collecting klustakwik2
  Using cached klustakwik2-0.2.4.tar.bz2
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 20, in <module>
      File "/tmp/pip-build-3i0z2z9n/klustakwik2/setup.py", line 20, in <module>
        from Cython.Build import cythonize
    ImportError: No module named 'Cython'

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-3i0z2z9n/klustakwik2

Tugrul



28 Ağustos 2015 Cuma 17:32:56 UTC+2 tarihinde Cyrille Rossant yazdı:

Cyrille Rossant

unread,
Aug 28, 2015, 11:48:13 AM8/28/15
to Ahmet Tugrul Ozdemir, phy-users
do "conda install cython" first. Also make sure that the gcc compiler
is installed.
> --
> You received this message because you are subscribed to the Google Groups
> "phy-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to phy-users+...@googlegroups.com.
> To post to this group, send email to phy-...@googlegroups.com.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/phy-users/501a348d-8a8e-4381-9d5d-a2c47b4876fa%40googlegroups.com.

Justin Kiggins

unread,
Aug 28, 2015, 1:13:04 PM8/28/15
to phy-users
Cyrille,

This seems to be a recurring problem... Is it possible to simply build the conda package with an older version of gcc? 2.12?

Justin

Max Hunter

unread,
Aug 28, 2015, 4:24:10 PM8/28/15
to Justin Kiggins, phy-users
Yup. The 'conda' release isn't actually the latest at the moment, so as soon as I rebuild the newest release across all platforms I'll look into doing it with glibc 2.12 - as far as I can tell there aren't many optimisations or bugs which are particularly critical between the two, unless you're on a POWER7 architecture (and you'd probably build from source if you were!).

(It's worth noting that glibc 2.14 is already ancient - it was released in 2011 - the current version is 2.22, released a couple of weeks ago.)

Max

--
You received this message because you are subscribed to the Google Groups "phy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to phy-users+...@googlegroups.com.
To post to this group, send email to phy-...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages