Trying to install SPRING under Mac OS 10.12.6

45 views
Skip to first unread message

Luca Jovine

unread,
Oct 13, 2017, 10:11:09 AM10/13/17
to emspring
Hello,

I've just tried installing the binary version of SPRING for Mac OS, using the instructions at http://www.sachse.embl.de/emspring/install.html, but the installer immediately produces an error due to "unknown encoding":

==================================================================================
------------------------ Running binary_install_mac.sh ---------------------------
This script will quickly install Spring from binary. Once you move the binaries
you will need to re-run the script in the new location for it work.
==================================================================================
--------------------------------------------------------------------------------
Check pre-requisites: whether current directory is a Spring build directory.
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
1. Re-install pip
--------------------------------------------------------------------------------
New python executable in ./bin/python
Installing setuptools.....................
  Complete output from command /usr/local/spring/sp...0-85-1617/bin/python -c "#!python
\"\"\"Bootstra...sys.argv[1:])






" --always-copy -U setuptools:
  Traceback (most recent call last):
  File "<string>", line 279, in <module>
  File "<string>", line 240, in main
  File "/usr/local/spring/spring_v0-85-1617/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 2279, in main
    **kw
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 151, in setup
    dist.run_commands()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/usr/local/spring/spring_v0-85-1617/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 411, in run
    self.easy_install(spec, not self.no_deps)
  File "/usr/local/spring/spring_v0-85-1617/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 640, in easy_install
    self.install_site_py()
  File "/usr/local/spring/spring_v0-85-1617/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1285, in install_site_py
    with io.open(sitepy) as strm:
LookupError: unknown encoding:
----------------------------------------
...Installing setuptools...done.
Traceback (most recent call last):
  File "patches/virtualenv.py", line 2471, in <module>
    main()
  File "patches/virtualenv.py", line 942, in main
    never_download=options.never_download)
  File "patches/virtualenv.py", line 1052, in create_environment
    search_dirs=search_dirs, never_download=never_download)
  File "patches/virtualenv.py", line 599, in install_setuptools
    search_dirs=search_dirs, never_download=never_download)
  File "patches/virtualenv.py", line 571, in _install_req
    cwd=cwd)
  File "patches/virtualenv.py", line 1020, in call_subprocess
    % (cmd_desc, proc.returncode))
OSError: Command /usr/local/spring/sp...0-85-1617/bin/python -c "#!python
\"\"\"Bootstra...sys.argv[1:])
(...)

What am U doing wrong?

Thanks,

Luca

Carsten Sachse

unread,
Oct 13, 2017, 10:39:25 AM10/13/17
to emspring
Dear Luca,

Is this is an updated install or a fresh install?

Did the installation stop at the above point? Do you have python installed?
Did you check the prerequisites:

Just to be certain before going into more details.

Best wishes,


Carsten

Luca Jovine

unread,
Oct 14, 2017, 4:05:04 AM10/14/17
to emspring
Dear Carsten,

Thanks for the prompt reply. It’s a fresh install, and as far as I can tell I have all the prerequisites - latest Xcode, command line tools etc. My default python in bash is:

OSX> sh
sh-3.2$ which python
/usr/bin/python
sh-3.2$ python -V
Python 2.7.10

As for the installation, it continues… but produces a lot of (consequent) errors, and at the end cannot run tests because it cannot find ./bin/nosetests.

I attach the full log, hope it helps!

Thanks,

Luca

build_mac.log

Carsten Sachse

unread,
Oct 16, 2017, 3:50:43 AM10/16/17
to emspring
Dear Luca,

Thank you for sending the complete build.log including the failure messages. 
It looks like the first error message was in not being able to download openmpi-2.1.1.tar.gz  - 
I will check the building again and keep you updated. 

With Ctffind4 included you will need additional libraries installed via macports.
Have you read and done the part?
% sudo port install wxwidgets-3.2 fftw-3 

