Opened 5 years ago

Closed 5 years ago

#58796 closed defect (fixed)

Problem installing py27-pymvpa

Reported by: NicoleEic Owned by: stromnov (Andrey Stromnov)
Priority: Normal Milestone:
Component: ports Version: 2.5.4
Keywords: Cc:
Port: py-pymvpa

Description

Hello, I would like to install pymvpa and I followed the instructions on http://www.pymvpa.org/installation.html, however the installation of pymvpa fails. The installation of other ports, such as py27-matplotlib works fine.

When I run the following line, I get the error:

sudo port install py27-pymvpa

The output in my terminal is:

--->  Computing dependencies for py27-pymvpa
--->  Building py27-pymvpa
Error: Failed to build py27-pymvpa: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-pymvpa/py27-pymvpa/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets to report a bug.
Error: Processing of port py27-pymvpa failed

Systems information: -macOS 10.14 (darwin/18.6.0) arch i386 -MacPorts 2.5.4 -Xcode 10.1 -SDK 10.14

I have attached the main.log file to this post.

Can you please give me advise of how to proceed.

Kind regards, Nicole

Attachments (1)

main.log (548.0 KB) - added by NicoleEic 5 years ago.
main.log

Download all attachments as: .zip

Change History (9)

Changed 5 years ago by NicoleEic

Attachment: main.log added

main.log

comment:1 Changed 5 years ago by reneeotten (Renee Otten)

Owner: set to stromnov
Port: py-pymvpa added; py27-pymvpa removed
Status: newassigned

comment:2 Changed 5 years ago by reneeotten (Renee Otten)

from the log it looks like this is the problem:

:info:build unable to execute 'swig': No such file or directory
:info:build error: command 'swig' failed with exit status 1

for me it builds fine, but I also have swig installed; so perhaps the port is just missing a dependency.

Can you first do:

sudo port install swig

and then try to install py27-pymvpa again and let us know here how that goes?

comment:3 Changed 5 years ago by NicoleEic

Hello,

thank you very much for looking into this. I tried the install swig using the suggested command, but it didn't change the error message in the terminal. Then I ran the following lines, which were executed without errors:

$ port clean --all py27-pymvpa

$ sudo port install swig-python
--->  Computing dependencies for swig-python
--->  Cleaning swig-python
--->  Scanning binaries for linking errors
--->  No broken files found.
--->  No broken ports found.


# recommended installation command from the pymvpa website:
sudo port install py27-pymvpa +scipy +nibabel +hcluster +libsvm +matplotlib +pywavelet
--->  Computing dependencies for py27-pymvpa
--->  Cleaning py27-pymvpa
--->  Scanning binaries for linking errors
--->  No broken files found.
--->  No broken ports found.

sudo port select python python27-apple

However, the module was still not available to import for python:

$ python
Python 2.7.10 (default, Feb 22 2019, 21:55:15) 
[GCC 4.2.1 Compatible Apple LLVM 10.0.1 (clang-1001.0.37.14)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import mvpa2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named mvpa2

On the other hand, the issue does not occur with the py35-pymvpa port, which allows me to import the module:

$ sudo port install py35-pymvpa +scipy +nibabel +hcluster +libsvm +matplotlib +pywavelet
--->  Computing dependencies for py35-pymvpa
The following dependencies will be installed: 
 py35-cython
 py35-nose
 py35-numpy
 py35-setuptools
 python35
Continue? [Y/n]: y
--->  Fetching archive for python35
--->  Attempting to fetch python35-3.5.7_0.darwin_18.x86_64.tbz2 from http://ywg.ca.packages.macports.org/mirror/macports/packages/python35
--->  Attempting to fetch python35-3.5.7_0.darwin_18.x86_64.tbz2.rmd160 from http://ywg.ca.packages.macports.org/mirror/macports/packages/python35
--->  Installing python35 @3.5.7_0
--->  Activating python35 @3.5.7_0
--->  Cleaning python35
--->  Fetching archive for py35-cython
 #(...etc...)


$ sudo port select --set python python35
$ sudo port select --set python3 python35

$ python
Python 3.5.7 (default, Mar 19 2019, 03:20:27) 
[GCC 4.2.1 Compatible Apple LLVM 10.0.0 (clang-1000.11.45.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import mvpa2

It seems I can use the module now, but I'd prefer the python27 version, which is supposedly more robust. Do you have any suggestion of what I can change about the installation command? Will any other log-outputs be helpful for you?

Thank you very much and kind regards, Nicole

comment:4 Changed 5 years ago by reneeotten (Renee Otten)

hi Nicole,

the instructions on that website must be years old since the variants you're trying to install (using the + after the port name) don't exist for as long as GitHub remembers ;) So you can just do sudo port install py27-pymvpa and leave all the other stuff out; even if you do use the command you showed it will ignore the non-existing variants anyway.

Anyway, you're observation about installing swig-python makes sense - you likely need the Python bindings for swig as well.

The command to specify which Python version to use when you type "python" is incorrect. You're selecting the Python version that comes with macOS (I think), or at least it's not the latest MacPorts version (which is Python 2.7.16). So instead, please do:

sudo port select python python27

and then it should all work - at least it does for me.

comment:5 Changed 5 years ago by NicoleEic

Hello,

thank you, the following command you suggested solved the problem:

sudo port select python python27

I am now able to import the module.

This ticket can be closed now. Many thanks again for your help!

Nicole

comment:6 Changed 5 years ago by reneeotten (Renee Otten)

Great, I am glad it worked!

Has duplicate, ticket 51691; I'll look into fixing it and submit a PR.

comment:7 Changed 5 years ago by reneeotten (Renee Otten)

see PR4990

comment:8 Changed 5 years ago by reneeotten (Renee Otten)

Resolution: fixed
Status: assignedclosed

In e53f025c347448135d14eb360da207a0a5f418d2/macports-ports (master):

py-pymvpa: update dependencies

  • add missing swig-python as build dependency
  • add required scipy and nibabel dependencies
  • remove unneeded setuptools dependency

Fixes: #58796
See: #51691

Note: See TracTickets for help on using tickets.