Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/341.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 编译watchman失败,返回“0”;无效语法";_Python_Syntax Error_Watchman - Fatal编程技术网

Python 编译watchman失败,返回“0”;无效语法";

Python 编译watchman失败,返回“0”;无效语法";,python,syntax-error,watchman,Python,Syntax Error,Watchman,我试图创建一个包含watchman的docker容器,但不幸的是,编译在非常早期的阶段失败,并显示以下消息: Step 8/13 : RUN cd /tmp && git clone https://github.com/facebook/watchman.git watchman --depth 1 -b ${WATCHMAN_TAG} ---> Running in b3b97816dc40 Cloning into 'watchman'... Note: chec

我试图创建一个包含watchman的docker容器,但不幸的是,编译在非常早期的阶段失败,并显示以下消息:

Step 8/13 : RUN cd /tmp  && git clone https://github.com/facebook/watchman.git watchman --depth 1 -b ${WATCHMAN_TAG}
 ---> Running in b3b97816dc40
Cloning into 'watchman'...
Note: checking out '9312386414e1d0309f4ee815b70cef461b846c00'.                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                            
You are in 'detached HEAD' state. You can look around, make experimental                                                                                                                                                                                                                    
changes and commit them, and you can discard any commits you make in this                                                                                                                                                                                                                   
state without impacting any branches by performing another checkout.                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                            
If you want to create a new branch to retain commits you create, you may                                                                                                                                                                                                                    
do so (now or later) by using -b with the checkout command again. Example:                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                                            
  git checkout -b <new-branch-name>                                                                                                                                                                                                                                                         
                                                                                                                                                                                                                                                                                            
Removing intermediate container b3b97816dc40                                                                                                                                                                                                                                                
 ---> fddd6f6c7324
Step 9/13 : RUN cd /tmp/watchman  && ./autogen.sh  && ./configure  && make  && make install  && cd $HOME  && rm -rf /tmp/*
 ---> Running in e37d2af112e7
+ PREFIX=/usr/local
+ python3 build/fbcode_builder/getdeps.py build --src-dir=. watchman --project-install-prefix=watchman:/usr/local                                                                                                                                                                           
  File "build/fbcode_builder/getdeps.py", line 578                                                                                                                                                                                                                                          
    f"Will reconfigure cmake because {dep_file} is newer than {built_marker}"                                                                                                                                                                                                               
                                                                            ^                                                                                                                                                                                                               
SyntaxError: invalid syntax

有人知道我如何解决这个问题吗?

f strings是python 3.6语法,大概watchman使用的python版本比这个版本少。是的,这正是问题所在。我使用的是Python3.5.3,太旧了。
RUN apt-get update && apt-get install -y automake autoconf build-essential libtool libssl-dev pkg-config python3-dev