As building on a mac is more complicated I suggest that you download and install the binary rather than follow the build instructions.

I hope this will install Spring for now.

Best wishes,


Carsten 

Luca Jovine

unread,
Oct 16, 2017, 4:41:37 AM10/16/17
to emspring
Dear Carsten,

Yes I installed wxwidgets-3.2 fftw-3 via MacPorts.

But if I run the binary installer I get similar error messages:

" --always-copy -U setuptools failed with error code 1
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 1558k  100 1558k    0     0   897k      0  0:00:01  0:00:01 --:--:--  896k
Collecting pip
  Using cached pip-9.0.1-py2.py3-none-any.whl
Installing collected packages: pip
Successfully installed pip-9.0.1
--------------------------------------------------------------------------------
2. Re-install latest setuptools
--------------------------------------------------------------------------------
patches/binary_install_mac.sh: ./bin/pip: /Users/sachse/tempdir/spring_build_2017/spring_v0-85-1617/bin/python: bad interpreter: No such file or directory
----------------------------------------------------------------------------------
3. Re-instate virtualenv and buildout environment.
----------------------------------------------------------------------------------
" --always-copy -U setuptools failed with error code 1
/usr/local/spring/spring_v0-85-1617/lib/python2.7/site-packages/pkg_resources/__init__.py:187: RuntimeWarning: You have iterated over the result of pkg_resources.parse_version. This is a legacy behavior which is inconsistent with the new version class introduced in setuptools 8.0. In most cases, conversion to a tuple is unnecessary. For comparison of versions, sort the Version instances directly. If you have another use case requiring the tuple, please file a bug with the setuptools project describing that need.
  stacklevel=1,
Creating directory '/usr/local/spring/spring_v0-85-1617/develop-eggs'.
--------------------------------------------------------------------------------
4. Install latest Python dependencies for Spring
--------------------------------------------------------------------------------
Updating springpython.
----------------------------------------------------------------------------------
Install done. Check whether Spring was successfully installed by brief testing.
----------------------------------------------------------------------------------
..segmentclass --f parfile_32281.par --l segmentclass_test.log --d segmentclass_test
Program to classify excised in-plane rotated segments using SPARX's k-means clustering

Input parameters are read from parfile_32281.par
The following input parameters have been received:
Image input stack                        = /usr/local/spring/spring_v0-85-1617/test_segmentclass/test_segments.hdf
Class average stack                      = test_averages.hdf
Reference image option                   = False
Image reference stack                    = test_ref_segments.hdf
Spring database option                   = False
Database prepare option                  = False
spring.db file                           = ../spring.db
Class variance stack                     = test_variances.hdf
Eigenimage stack                         = test_eigenimages.hdf
Pixel size in Angstrom                   = 5.0
Estimated helix width and height in Angstrom = (450, 675)
Number of classes                        = 3
Number of iterations                     = 3
Keep intermediate files                  = False
Limit in-plane rotation                  = True
Delta in-plane rotation angle            = 10.0
X and Y translation range in Angstrom    = (20, 15)
High-pass filter option                  = False
Low-pass filter option                   = False
High and low-pass filter cutoffs in 1/Angstrom = (0.01, 0.06)
B-Factor                                 = 0
Custom filter option                     = False
Custom-built filter file                 = test_filter_file.dat
Automatic filter option                  = False
Binning option                           = True
Binning factor                           = 2
MPI option                               = True
Number of CPUs                           = 8
Temporary directory                      = /usr/local/spring/spring_v0-85-1617/test_segmentclass
/usr/local/spring/spring_v0-85-1617/test_segmentclass/test_segments.hdf found
/usr/local/spring/spring_v0-85-1617/test_segmentclass found

Program to align segments from helical specimens with a restrained in-plane rotation of 0 or 180 +/- delta degrees

