Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install the repository manually #27

Closed
titipata opened this issue Sep 30, 2016 · 6 comments
Closed

Install the repository manually #27

titipata opened this issue Sep 30, 2016 · 6 comments

Comments

@titipata
Copy link

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
Copy link
Member

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
Copy link
Author

titipata commented Sep 30, 2016

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
Copy link
Member

xcthulhu commented Sep 30, 2016

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
Copy link
Author

titipata commented Sep 30, 2016

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
Copy link
Member

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
Copy link
Author

@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 ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants