Coder Social home page Coder Social logo

Comments (24)

wahyubram82 avatar wahyubram82 commented on September 27, 2024 4

please open again, still error event the header / include directory already fixed.
the file is:
Python.h
the folder is correct, mine is in ../usr/include/python3.7m

but still return error in the same result, ask to install python header by sudo apt-get install python-dev

from go-vncdriver.

jeremyschlatter avatar jeremyschlatter commented on September 27, 2024 1

I'm guessing they are different issues. We just print the Python-dev message for any build failure because it's a common problem. But it's misleading in cases like this. We might be better off removing it.

from go-vncdriver.

jeremyschlatter avatar jeremyschlatter commented on September 27, 2024

Sorry, the error message we print is misleading here. The real issue is the first line:

read |0: interrupted system call

A quick search for this error turns up two results from Bash on Windows:

microsoft/WSL#349
microsoft/WSL#1038

Are you using Bash on Windows?

Looking at links from there, it seems like there have been multiple problems with building Go apps on Bash on Windows, and it's not clear whether they are all fixed yet.

The one that caused the "interrupted system call" message seems to have been fixed in Windows 10 Insiders build 14905: https://wpdev.uservoice.com/forums/266908-command-prompt-console-bash-on-ubuntu-on-windo/suggestions/14046789-add-support-for-restartable-system-calls-i-e-sa

And another issue was fixed in a more recent build: microsoft/WSL#638

from go-vncdriver.

Givemeyourgits avatar Givemeyourgits commented on September 27, 2024

I get the issue on Debian 8 and Windows 10 Pro Bash

from go-vncdriver.

jeremyschlatter avatar jeremyschlatter commented on September 27, 2024

Interesting. You get the read |0: interrupted system call message on Debian 8? I'll see if I can reproduce it.

from go-vncdriver.

Givemeyourgits avatar Givemeyourgits commented on September 27, 2024

I get the same error about Python-dev but not sure what the previous errors were. I will check in a few minutes on Debian. They looked like same error.

from go-vncdriver.

Givemeyourgits avatar Givemeyourgits commented on September 27, 2024

Is there way to get more details on error?

from go-vncdriver.

jeremyschlatter avatar jeremyschlatter commented on September 27, 2024

Running ./build.sh in the top-level go-vncdriver directory might give more output.

from go-vncdriver.

sksq96 avatar sksq96 commented on September 27, 2024

I am running ./build.sh in the top-level go-vncdriver, with the following error:

Env info:

export GOPATH=/home/shubham/Downloads/go-vncdriver/.build
export CGO_LDFLAGS=/usr/lib/x86_64-linux-gnu/libjpeg.so -L/home/shubham/.anaconda3/lib -lpython3.5m
export CGO_CFLAGS=-I/home/shubham/.pyenv/versions/anaconda3-4.1.1/lib/python3.5/site-packages/numpy/core/include -I/home/shubham/.anaconda3/include/python3.5m
export GO15VENDOREXPERIMENT=1

Running build with OpenGL rendering.
Building with OpenGL: GOPATH=/home/shubham/Downloads/go-vncdriver/.build go build -buildmode=c-shared -o go_vncdriver.so github.com/openai/go-vncdriver. (Set GO_VNCDRIVER_NOGL to build without OpenGL.)
# github.com/openai/go-vncdriver
.build/src/github.com/openai/go-vncdriver/main.go:5:20: fatal error: Python.h: No such file or directory
 #include <Python.h>
                    ^
compilation terminated.

Note: could not build with OpenGL rendering (cf https://github.com/openai/go-vncdriver). This is expected on most servers. Going to try building without OpenGL.
Building without OpenGL: GOPATH=/home/shubham/Downloads/go-vncdriver/.build go build -tags no_gl -buildmode=c-shared -o go_vncdriver.so github.com/openai/go-vncdriver
# github.com/openai/go-vncdriver
.build/src/github.com/openai/go-vncdriver/main.go:5:20: fatal error: Python.h: No such file or directory
 #include <Python.h>
                    ^
compilation terminated.

Build failed. HINT:

- Ensure you have your Python development headers installed. (On Ubuntu,
  this is just 'sudo apt-get install python-dev'.

PS: I am running this on Ubuntu 16.04

from go-vncdriver.

jeremyschlatter avatar jeremyschlatter commented on September 27, 2024

@sksq9 This time our error message is on target :) You need the Python development headers:

sudo apt-get install python-dev

from go-vncdriver.

sksq96 avatar sksq96 commented on September 27, 2024

I already tried that, but nothing. I am running anaconda3.5 with pyenv as python version manager, I suspect this might be the culprit.

from go-vncdriver.

jeremyschlatter avatar jeremyschlatter commented on September 27, 2024

Hmm. It's checking for headers in /home/shubham/.anaconda3/include/python3.5m. Is there anything actually in that directory?

from go-vncdriver.

sksq96 avatar sksq96 commented on September 27, 2024

No it's not the correct directory for my anaconda installation. This /home/shubham/.anaconda3/include/python3.5m does not exist.

from go-vncdriver.

jeremyschlatter avatar jeremyschlatter commented on September 27, 2024

Interesting. Some sanity checking -- what is the output of these commands?

which python
pyenv which python
python -V
python -c 'import sys; print(sys.executable)'
/usr/bin/env python -V
/usr/bin/env python -c 'import sys; print(sys.executable)'

from go-vncdriver.

sksq96 avatar sksq96 commented on September 27, 2024
➜  ~ which python
/home/shubham/.pyenv/shims/python
➜  ~ pyenv which python
/home/shubham/.pyenv/versions/anaconda3-4.1.1/bin/python
➜  ~ python -V
Python 3.5.2 :: Anaconda custom (64-bit)
➜  ~ python -c 'import sys; print(sys.executable)'
/home/shubham/.pyenv/versions/anaconda3-4.1.1/bin/python
➜  ~ /usr/bin/env python -V
Python 3.5.2 :: Anaconda custom (64-bit)
➜  ~ /usr/bin/env python -c 'import sys; print(sys.executable)'
/home/shubham/.pyenv/versions/anaconda3-4.1.1/bin/python

from go-vncdriver.

jeremyschlatter avatar jeremyschlatter commented on September 27, 2024

That all looks reasonable. I'm guessing the headers are actually under /home/shubham/.pyenv/versions/anaconda3-4.1.1/include/python3.5m. Is that right?

from go-vncdriver.

sksq96 avatar sksq96 commented on September 27, 2024

Yes. I checked, all headers are under the directory you mentioned. It's looking in the wrong place.

from go-vncdriver.

jeremyschlatter avatar jeremyschlatter commented on September 27, 2024

Ok. I wonder why that is. We look up header location from the sysconfig package, which seems to be giving the wrong answer here. To double check, can you run this?

python -c "import sysconfig; print(sysconfig.get_config_var('INCLUDEPY'))"

It should print out the wrong location. If so, we need to figure out why or figure out something better to check.

from go-vncdriver.

sksq96 avatar sksq96 commented on September 27, 2024

Indeed, it's printing out the wrong location.

➜  ~ python -c "import sysconfig; print(sysconfig.get_config_var('INCLUDEPY'))"
/home/shubham/.anaconda3/include/python3.5m

from go-vncdriver.

sksq96 avatar sksq96 commented on September 27, 2024

On a side note, I copied the headers to the directory it is looking into, it worked perfectly fine.

from go-vncdriver.

sksq96 avatar sksq96 commented on September 27, 2024

Maybe this will work better.

➜  ~ python -c "import sysconfig; print(sysconfig.get_path('include'))" 
/home/shubham/.pyenv/versions/anaconda3-4.1.1/include/python3.5m

I am still not sure, why INCLUDEPY points to the old anaconda installation.

from go-vncdriver.

jeremyschlatter avatar jeremyschlatter commented on September 27, 2024

distutils uses get_python_inc. What does that return for you?

python -c "from distutils import sysconfig; print(sysconfig.get_python_inc()); print (sysconfig.get_python_inc(plat_specific=1))"

I think this is what pure C extensions (as opposed to C + Go or whatever else) use, so I'm inclined to use the same thing if it works in your case.

from go-vncdriver.

sksq96 avatar sksq96 commented on September 27, 2024

Yes. They they return the correct path.

➜  ~ python -c "from distutils import sysconfig; print(sysconfig.get_python_inc()); print (sysconfig.get_python_inc(plat_specific=1))"
/home/shubham/.pyenv/versions/anaconda3-4.1.1/include/python3.5m
/home/shubham/.pyenv/versions/anaconda3-4.1.1/include/python3.5m

from go-vncdriver.

jeremyschlatter avatar jeremyschlatter commented on September 27, 2024

Include path fixed in 0.4.19: a768e8b.

from go-vncdriver.

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.