Input parameters are read from parfile_32345.par
The following input parameters have been received:
Image input stack                        = /usr/local/spring/spring_v0-85-1617/test_segmentclass/segmentclass_test/test_segments2binned.hdf
Image output stack                       = test_segments2binnedali.hdf
Number of iterations                     = 3
Reference option                         = True
Image reference stack                    = /usr/local/spring/spring_v0-85-1617/test_segmentclass/segmentclass_test/sxk_means00/averages.hdf
Update references                        = True
Aligned average stack                    = multi_ref_avg.hdf
Pixel size in Angstrom                   = 10.0
Estimated helix width and height in Angstrom = (450, 675)
Local refinement                         = False
Absolute X and Y translation limit in Angstrom = (20, 15)
Internal binning factor                  = 1
Limit in-plane rotation                  = True
Delta in-plane rotation angle            = 10.0
X and Y translation range in Angstrom    = (20, 15)
High-pass filter option                  = False
Low-pass filter option                   = False
High and low-pass filter cutoffs in 1/Angstrom = (0.01, 0.06)
B-Factor                                 = 0
Custom filter option                     = False
Custom-built filter file                 = test_filter_file.dat
Automatic filter option                  = False
MPI option                               = True
Number of CPUs                           = 8
Temporary directory                      = /usr/local/spring/spring_v0-85-1617/test_segmentclass
/usr/local/spring/spring_v0-85-1617/test_segmentclass/segmentclass_test/test_segments2binned.hdf found
/usr/local/spring/spring_v0-85-1617/test_segmentclass/segmentclass_test/sxk_means00/averages.hdf found
/usr/local/spring/spring_v0-85-1617/test_segmentclass found

Program to align segments from helical specimens with a restrained in-plane rotation of 0 or 180 +/- delta degrees

Input parameters are read from parfile_32345.par
The following input parameters have been received:
Image input stack                        = /usr/local/spring/spring_v0-85-1617/test_segmentclass/segmentclass_test/test_segments2binned.hdf
Image output stack                       = test_segments2binnedali.hdf
Number of iterations                     = 3
Reference option                         = True
Image reference stack                    = /usr/local/spring/spring_v0-85-1617/test_segmentclass/segmentclass_test/sxk_means02/averages.hdf
Update references                        = True
Aligned average stack                    = multi_ref_avg.hdf
Pixel size in Angstrom                   = 10.0
Estimated helix width and height in Angstrom = (450, 675)
Local refinement                         = True
Absolute X and Y translation limit in Angstrom = (20, 15)
Internal binning factor                  = 1
Limit in-plane rotation                  = True
Delta in-plane rotation angle            = 10.0
X and Y translation range in Angstrom    = (20, 15)
High-pass filter option                  = False
Low-pass filter option                   = False
High and low-pass filter cutoffs in 1/Angstrom = (0.01, 0.06)
B-Factor                                 = 0
Custom filter option                     = False
Custom-built filter file                 = test_filter_file.dat
Automatic filter option                  = False
MPI option                               = True
Number of CPUs                           = 8
Temporary directory                      = /usr/local/spring/spring_v0-85-1617/test_segmentclass
/usr/local/spring/spring_v0-85-1617/test_segmentclass/segmentclass_test/test_segments2binned.hdf found
/usr/local/spring/spring_v0-85-1617/test_segmentclass/segmentclass_test/sxk_means02/averages.hdf found
/usr/local/spring/spring_v0-85-1617/test_segmentclass found

Program to align segments from helical specimens with a restrained in-plane rotation of 0 or 180 +/- delta degrees

