You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2020/04/30 08:30:12 UTC

[GitHub] [flink] dianfu commented on a change in pull request #11878: [FLINK-17125][python] Add a Usage Notes Page to Answer Common Questions Encountered by PyFlink Users

dianfu commented on a change in pull request #11878:
URL: https://github.com/apache/flink/pull/11878#discussion_r417841412



##########
File path: docs/dev/table/python/common_questions.md
##########
@@ -0,0 +1,88 @@
+---
+title: "Common Questions"
+nav-parent_id: python_tableapi
+nav-pos: 140
+---
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+This page describes the solutions to some frequently encountered problems for PyFlink users.

Review comment:
       ```suggestion
   This page describes the solutions to some come questions for PyFlink users.
   ```

##########
File path: docs/dev/table/python/common_questions.md
##########
@@ -0,0 +1,88 @@
+---
+title: "Common Questions"
+nav-parent_id: python_tableapi
+nav-pos: 140
+---
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+This page describes the solutions to some frequently encountered problems for PyFlink users.
+
+* This will be replaced by the TOC
+{:toc}
+## Preparing Python Virtual Environment
+You can download a [convenience script](https://github.com/apache/flink/blob/master/flink-python/dev/setup-pyflink-virtual-env.sh) to prepare a Python virtual env zip which can be used on Mac OS and most Linux distributions. 

Review comment:
       ```suggestion
   You can download the [convenience script](https://github.com/apache/flink/blob/master/flink-python/dev/setup-pyflink-virtual-env.sh) to prepare a Python virtual env zip which can be used on Mac OS and most Linux distributions. 
   ```

##########
File path: flink-python/dev/setup-pyflink-virtual-env.sh
##########
@@ -0,0 +1,43 @@
+#!/usr/bin/env bash
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+set -e
+# download miniconda.sh
+if [ `uname -s` == "Darwin" ]; then
+    wget "https://repo.continuum.io/miniconda/Miniconda3-4.7.10-MacOSX-x86_64.sh" -O "miniconda.sh"
+else
+    wget "https://repo.continuum.io/miniconda/Miniconda3-4.7.10-Linux-x86_64.sh" -O "miniconda.sh"
+fi
+
+# add the execution permission
+chmod +x miniconda.sh
+
+# create python virtual environment
+./miniconda.sh -b -p venv
+
+# activate the conda python virtual environment
+source venv/bin/activate
+
+# install PyFlink
+pip install apache-flink

Review comment:
       Should we allow users to specify the version of pyflink?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org