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

SyntaxError: invalid syntax on install #12

Open
jeremysutherland opened this issue Dec 18, 2020 · 5 comments
Open

SyntaxError: invalid syntax on install #12

jeremysutherland opened this issue Dec 18, 2020 · 5 comments

Comments

@jeremysutherland
Copy link

(base) [jus1990@aci-lgn-003 peer]$ mkdir build
(base) [jus1990@aci-lgn-003 peer]$ cd build
(base) [jus1990@aci-lgn-003 build]$ cmake ./..
-- The C compiler identification is GNU 4.4.7
-- The CXX compiler identification is GNU 4.4.7
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found SWIG: /usr/bin/swig (found version "1.3.40")
**File "", line 1
from distutils import sysconfig; print sysconfig.get_python_lib()
^
SyntaxError: invalid syntax
-- Numpy headers found
CMake Error at python/CMakeLists.txt:49 (if):
if given arguments:

"(" "NOT" "EXISTS" "File \"<string>\", line 1
  from distutils import sysconfig" " print sysconfig.get_python_inc()
                                         ^

SyntaxError: invalid syntax" ")"**

Unknown arguments specified

-- Configuring incomplete, errors occurred!

@ghost
Copy link

ghost commented Nov 12, 2021

Hey,
were you able to solve this issue.
I am also getting same error

@kodelogue
Copy link

No. I don't think so. I think I ended up using something else.

@ghost
Copy link

ghost commented Nov 12, 2021

which other software did you use?
I am using predixcan predictdb model to train my datasets

@kodelogue
Copy link

I don't remember off the top of my head. It's been about a year now since I ran into this issue. I'm not even sure which project I was working on when I came across this error.

@MrPetkus
Copy link

MrPetkus commented Aug 7, 2023

The problem is that Python 2.x syntax is used in a Python 3.x environment.

For example, in:
~/peer/cmake/FindPythonLibsDist.cmake
print sysconfig.get_python_inc()'"
should be:
print(sysconfig.get_python_inc())'"
I think there are 3 files in cmake that need to be modified

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

3 participants