[FIBERALLOC-6] Installation problem in a Python environment with anaconda Created: 15/Sep/17  Updated: 20/Mar/19  Resolved: 20/Mar/19

Status: Done
Project: Target to fiber allocation and configuration
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Normal
Reporter: Kiyoto Yabe Assignee: Martin Reinecke
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Problem:
If the package is build with python installed using anaconda, the pyETS cannot be imported with the following error:
Fatal Python error: PyThreadState_Get: no current thread
Abort trap: 6

Environment in test:

  • macOS Sierra 10.12.6
  • Python 2.7.13 | Anaconda custom (x86_64)
  • Anaconda 4.3.25


 Comments   
Comment by cloomis [ 15/Sep/17 ]

master?

Comment by Kiyoto Yabe [ 15/Sep/17 ]

Yes, master branch.

Comment by cloomis [ 15/Sep/17 ]

I am not sure that I have the correct answer, but I have one which works. Basically, python-config --ldflags does not provide the -L library path, and so the system's python framework is used instead of the anaconda python library.

On OSX, otool -L pyETS.so shows the problem. On Linux, ldd pyETS.so would.

Add -L$(shell $(PYTHON_CONFIG) --prefix)/lib to your PYFLAGS to get the right python library linked into your pyETS.so

Comment by Martin Reinecke [ 15/Sep/17 ]

Thanks Craig!
I updated the Makefile accordingly.
Kiyoto, could you please double-check?

Craig, if you can spare the time, could you please have a look at the branch "setuptools-test"? I'm trying to write a portable setup.py there, which should in principle make the package installable via a simple

pip install --user git+https://github.com/Subaru-PFS/ets_fiber_assigner.git@setuptools-test

Do you think that this approach will be more promising in the longer term?

Comment by Kiyoto Yabe [ 15/Sep/17 ]

I confirmed that it worked. Thank you.

Comment by Kiyoto Yabe [ 21/Sep/17 ]

I also confirmed that it worked in Tomomi's environment. Now we are ready for the announcement.

Comment by Martin Reinecke [ 22/Sep/17 ]

Fine with me! What is the procedure?

Comment by Kiyoto Yabe [ 25/Sep/17 ]

I will send an e-mail to the collaboration this week. Martin Reinecke Could you add a release tag at the current point, please?

Comment by Martin Reinecke [ 01/Oct/17 ]

I have tagged the code on Github with the release tag "v1.0". Please note that this does not yet contain the proposed fix for FIBERALLOC-7.

Comment by Martin Reinecke [ 12/Mar/18 ]

Which installation procedure did you try?

If the  Makefile-based approach described in README.md doesn't work, there is a chance that doing a

python setup.py 

might work, or even

pip install --user git+https://github.com/Subaru-PFS/ets_fiber_assigner.git

(For this last command, you don't even need to clone the repository first.)

If the problem persists, we will need the help of someone with access to MacOS Sierra, which I unfortunately do not have.

Comment by Martin Reinecke [ 20/Apr/18 ]

Still waiting for additional information. Is there a way to set the Task to a "Waiting" status?

 

Generated at Sat Feb 10 16:52:46 JST 2024 using Jira 8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b.