Input parameters are read from parfile_32345.par
The following input parameters have been received:
Image input stack                        = /usr/local/spring/spring_v0-85-1617/test_segmentclass/segmentclass_test/test_segments2binned.hdf
Image output stack                       = test_segments2binnedali.hdf
Number of iterations                     = 3
Reference option                         = True
Image reference stack                    = /usr/local/spring/spring_v0-85-1617/test_segmentclass/segmentclass_test/sxk_means03/averages.hdf
Update references                        = True
Aligned average stack                    = multi_ref_avg.hdf
Pixel size in Angstrom                   = 10.0
Estimated helix width and height in Angstrom = (450, 675)
Local refinement                         = True
Absolute X and Y translation limit in Angstrom = (20, 15)
Internal binning factor                  = 1
Limit in-plane rotation                  = True
Delta in-plane rotation angle            = 10.0
X and Y translation range in Angstrom    = (20, 15)
High-pass filter option                  = False
Low-pass filter option                   = False
High and low-pass filter cutoffs in 1/Angstrom = (0.01, 0.06)
B-Factor                                 = 0
Custom filter option                     = False
Custom-built filter file                 = test_filter_file.dat
Automatic filter option                  = False
MPI option                               = True
Number of CPUs                           = 8
Temporary directory                      = /usr/local/spring/spring_v0-85-1617/test_segmentclass
/usr/local/spring/spring_v0-85-1617/test_segmentclass/segmentclass_test/test_segments2binned.hdf found
/usr/local/spring/spring_v0-85-1617/test_segmentclass/segmentclass_test/sxk_means03/averages.hdf found
/usr/local/spring/spring_v0-85-1617/test_segmentclass found
start analyzing..., ncov = 17002

test_segments.hdf=/usr/local/spring/spring_v0-85-1617/test_segmentclass/test_segments.hdf
test_averages.hdf=test_averages.hdf
False=False
test_ref_segments.hdf=test_ref_segments.hdf
False=False
False=False
../spring.db=../spring.db
test_variances.hdf=test_variances.hdf
test_eigenimages.hdf=test_eigenimages.hdf
5.0=5.0
(450, 675)=(450, 675)
3=3
3=3
False=False
True=True
10.0=10.0
(20, 15)=(20, 15)
False=False
False=False
(0.01, 0.06)=(0.01, 0.06)
0=0
False=False
test_filter_file.dat=test_filter_file.dat
False=False
True=True
2=2
True=True
8=8
/usr/local/spring/spring_v0-85-1617/test_segmentclass=/usr/local/spring/spring_v0-85-1617/test_segmentclass
..
----------------------------------------------------------------------
Ran 4 tests in 49.852s

OK
==================================================================================
Testing done. If 4 quick tests ran OK Spring was correctly installed.
Install done. Please type to add the following line to your .cshrc:
echo setenv PATH:/usr/local/spring/spring_v0-85-1617/bin:$PATH >> ~/.cshrc
or your favorite Bourne shell rc file (e.g. .bashrc, .zshrc):
echo export PATH:/usr/local/spring/spring_v0-85-1617/bin:$PATH >> ~/.bashrc
==================================================================================

...although ultimately the tests seem fine. But can one really disregard the errors in steps 1-3?

Thanks,

Luca

Luca Jovine

unread,
Oct 16, 2017, 4:53:47 AM10/16/17
to emspring
Hi again, incidentally if I try the update procedure described at http://www.sachse.embl.de/emspring/install.html after the binary install, I also get some errors... so maybe it did not install properly after all.
-Luca

