TESScience / SPyFFI

Spiffy Python for TESS Full Frame Images
MIT License
6 stars 7 forks source link

Install the repository manually #27

Closed titipata closed 8 years ago

titipata commented 8 years ago

Hello all,

I would like to ask it there is any developers document. I'm finding a way to install SPyFFI manually directly from the repository. I tried cloning the repo and use python setup.py install but it didn't work.

xcthulhu commented 8 years ago

Hey Titipat,

Unless you run with super user privileges, python setup.py install may not work.

You could try:

sudo python setup.py install

Or if you have the super user password

su -c "python setup.py install"

Alternatively, if you have virtualenv installed, you can try installing as an ordinary user

virtualenv venv ; ./venv/bin/python setup.py install

If you are still having problems, perhaps you could post your console output?

Thanks!

P.S. Please give my kind regards to Prof. Mel Ulmer when you get the chance :D

titipata commented 8 years ago

Hello @xcthulhu, thanks a lot! I still get error as following. My Operating system is OSX El Capitan (10.11.6) and I use Python 3 installed with Anaconda. I'm not sure if someone has the same problem as me too.

running install
running bdist_egg
running egg_info
writing top-level names to SPyFFI.egg-info/top_level.txt
writing dependency_links to SPyFFI.egg-info/dependency_links.txt
writing requirements to SPyFFI.egg-info/requires.txt
writing SPyFFI.egg-info/PKG-INFO
reading manifest file 'SPyFFI.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'SPyFFI.egg-info/SOURCES.txt'
installing library code to build/bdist.macosx-10.6-x86_64/egg
running install_lib
running build_py
running build_ext
building 'SPyFFI.cosmical_realistic._cosmical' extension
/usr/bin/clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/titipat/anaconda3/include -arch x86_64 -I/Users/titipat/anaconda3/include/python3.5m -I/Users/titipat/anaconda3/lib/python3.5/site-packages/numpy/core/include -c cosmical_realistic/_cosmical.c -o build/temp.macosx-10.6-x86_64-3.5/cosmical_realistic/_cosmical.o
cosmical_realistic/_cosmical.c:17:19: warning: implicit declaration of function
      'Py_InitModule3' is invalid in C99 [-Wimplicit-function-declaration]
    PyObject *m = Py_InitModule3("_cosmical", module_methods, module_docstring);
                  ^
cosmical_realistic/_cosmical.c:17:15: warning: incompatible integer to pointer
      conversion initializing 'PyObject *' (aka 'struct _object *') with an
      expression of type 'int' [-Wint-conversion]
    PyObject *m = Py_InitModule3("_cosmical", module_methods, module_docstring);
              ^   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cosmical_realistic/_cosmical.c:19:8: error: non-void function 'init_cosmical'
      should return a value [-Wreturn-type]
       return;
       ^
2 warnings and 1 error generated.
error: command '/usr/bin/clang' failed with exit status 1
xcthulhu commented 8 years ago

Hmm... can you type python --version and tell me the result?

This might be a python version issue. In which case, perhaps you could try

python2.7 setup.py install

titipata commented 8 years ago

Ah, here is my Python version is Python 3: Python 3.5.2 :: Anaconda custom (x86_64). I tried on my Python 2 (Python 2.7.12 :: Anaconda 2.3.0 (x86_64)) and it works with python setup.py install! I guess I can close an issue then?

xcthulhu commented 8 years ago

Okay, I should update the documentation to be more explicit about only supporting python 2.7

I will open up another issue related to python 3.0 support

titipata commented 8 years ago

@xcthulhu thanks again! I'm still in the moving phase to Python 3. I believe that most people are still using Python 2.7 so it's not in a rush at all ;)