質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Anaconda

Anacondaは、Python本体とPythonで利用されるライブラリを一括でインストールできるパッケージです。環境構築が容易になるため、Python開発者間ではよく利用されており、商用目的としても利用できます。

Ubuntu

Ubuntuは、Debian GNU/Linuxを基盤としたフリーのオペレーティングシステムです。

機械学習

機械学習は、データからパターンを自動的に発見し、そこから知能的な判断を下すためのコンピューターアルゴリズムを指します。人工知能における課題のひとつです。

Python

Pythonは、コードの読みやすさが特徴的なプログラミング言語の1つです。 強い型付け、動的型付けに対応しており、後方互換性がないバージョン2系とバージョン3系が使用されています。 商用製品の開発にも無料で使用でき、OSだけでなく仮想環境にも対応。Unicodeによる文字列操作をサポートしているため、日本語処理も標準で可能です。

pip

pipとは、Pythonを用いて書かれているパッケージソフトのインストールや管理を行うためのパッケージマネジメントシステムです。pipを使う主なメリットは、コマンドラインインターフェースにて容易にPythonパッケージソフトをインストール可能だという点です。

Q&A

1回答

2143閲覧

mmdetectionをUbuntu20.04に入れたい

teruteruterurur

総合スコア0

Anaconda

Anacondaは、Python本体とPythonで利用されるライブラリを一括でインストールできるパッケージです。環境構築が容易になるため、Python開発者間ではよく利用されており、商用目的としても利用できます。

Ubuntu

Ubuntuは、Debian GNU/Linuxを基盤としたフリーのオペレーティングシステムです。

機械学習

機械学習は、データからパターンを自動的に発見し、そこから知能的な判断を下すためのコンピューターアルゴリズムを指します。人工知能における課題のひとつです。

Python

Pythonは、コードの読みやすさが特徴的なプログラミング言語の1つです。 強い型付け、動的型付けに対応しており、後方互換性がないバージョン2系とバージョン3系が使用されています。 商用製品の開発にも無料で使用でき、OSだけでなく仮想環境にも対応。Unicodeによる文字列操作をサポートしているため、日本語処理も標準で可能です。

pip

pipとは、Pythonを用いて書かれているパッケージソフトのインストールや管理を行うためのパッケージマネジメントシステムです。pipを使う主なメリットは、コマンドラインインターフェースにて容易にPythonパッケージソフトをインストール可能だという点です。

0グッド

0クリップ

投稿2021/12/16 02:52

編集2021/12/16 02:53

前提・実現したいこと

mmdetectionというものを入れたくて
Windows subsystem for Linuxを使い
Ubuntu20.04仮想環境を動かしています。
開発プラットフォームはanaconda 4.11.0です
https://mmdetection.readthedocs.io/en/v2.2.0/install.html
上記の手順に従い
mmdetectionのなかのpycocotoolsを入れるときに
error: command 'gcc' failed with exit status 1
Running setup.py install for pycocotools ... error
ERROR: Command errored out with exit status 1: /opt/anaconda3/envs/open-mmlab/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ts7k6um1/pycocotools_b3cc846b6af04d1b9f1b5d13145e27b1/setup.py'"'"'; file='"'"'/tmp/pip-install-ts7k6um1/pycocotools_b3cc846b6af04d1b9f1b5d13145e27b1/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-e33970pp/install-record.txt --single-version-externally-managed --compile --install-headers /opt/anaconda3/envs/open-mmlab/include/python3.7m/pycocotools Check the logs for full command output.
と言われてしまいinstallできません。
不慣れなため根本的なところが抜けているかもしれません。
どうぞよろしくお願いいたします。
コード

