question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fresh installation does not work on cleanly installed Ubuntu1804

See original GitHub issue

Bug Report

Plain installation onto Ubuntu 1804 failed. Can not believe it is failing at such basic level: Instruction: Official Python packages ONNX released packages are published in PyPi.

pip install numpy protobuf==3.16.0 pip install onnx

Following the instruction:

root@nonroot-MS-7B22:~/superbenchmark# pip3 install numpy protobuf==3.16.0
Requirement already satisfied: numpy in /usr/local/lib/python3.6/dist-packages
Collecting protobuf==3.16.0
  Downloading https://files.pythonhosted.org/packages/e0/c3/b1a51b89c36122c58635143058fcf4a980b0c97db7ee856389330d430c02/protobuf-3.16.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl (1.0MB)
    100% |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 1.0MB 1.3MB/s 
Requirement already satisfied: six>=1.9 in /usr/lib/python3/dist-packages (from protobuf==3.16.0)
Installing collected packages: protobuf
  Found existing installation: protobuf 3.0.0
    Not uninstalling protobuf at /usr/lib/python3/dist-packages, outside environment /usr
Successfully installed protobuf-3.16.0
root@nonroot-MS-7B22:~/superbenchmark# pip3 install nnx
Collecting nnx

root@nonroot-MS-7B22:~/superbenchmark# pip3 install onnx
Collecting onnx
  Downloading https://files.pythonhosted.org/packages/cf/98/82671f253342463e63fa972713f2bab1d936dd178455501d36ff288b209f/onnx-1.10.0.tar.gz (10.0MB)
    100% |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 10.0MB 160kB/s 
    Complete output from command python setup.py egg_info:
    fatal: not a git repository (or any of the parent directories): .git
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-zma2mwjq/onnx/setup.py", line 318, in <module>
        raise FileNotFoundError("Unable to find " + requirements_file)
    FileNotFoundError: Unable to find requirements.txt


Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
jcwchencommented, Aug 4, 2021

I spent time building a fresh Ubuntu 18.04 and followed README.md for building ONNX, but no matter how I could not repro your cmake error @gggh000. Your log is incomplete so I cannot tell whether you followed the right steps. As you can see, the error showed that it cannot find protobuf compiler so you need to build protobuf first before building ONNX.

Protbuf installation on Linux is mentioned in the README.md:

git clone https://github.com/protocolbuffers/protobuf.git
cd protobuf
git checkout v3.16.0
git submodule update --init --recursive
mkdir build_source && cd build_source
cmake ../cmake -Dprotobuf_BUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_SYSCONFDIR=/etc -DCMAKE_POSITION_INDEPENDENT_CODE=ON -Dprotobuf_BUILD_TESTS=OFF -DCMAKE_BUILD_TYPE=Release
make -j$(nproc)
make install

I don’t know what the error this line generated: cmake ../cmake -Dprotobuf_BUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_SYSCONFDIR=/etc -DCMAKE_POSITION_INDEPENDENT_CODE=ON -Dprotobuf_BUILD_TESTS=OFF -DCMAKE_BUILD_TYPE=Release. Could you please point out? We are eager to enhance the build document to improve developers’ experience so any valid feedback is appreciated.

After installing protobuf correctly (you can use protoc --version to verify), you should be able to build ONNX from source, or pip install onnx-1.10.0.tar.gz which I gave you, or just pip install onnx because we just released a patch 1.10.1 yesterday to fix the source distribution issue. Besides, If you don’t understand how to build protobuf, there is another option to install/use ONNX by conda-forge.

We are all willing to help if you raise any issue. Every time you bump into an issue, please don’t hesitate to let us know first to save your time. Thanks

1reaction
rajeevsraocommented, Aug 2, 2021

@gggh000 thanks, this is also fixed in v1.10.1: https://github.com/onnx/onnx/releases/tag/1.10.1

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fresh installation does not work on cleanly installed ... - GitHub
Describe the code to reproduce the behavior. import onnx model = onnx.load('model.onnx') ...
Read more >
A fresh install and clean up? - Ask Ubuntu
Basically, my system has gotten sort of "messy" and I'm planning a vigorous clean up and a fresh install. My /home is on...
Read more >
How to Perform a Clean Install or Reinstall of Windows 11
This includes starting a clean install from within a running version of Windows or a hard disk/SSD with no previous Windows installations.
Read more >
Install Docker Engine on Ubuntu
If you want to start with a clean installation, and prefer to clean up any existing data, refer to the uninstall Docker Engine...
Read more >
NVIDIA CUDA Installation Guide for Linux
The installation instructions for the CUDA Toolkit on Linux. ... Otherwise, the CUDA Driver will fail to work with the new kernel. RHEL...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found