OSX> ./bin/buildout install springpython
Uninstalling springpython.
Installing springpython.
Getting distribution for 'tabulate'.
zip_safe flag not set; analyzing archive contents...
Got tabulate 0.8.1.
Getting distribution for 'tqdm>=4.11'.
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/local/spring/spring_v0-85-1617/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 2279, in main
    **kw
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 151, in setup
    dist.run_commands()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/usr/local/spring/spring_v0-85-1617/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 411, in run
    self.easy_install(spec, not self.no_deps)
  File "/usr/local/spring/spring_v0-85-1617/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 653, in easy_install
    return self.install_item(None, spec, tmpdir, deps, True)
  File "/usr/local/spring/spring_v0-85-1617/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 698, in install_item
    dists = self.install_eggs(spec, download, tmpdir)
  File "/usr/local/spring/spring_v0-85-1617/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 879, in install_eggs
    return self.build_and_install(setup_script, setup_base)
  File "/usr/local/spring/spring_v0-85-1617/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1118, in build_and_install
    self.run_setup(setup_script, setup_base, args)
  File "/usr/local/spring/spring_v0-85-1617/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1104, in run_setup
    run_setup(setup_script, args)
  File "/usr/local/spring/spring_v0-85-1617/lib/python2.7/site-packages/setuptools/sandbox.py", line 257, in run_setup
    raise
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/contextlib.py", line 35, in __exit__
    self.gen.throw(type, value, traceback)
  File "/usr/local/spring/spring_v0-85-1617/lib/python2.7/site-packages/setuptools/sandbox.py", line 199, in setup_context
    yield
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/contextlib.py", line 35, in __exit__
    self.gen.throw(type, value, traceback)
  File "/usr/local/spring/spring_v0-85-1617/lib/python2.7/site-packages/setuptools/sandbox.py", line 170, in save_modules
    saved_exc.resume()
  File "/usr/local/spring/spring_v0-85-1617/lib/python2.7/site-packages/setuptools/sandbox.py", line 145, in resume
    six.reraise(type, exc, self._tb)
  File "/usr/local/spring/spring_v0-85-1617/lib/python2.7/site-packages/setuptools/sandbox.py", line 158, in save_modules
    yield saved
  File "/usr/local/spring/spring_v0-85-1617/lib/python2.7/site-packages/setuptools/sandbox.py", line 199, in setup_context
    yield
  File "/usr/local/spring/spring_v0-85-1617/lib/python2.7/site-packages/setuptools/sandbox.py", line 254, in run_setup
    _execfile(setup_script, ns)
  File "/usr/local/spring/spring_v0-85-1617/lib/python2.7/site-packages/setuptools/sandbox.py", line 49, in _execfile
    exec(code, globals, locals)
  File "/var/folders/3b/719_036177qd7zxw_r8p6_080000gn/T/easy_install-L3W32E/tqdm-4.19.4/setup.py", line 125, in <module>
LookupError: unknown encoding:
An error occurred when trying to install /var/folders/3b/719_036177qd7zxw_r8p6_080000gn/T/tmpAzImbqget_dist/tqdm-4.19.4.tar.gz. Look above this message for any errors that were output by easy_install.
While:
  Installing springpython.
  Getting distribution for 'tqdm>=4.11'.

An internal error occurred due to a bug in either zc.buildout or in a
recipe being used:
Traceback (most recent call last):
  File "/usr/local/spring/spring_v0-85-1617/lib/python2.7/site-packages/zc.buildout-2.9.5-py2.7.egg/zc/buildout/buildout.py", line 2123, in main
    getattr(buildout, command)(args)
  File "/usr/local/spring/spring_v0-85-1617/lib/python2.7/site-packages/zc.buildout-2.9.5-py2.7.egg/zc/buildout/buildout.py", line 796, in install
    installed_files = self[part]._call(recipe.install)
  File "/usr/local/spring/spring_v0-85-1617/lib/python2.7/site-packages/zc.buildout-2.9.5-py2.7.egg/zc/buildout/buildout.py", line 1553, in _call
    return f()
  File "/usr/local/spring/spring_v0-85-1617/lib/python2.7/site-packages/zc.recipe.egg-2.0.4-py2.7.egg/zc/recipe/egg/egg.py", line 193, in install
    reqs, ws = self.working_set()
  File "/usr/local/spring/spring_v0-85-1617/lib/python2.7/site-packages/zc.recipe.egg-2.0.4-py2.7.egg/zc/recipe/egg/egg.py", line 82, in working_set
    allow_hosts=self.allow_hosts,
  File "/usr/local/spring/spring_v0-85-1617/lib/python2.7/site-packages/zc.recipe.egg-2.0.4-py2.7.egg/zc/recipe/egg/egg.py", line 135, in _working_set
    allow_hosts=allow_hosts)
  File "/usr/local/spring/spring_v0-85-1617/lib/python2.7/site-packages/zc.buildout-2.9.5-py2.7.egg/zc/buildout/easy_install.py", line 913, in install
    return installer.install(specs, working_set)
  File "/usr/local/spring/spring_v0-85-1617/lib/python2.7/site-packages/zc.buildout-2.9.5-py2.7.egg/zc/buildout/easy_install.py", line 714, in install
    for dist in self._get_dist(req, ws):
  File "/usr/local/spring/spring_v0-85-1617/lib/python2.7/site-packages/zc.buildout-2.9.5-py2.7.egg/zc/buildout/easy_install.py", line 563, in _get_dist
    dists = [_move_to_eggs_dir_and_compile(dist, self._dest)]
  File "/usr/local/spring/spring_v0-85-1617/lib/python2.7/site-packages/zc.buildout-2.9.5-py2.7.egg/zc/buildout/easy_install.py", line 1699, in _move_to_eggs_dir_and_compile
    [tmp_loc] = glob.glob(os.path.join(tmp_dest, '*'))
