Icon

Python - Extract the current standard Python YAML files curated by KNIME from the installation folder

<p>Extract the current standard Python YAML / YML files curated by KNIME from the installation folder<br><br>KNIME and Python — Setting up and managing Conda environments<br>https://medium.com/@mlxl/knime-and-python-setting-up-and-managing-conda-environments-2ac217792539<br><br>The YAML / YML files can then be found here. You might use them to curate your own Python environment<br>/data/macos/<br>/data/windows/<br>/data/linux/<br><br>also there is a file /data/kaggle.yml which creates the "kaggle" environment that I widely use to demonstrate KNIME and Python tasks<br><br>You could / and should use that file to keep your environment up to date<br><br>conda env create -f="/Users/m_lauber/Dropbox/knime-workspace/hub/kn_example_python_yaml_files_conda/data/kaggle.yml"<br><br>conda env update -n kaggle --file="/Users/m_lauber/Dropbox/knime-workspace/hub/kn_example_python_yaml_files_conda/data/kaggle.yml"</p><p></p><p>-------</p><p>KNIME Snippets (5) — Python Overview</p><p>https://medium.com/p/aa4f3a55a768</p>

URL: KNIME and Python — Setting up Deep Learning Environments for Keras and TensorFlow https://medium.com/low-code-for-advanced-data-science/knime-and-python-setting-up-deep-learning-environments-for-keras-and-tensorflow-4b66003858f4
URL: KNIME – Python YAML/YML Files - local https://forum.knime.com/t/python-environment-creation-problem/41577/6?u=mlauber71
URL: Meta Collection about KNIME and Python https://kni.me/w/AvjrddXKOIoZYLV3
URL: Hub: Extract the current standard Python YAML / YML files curated by KNIME from the installation folder https://hub.knime.com/mlauber71/spaces/Public/latest/kn_example_python_yaml_files_conda~SGv1Cosah8BXabfa
URL: KNIME and Python — Setting up and managing Conda environments https://medium.com/@mlxl/knime-and-python-setting-up-and-managing-conda-environments-2ac217792539
URL: KNIME Snippets (5) — Python Overview https://medium.com/p/aa4f3a55a768

Extract the current standard Python YAML / YML files curated by KNIME from the installation folder

KNIME and Python — Setting up and managing Conda environments

https://medium.com/p/2ac217792539


The YAML / YML files can then be found here. You might use them to curate your own Python environment
/data/macos/
/data/windows/
/data/linux/

also there is a file /data/kaggle.yml which creates the "kaggle" environment that I widely use to demonstrate KNIME and Python tasks

You could / and should use that file to keep your environment up to date

conda env create -f="/Users/m_lauber/Dropbox/knime-workspace/hub/kn_example_python_yaml_files_conda/data/kaggle.yml"
conda env update -n kaggle --file="/Users/m_lauber/Dropbox/knime-workspace/hub/kn_example_python_yaml_files_conda/data/kaggle.yml"

# provide a software like h2o with a java path using KNIME's own java version
# variable java.home from KNIME

import os;

os.environ["JAVA_HOME"] = "C:\\Users\\x123456789\\software\\knime_4.6.1\\plugins\\org.knime.binary.jre.win32.x86_64_17.0.3.20220621\\jre"

# os.environ["JAVA_HOME"] = "/Applications/KNIME 4.6.0.app/Contents/Eclipse/plugins/org.knime.binary.jre.macosx.x86_64_17.0.3.20220429/jre/Contents/Home"
# /Applications/KNIME 5.2.0.app/Contents/Eclipse/plugins/org.knime.binary.jre.macosx.aarch64_17.0.5.20230320/jre/Contents/Home

print("setenv JAVA_HOME", os.environ["JAVA_HOME"])

KNIME Snippets (5) — Python Overview

https://medium.com/p/aa4f3a55a768

Versions and paths of the generic Python integration
osgi.syspath=> find where theKNIME installtion is locatedon Windows or MacOSX also java.home
Extract System Properties
$$ROWID$$ = "eclipse.home.location" => TRUE
Rule-based Row Filter
Table Row to Variable
String to Path (Variable)
Folder_
Column Renamer
py39_knime
Conda Environment Propagation
using py39_knimeenvironment via Flow Variable"conda.environment"
Python Script
Folder_
Column Renamer
Path to URI
Activate Conda Environmentbased on Operating SystemWindows or macOS
conda_environment_kaggle
exclude thetest files
Reference Row Filter
flow_variables['var_py_version_pandas'] = pd.__version__flow_variables['var_py_version_numpy'] = np.__version__flow_variables['var_py_version'] = sys.version_infoflow_variables['var_sys_path'] = sys.path
Python Script
flow_variables['var_py_version_pandas'] = pd.__version__flow_variables['var_py_version_numpy'] = np.__version__flow_variables['var_py_version'] = sys.version_infoflow_variables['var_sys_path'] = sys.path
Python Script
linux
Row Splitter (Labs)
*macos* => topwndows => bottom
Row Splitter (Labs)
excludedupliactes
Duplicate Row Filter
linux_folder_path
Create Folder
macos_folder_path
Create Folder
windows
Transfer Files (Table)
linux
Transfer Files (Table)
macos
Transfer Files (Table)
extract the yaml file of the currentPython environment
Python Script
locate and create /data/ folder with absolute paths
Collect Local Metadata
windows_folder_path
Create Folder
List Files/Folders
*envconfigs*list folders that wouldcomntain this term
List Files/Folders
STARTloop thru folders to findYML files
Table Row to Variable Loop Start
Path to String
URL to File Path
STOP
Loop End
$Location$ LIKE "*test*" => FALSE=> exclude foldersthat seem to holdtest versions of YML files
Rule-based Row Splitter

Nodes

Extensions

Links