Giter Club home page Giter Club logo

Comments (15)

bd-j avatar bd-j commented on June 29, 2024 2

Hi @Nolaa. The package version installed by pip is unfortunately quite out of date and does not work with the most recent versions of FSPS, sorry about that. Please follow the "Installing development version" instructions at http://dan.iel.fm/python-fsps/current/installation.

Also, make sure you compile FSPS (following the instructions in the FSPS manual) before installing python-fsps. If you are still having problems with the SPS_HOME variable, try typing echo $SPS_HOME at the command line to make sure the variable is properly set.

from python-fsps.

bd-j avatar bd-j commented on June 29, 2024 1

@Nolaa, it looks like there is something wrong with your FSPS installation, or it is a very old version.

If you want to do a clean install of FSPS, you can do the following

cd ~
git clone https://github.com/cconroy20/fsps.git
export SPS_HOME="$HOME/fsps"
cd fsps/src
make clean
make all
./simple.exe

where the last line is to check that FSPS is properly installed - it should not result in any errors. You should also add the export SPS_HOME line to your bash_profile, as you've done before.

Then you should be able to do

cd ~
git clone https://github.com/dfm/python-fsps.git
cd python-fsps
python setup.py install

without any errors.

Hope this helps.

from python-fsps.

bd-j avatar bd-j commented on June 29, 2024

Oh no! What is your FSPS commit hash? There was a change to FSPS over the summer, where sf_theta was renamed sf_slope. The most recent FSPS/master is 6febb61. Having the most recent fsps should fix the build for numpy 1.8.2.

I don't know what's wrong with the numpy 1.10 build.

from python-fsps.

bd-j avatar bd-j commented on June 29, 2024

It looks like the numpy 1.10 build is having issues with wrapping the FSPS params structure. This kind of error pops up on the numpy issues list, where it is suggested that Fortran structures aren't supported at all in f2py! e.g. numpy/numpy#4645 any thoughts @dfm?

Also, I've been able to build python-FSPS with numpy 1.9.2, I think from homebrew

from python-fsps.

nell-byler avatar nell-byler commented on June 29, 2024

YES! working now -- I had tried the most recent git FSPS with numpy 1.10, and 1.8 and the older FSPS with numpy 1.10 and 1.8, but only tried the older version with 1.9.2 -- I still get f2py errors but python-fsps installs and runs which is all I care about right now ^__^ yay!

from python-fsps.

Nolaa avatar Nolaa commented on June 29, 2024

I have Numpy and SPS installed and have added the "SPS_HOME" as an environment variable to .bash_profile like this:

export SPS_HOME="/Users/najmeh/Research/Autumn2015/FSPSmodel-Charley_Coonroy/fsps-master"

Then I edited the makefile in the src directory.
But, when I try to install fsps using this command:

pip install fsps

I keep getting this error:

Collecting fsps
  Using cached fsps-0.1.1.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 20, in <module>
      File "/private/tmp/pip-build-I1078Y/fsps/setup.py", line 75, in <module>
        from fsps import __version__
      File "fsps/__init__.py", line 30, in <module>
        raise ImportError("You need to have the SPS_HOME environment variable")
    ImportError: You need to have the SPS_HOME environment variable

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/tmp/pip-build-I1078Y/fsps

I have no idea how to fix it. Any help on that will be appreciated.

from python-fsps.

Nolaa avatar Nolaa commented on June 29, 2024

Thanks for your comment @bd-j. About SPS_HOME variable, actually I used echo $SPS_HOME every time before doing any thing else.
After compiling FSPS by typing make in the src directory,
this time I get another error about fsps

bash-3.2$ echo $SPS_HOME
/Users/najmeh/Research/Autumn2015/FSPSmodel-Charley_Coonroy/fsps-master
bash-3.2$ git clone https://github.com/dfm/python-fsps.git
Cloning into 'python-fsps'...
remote: Counting objects: 850, done.
remote: Total 850 (delta 0), reused 0 (delta 0), pack-reused 850
Receiving objects: 100% (850/850), 365.82 KiB | 0 bytes/s, done.
Resolving deltas: 100% (451/451), done.
Checking connectivity... done.
bash-3.2$ cd python-fsps
bash-3.2$ python setup.py install
Traceback (most recent call last):
  File "setup.py", line 87, in <module>
    from fsps import __version__
  File "/Users/najmeh/python-fsps/fsps/__init__.py", line 41, in <module>
    raise ImportError("Your FSPS version is not under git version "
ImportError: Your FSPS version is not under git version control. FSPS is now available on github at https://github.com/cconroy20/fsps
bash-3.2$ 

from python-fsps.

Nolaa avatar Nolaa commented on June 29, 2024

Thank you very much @bd-j . It did work, the only thing is every time i open a new terminal, I need to type export SPS_HOME="$HOME/fsps" before running python.

from python-fsps.

bd-j avatar bd-j commented on June 29, 2024

glad that worked, you might have to add the export SPS_HOME="$HOME/fsps" to .bashrc instead of .bash_profile to have it set all the time.

from python-fsps.

Nolaa avatar Nolaa commented on June 29, 2024

Actually, I did this before. What I just figured out is that I needed to change my default login shell to bash instead of typing bash ( to change the shell ) and then export SPS_HOME="$HOME/fsps" in .bashrc every time I open a new terminal. Now it is running!

from python-fsps.

dr-guangtou avatar dr-guangtou commented on June 29, 2024

Hi, Any updates on the numpy 1.10.1 build?

I blindly updated numpy to 1.10.1 too, and python-fsps failed the installation....Do I need to go back to Numpy 1.9 for now?

from python-fsps.

bd-j avatar bd-j commented on June 29, 2024

I haven't had time to build the numpy development version from source to make the check and write up an issue for numpy if it doesn't work. For now yes, v1.9.3 should work if you can get back to it.

from python-fsps.

bd-j avatar bd-j commented on June 29, 2024

see #49, this appears to be solved in numpy v1.11

from python-fsps.

bd-j avatar bd-j commented on June 29, 2024

It looks like numpy have backported the f2py fixes from 1.11 to at least 1.10.4, such that python-fsps succesfully compiles using the latest macports numpy version (which is 1.10.4). @nell-byler hope this helps.

from python-fsps.

bd-j avatar bd-j commented on June 29, 2024

Closing as the problems with numpy are gone in recent numpy versions.

from python-fsps.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.