ValueError: need more than 0 values to unpack
OSX>

Luca Jovine

unread,
Oct 16, 2017, 5:30:40 AM10/16/17
to emspring
And finally, if I try the steps described in the tutorial, I get:

OSX>
Spring environment loaded.
Traceback (most recent call last):
  File "/usr/local/spring/spring_v0-85-1617/lib/python2.7/site-packages/emspring-0.85.1617-py2.7.egg/spring/csinfrastr/csgui.py", line 803, in jobDone
    os.rename(self.prgparfile, self.directory + os.sep + 'parameters.par')
OSError: [Errno 2] No such file or directory

Carsten Sachse

unread,
Oct 16, 2017, 8:44:17 AM10/16/17
to emspring
Hi Luca,

Indeed your binary install worked. Ignore some of the occurring messages as the tests ran fine.

On Monday, 16 October 2017 11:30:40 UTC+2, Luca Jovine wrote:

Traceback (most recent call last):
  File "/usr/local/spring/spring_v0-85-1617/lib/python2.7/site-packages/emspring-0.85.1617-py2.7.egg/spring/csinfrastr/csgui.py", line 803, in jobDone
    os.rename(self.prgparfile, self.directory + os.sep + 'parameters.par')
OSError: [Errno 2] No such file or directory

This error can be ignored and should be taken care of in future releases. Spring should still work fine.

Best wishes,


Carsten 

Carsten Sachse

unread,
Oct 16, 2017, 11:04:23 AM10/16/17
to emspring
Dear Luca,

Thank you for pointing out the build error.

When you built it looks like on the mac the following address failed to download:

The default mac urllib2 libraries are not up to date and cannot deal with the security standards of the openmpi download server.
You can do it via another command line.
Add the following line below build section 3 (line 90) of build_mac.sh:

I updated this on the website build_mac.sh script. 

Best wishes,


Carsten

On Friday, 13 October 2017 16:11:09 UTC+2, Luca Jovine wrote:

Luca Jovine

unread,
Oct 16, 2017, 12:38:46 PM10/16/17
to emspring
Hi Carsten,

OK, great!

Thanks and best regards,

Luca

Luca Jovine

unread,
Oct 16, 2017, 12:44:11 PM10/16/17
to emspring
Hi again,

This indeed allowed the build to go further, but I also had to add:

cd fetch; curl --remote-name http://grigoriefflab.janelia.org/sites/default/files/ctffind-4.1.8.tar.gz; cd ..

However, the build procedure still failed later on. Anyway, since the binary installation worked I will use that one!

Thanks once more,

Luca
Reply all
Reply to author
Forward
0 new messages