### 入力 $ git clone https://github.com/open-mmlab/mmdetection.git $ cd mmdetection $pip install -r requirements/build.txt $pip install "git+https://github.com/open-mmlab/cocoapi.git#subdirectory=pycocotools" $pip install -v -e . # or "python setup.py develop" ### 試したこと 調べて同じようなERRORを解決している方法を試しました。 (python3-devを入れるなど) gccコンパイラのバージョンが原因かとも思い 複数入れて切り替えようともしましたがそれもうまくいきません。 $ sudo update-alternatives --config gcc There are 4 choices for the alternative gcc (providing /usr/bin/gcc). Selection Path Priority Status ------------------------------------------------------------ 0 /usr/bin/gcc-11 11 auto mode 1 /usr/bin/gcc-10 10 manual mode 2 /usr/bin/gcc-11 11 manual mode * 3 /usr/bin/gcc-8 8 manual mode 4 /usr/bin/gcc-9 9 manual mode Press <enter> to keep the current choice[*], or type selection number: $ gcc --version gcc (GCC) 11.2.0 Copyright (C) 2021 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ### 補足情報(FW/ツールのバージョンなど) 入ってるライブラリです (open-mmlab) shun@DESKTOP-MCJ078R:~/mmdetection$ pip list Package Version Editable project location ---------------------------- --------- ------------------------- absl-py 1.0.0 addict 2.4.0 albumentations 1.1.0 argcomplete 1.12.3 argon2-cffi 21.3.0 argon2-cffi-bindings 21.2.0 astunparse 1.6.3 attrs 21.2.0 backcall 0.2.0 bleach 4.1.0 cached-property 1.5.2 cachetools 4.2.4 certifi 2021.10.8 cffi 1.15.0 charset-normalizer 2.0.9 chumpy 0.70 click 7.1.2 colorama 0.4.4 coverage 6.2 cycler 0.11.0 Cython 0.29.25 debugpy 1.5.1 decorator 5.1.0 defusedxml 0.7.1 entrypoints 0.3 flake8 4.0.1 flake8-import-order 0.18.1 flatbuffers 2.0 fonttools 4.28.3 freetype-py 2.2.0 gast 0.4.0 google-auth 2.3.3 google-auth-oauthlib 0.4.6 google-pasta 0.2.0 grpcio 1.42.0 h5py 3.6.0 idna 3.3 imageio 2.13.3 imgaug 0.4.0 importlib-metadata 4.8.2 importlib-resources 5.4.0 iniconfig 1.1.1 interrogate 1.5.0 ipykernel 6.6.0 ipython 7.30.1 ipython-genutils 0.2.0 ipywidgets 7.6.5 isort 4.3.21 jedi 0.18.1 Jinja2 3.0.3 joblib 1.1.0 json-tricks 3.15.5 jsonschema 4.2.1 jupyter 1.0.0 jupyter-client 7.1.0 jupyter-console 6.4.0 jupyter-core 4.9.1 jupyterlab-pygments 0.1.2 jupyterlab-widgets 1.0.2 keras 2.7.0 Keras-Preprocessing 1.1.2 kiwisolver 1.3.2 libclang 12.0.0 Markdown 3.3.6 MarkupSafe 2.0.1 matplotlib 3.5.1 matplotlib-inline 0.1.3 mccabe 0.6.1 mistune 0.8.4 mkl-fft 1.3.1 mkl-random 1.2.2 mkl-service 2.4.0 mmcv-full 1.4.1 /home/shun/mmcv mmpose 0.21.0 /home/shun/mmpose model-index 0.1.11 motmetrics 1.2.0 mpmath 1.2.1 munkres 1.1.4 nbclient 0.5.9 nbconvert 6.3.0 nbformat 5.1.3 nest-asyncio 1.5.4 networkx 2.6.3 ninja 1.10.2.3 nose 1.3.7 notebook 6.4.6 numpy 1.20.0 oauthlib 3.1.1 olefile 0.46 onnx 1.10.2 onnxruntime 1.10.0 open3d-python 0.7.0.0 opencv-python 4.5.4.60 opencv-python-headless 4.5.4.60 openmim 0.1.5 opt-einsum 3.3.0 ordered-set 4.0.2 packaging 21.3 pandas 1.3.5 pandocfilters 1.5.0 parso 0.8.3 pexpect 4.8.0 pickleshare 0.7.5 Pillow 8.4.0 pip 21.3.1 pluggy 1.0.0 poseval 0.1.0 prometheus-client 0.12.0 prompt-toolkit 3.0.24 protobuf 3.19.1 ptyprocess 0.7.0 py 1.11.0 py-cpuinfo 8.0.0 pyasn1 0.4.8 pyasn1-modules 0.2.8 pycodestyle 2.8.0 pycparser 2.21 pyflakes 2.4.0 pyglet 1.5.21 Pygments 2.10.0 PyOpenGL 3.1.0 pyparsing 3.0.6 pyrender 0.1.45 pyrsistent 0.18.0 pytest 6.2.5 pytest-benchmark 3.4.1 pytest-runner 5.3.1 python-dateutil 2.8.2 pytz 2021.3 PyWavelets 1.2.0 PyYAML 6.0 pyzmq 22.3.0 qtconsole 5.2.2 QtPy 1.11.3 qudida 0.0.4 requests 2.26.0 requests-oauthlib 1.3.0 rsa 4.8 scikit-image 0.19.0 scikit-learn 1.0.1 scipy 1.7.3 Send2Trash 1.8.0 setuptools 59.6.0 Shapely 1.8.0 six 1.16.0 smplx 0.1.28 sympy 1.9 tabulate 0.8.9 tensorboard 2.7.0 tensorboard-data-server 0.6.1 tensorboard-plugin-wit 1.8.0 tensorflow 2.7.0 tensorflow-estimator 2.7.0 tensorflow-io-gcs-filesystem 0.23.0 termcolor 1.1.0 terminado 0.12.1 terminaltables 3.1.10 testpath 0.5.0 threadpoolctl 3.0.0 tifffile 2021.11.2 toml 0.10.2 torch 1.10.0 torchvision 0.2.1 tornado 6.1 tqdm 4.62.3 traitlets 5.1.1 trimesh 3.9.36 typing-extensions 3.10.0.2 urllib3 1.26.7 wcwidth 0.2.5 webencodings 0.5.1 Werkzeug 2.0.2 wheel 0.37.0 widgetsnbextension 3.5.2 wrapt 1.13.3 xdoctest 0.15.10 xmltodict 0.12.0 xtcocotools 1.10 yapf 0.31.0 zipp 3.6.0

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

解決しましたが原因が不明なのでなにか気付きましたら教えていただけると助かります。

投稿2021/12/17 09:01

teruteruterurur

総合スコア0

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

teruteruterurur

2021/12/17 09:12

どうやら 手順ではAnacondaでpython3.7仮想環境を使いやっていますが仮想環境に入らずにやるとうまくいきました。pythonとライブラリのバージョンがどこかあってないのかもしれません。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだベストアンサーが選ばれていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問