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

where can i get emd.c #12

Closed
tinman6 opened this issue Aug 11, 2016 · 16 comments
Closed

where can i get emd.c #12

tinman6 opened this issue Aug 11, 2016 · 16 comments

Comments

@tinman6
Copy link

tinman6 commented Aug 11, 2016

When I run pip install pyemd, it's erroring out on x86_64-linux-gnu-gcc: error: pyemd/emd.c: No such file or directory. Is there some external dependency? Thanks.

@tinman6 tinman6 changed the title emd.cpp appears to be missing in pyemd-0.3.0.tar.gz where can i get emd.c Aug 11, 2016
@wmayner
Copy link
Owner

wmayner commented Aug 11, 2016

I can't reproduce this.

When I run pip install pyemd in a fresh Python 3 virtual environment on Ubuntu 14.04.5, it installs successfully. The source distribution on PyPI (pyemd-0.3.0.tar.gz) does contain pyemd/emd.cpp, and installing from source with python setup.py install into a fresh virtual environment works as well.

Could give me more information about your system and Python environment?

@tinman6
Copy link
Author

tinman6 commented Aug 11, 2016

I am running a Python 2.7.6 virtualenv on Mint 17.1 (Ubuntu 14.04.1). Thanks for looking into this.

Here is the output:

running build_ext
building 'pyemd.emd' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/pyemd
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -I/home/user/devel/env/proj/local/lib/python2.7/site-packages/numpy/core/include -c pyemd/emd.c -o build/temp.linux-x86_64-2.7/pyemd/emd.o
x86_64-linux-gnu-gcc: error: pyemd/emd.c: No such file or directory
x86_64-linux-gnu-gcc: fatal error: no input files
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 4`

@wmayner
Copy link
Owner

wmayner commented Aug 11, 2016

I still can't reproduce the error. It installed successfully both with pip and from source in a Python 2.7.6 virtual environment on Ubuntu 14.04.5.

@tinman6
Copy link
Author

tinman6 commented Aug 12, 2016

Thanks for looking into this.

@tinman6 tinman6 closed this as completed Aug 12, 2016
@wmayner
Copy link
Owner

wmayner commented Aug 12, 2016

Did you get it to work? Happy to look into it further if it's still not installing, but I'll need more information.

@samjosephmark
Copy link

@tinman6 did you find a solution for this? I'm seeing the same issue.

@tinman6
Copy link
Author

tinman6 commented Aug 16, 2016

@samjosephmark unfortunately, no.

@samjosephmark
Copy link

After upgrading setuptools to the latest version
pip install setuptools==25.2.0
pyemd did finish building, previously I had v2.2.0 in my virtualenv.

@wmayner
Copy link
Owner

wmayner commented Aug 17, 2016

That explains it. @tinman6, try upgrading pip to the latest version before installing.

@tinman6
Copy link
Author

tinman6 commented Aug 17, 2016

Upgrading setuptools worked. Thanks @samjosephmark!

@rupenp
Copy link

rupenp commented Feb 4, 2017

This is still a problem in Mac OS X

@wmayner
Copy link
Owner

wmayner commented Feb 4, 2017

Can you provide more information about your environment? What is the output of pip freeze and what version of pip are you using?

@fanglinchen
Copy link

@rupenp same here

@wmayner
Copy link
Owner

wmayner commented Mar 7, 2017

@chentc, I can't help either of you without more information about your environment.

@DataTerminatorX
Copy link

Hi @wmayner , I also encountered the same problem.

I run pip install pyemd succesfully on mac osX and ubuntu 14.04. However, I met gcc problem when I use the same command on red hat 4 x86_64

The installation and error information is

Installing collected packages: pyemd
  Running setup.py install for pyemd ... error
    Complete output from command /usr/local/bin/python3.5 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-ejog1pc0/pyemd/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-8qtisoh6-record/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.5
    creating build/lib.linux-x86_64-3.5/pyemd
    copying pyemd/__init__.py -> build/lib.linux-x86_64-3.5/pyemd
    copying pyemd/__about__.py -> build/lib.linux-x86_64-3.5/pyemd
    running build_ext
    building 'pyemd.emd' extension
    creating build/temp.linux-x86_64-3.5
    creating build/temp.linux-x86_64-3.5/pyemd
    gcc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/local/include/python3.5m -I/usr/local/lib/python3.5/site-packages/numpy/core/include -c pyemd/emd.cpp -o build/temp.linux-x86_64-3.5/pyemd/emd.o
    gcc: error trying to exec 'cc1plus': execvp: No such file or directory
    error: command 'gcc' failed with exit status 1

I've tried some methods below but failed, the error kept the same.

  1. yum update and yum install gcc to update yum and gcc
  2. pip install "git+https://github.com/wmayner/pyemd@develop#egg=pyemd" to install development version
  3. update setuptools to the latest version 35.0.2
  4. use pip3 install pyemd in python3 environment

@wmayner
Copy link
Owner

wmayner commented May 8, 2017

Ok, thanks for the info. Unfortunately I don't have access to a RedHat installation so I'm pretty limited in my ability to help.

However, one thing you could try is running pip install cython before trying to install pyemd. The setup file tries two different methods of installing the C++ extensions depending on whether Cython is available or not.

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

6 participants