Help for Protocol Buffer Installation with Anaconda3

Can anyone please tell me the process on how to install protocol buffers? I want to run Python scripts, which need protocol buffers installed.

Any help will be appreciated.

Thank You.

The installation instruction for Google Protocol Buffers are mentioned below.

  1. Install Anaconda3 (latest version)
  2. Open Anaconda Navigator
  3. Go to "Environments" section
  4. Click on "Create" option which is present below the screen
  5. Give a name to your environment as "knime". (It is case sensitive, so better prefer lower case)
  6. From the drop down menu, choose Python2 version. Dont check "R" option
  7. Click "Ok". All the required Python2 related modules will be installed.
  8. After the environment is installed, an arrow option adjacent to it need to be clicked, and select "Open in Terminal"
  9. When terminal opens, confirm your Python version by
    python --version
  10. Check for appropriate Protocol Buffer. I chose "Eugene", as it was coded by Google, and supports my Windows 64-bit architecture, and Python version is 2.6+.
    anaconda search -t conda protobuf
    Note: Python3 might be installed in your system, but it doesn't pose a threat, since Python2 has been installed via Anaconda3 virtual environment, in step 7.
  11. As I chose "Eugene/Protocol Buffer", correct code for me will be
    anaconda show eugene/protobuf
  12. A command will be given on how to install the conda package with run.
    conda install --channel "https://conda.anaconda.org/eugene" protobuf
    <p>Note: Remove the double inverted commas. I have given them, since in the Knime Forum Screen, the command is not properly shown.</p>
    </li>
    <li>Now Protocol Buffers have been installed successfully.</li>
    <li>Open My Computer.</li>
    <li>Go to &quot;System Properties-&gt; Advanced System Settings-&gt;Environment Variables&quot;</li>
    <li>In the &quot;System Variables&quot; tab, select &quot;Path&quot; option. Open it.</li>
    <li>Additional 2 paths have to be added. They are
    <pre class="brush:;">
    

    C:\Anaconda3\envs\knime

    <pre class="brush:;">
    

    C:\Anaconda3\envs\knime\Scripts


  13. Since I have installed Anaconda3 in the very first directory of Local Disk C, I gave my paths as above.

  14. If Anaconda3 has been installed in different location, select your location.

  15. Remeber that, only the location changes, but "…\envs\knime" and "…\envs\knime\Scripts" do not change and are must for Protocol Buffer installation. So make sure, above mentioned paths have been added in Environment Variables.

If the installation of Protocol Buffers is for the intention of using Python scripts in Knime, follow the below steps.

  1. Above mentioned are to followed first, without fail. Continue the below commands from 12th point, in same screen, which is the terminal opened in 8th point above.
  2. Install Numpy package by,
    conda install numpy
  3. Install Pandas package by,
    conda install pandas
  4. Open Knime.
  5. Go to "File->Preferences->KNIME->Python"
  6. Go to the directory where Anaconda3 is installed.
  7. Select "envs" folder. And open "knime" folder
  8. You will find "python.exe" file. Copy the location where "python.exe" is present.
  9. In the "Python" tab opened in the 5th point above, paste the copied location. For me, the location given was
    C:\Anaconda3\envs\knime\python.exe
  10. Click on Apply. No error will be shown.
  11. Click "OK".
  12. Python has been successfully integrated with Knime Analytics Platform.

Um, I thnk you found it out by yourself?

Here is the description how to set it up : https://www.knime.org/blog/how-to-setup-the-python-extension

Hi,

Just a small comment, you can also install pip in your environment knime.

Sometimes I feel it is a little chaos in finding the packages with conda, since different users can upload a same package. Pip is somehow easier.

For example:

source activate knime
conda install pip

pip install protobuf

 

Best Regards,

Ying

Yes, I have found it by myself. I have also been through the link you provided earlier. But, it did not work for me. I tried a lot number of times. I have also tried installing Google Protocol Buffers as mentioned in GitHub.

"https://github.com/google/protobuf"

Even that didn't work for me. I have almost spent 2 weeks in trying to install protocol buffers.

hello,

Thank you for your suggestion. I didn't know that way. It did not strike my mind when I was trying to install Protocol Buffers.

Where / How to apply the path given in step 9 ??  in Anaconda3 navigator