I couldn't find a similar issue in the forum, maybe due to my lack of understanding, so apologies if it's obvious
Instructions To Reproduce the Issue:
I would like to install detectron2 on a conda environment so I've followed the installation steps on https://detectron2.readthedocs.io/en/latest/tutorials/install.html# :
- In the terminal I've created my environment "detectron2_env" and installed all the required packages after activating the environment with "conda activate detectron2_env". The output of "conda list" is:
# Name Version Build Channel
_libgcc_mutex 0.1 main
_openmp_mutex 4.5 1_gnu
_pytorch_select 0.2 gpu_0
absl-py 0.13.0 pyhd8ed1ab_0 conda-forge
antlr4-python3-runtime 4.8 pypi_0 pypi
appdirs 1.4.4 pypi_0 pypi
binutils_impl_linux-64 2.35.1 h27ae35d_9
binutils_linux-64 2.35.1 h454624a_30
black 21.4b2 pypi_0 pypi
blas 1.0 mkl
bzip2 1.0.8 h7b6447c_0
c-ares 1.17.1 h7f98852_1 conda-forge
ca-certificates 2021.7.5 h06a4308_1
cachetools 4.2.2 pypi_0 pypi
cairo 1.16.0 hf32fb01_1
certifi 2021.5.30 py36h06a4308_0
cffi 1.14.6 py36h400218f_0
charset-normalizer 2.0.4 pypi_0 pypi
click 8.0.1 pypi_0 pypi
cloudpickle 1.6.0 py_0 conda-forge
colorama 0.4.4 pyh9f0ad1d_0 conda-forge
cudatoolkit 10.1.243 h6bb024c_0
cycler 0.10.0 py_2 conda-forge
cython 0.29.24 py36h295c915_0
dataclasses 0.8 pyh4f3eec9_6
decorator 5.0.9 pyhd3eb1b0_0
detectron2 0.5+cu102 pypi_0 pypi
expat 2.4.1 h2531618_2
ffmpeg 4.0 hcdf2ecd_0
fontconfig 2.13.1 h6c09931_0
freeglut 3.0.0 hf484d3e_5
freetype 2.10.4 h5ab3b9f_0
future 0.18.2 py36_1
fvcore 0.1.5.post20210730 pyhd8ed1ab_0 conda-forge
gcc_impl_linux-64 9.3.0 h6df7d76_17
gcc_linux-64 9.3.0 h1ee779e_30
git 2.23.0 pl526hacde149_0
glib 2.69.0 h5202010_0
gmp 6.2.1 h2531618_2
gnutls 3.6.15 he1e5248_0
google-auth 1.34.0 pypi_0 pypi
google-auth-oauthlib 0.4.5 pypi_0 pypi
graphite2 1.3.14 h23475e2_0
grpcio 1.39.0 pypi_0 pypi
gxx_impl_linux-64 9.3.0 hbdd7822_17
gxx_linux-64 9.3.0 h7e70986_30
harfbuzz 1.8.8 hffaf4a1_0
hdf5 1.10.2 hba1933b_1
hydra-core 1.1.0 pypi_0 pypi
icu 58.2 he6710b0_3
idna 3.2 pypi_0 pypi
importlib-metadata 4.6.3 py36h5fab9bb_0 conda-forge
importlib-resources 5.2.2 pypi_0 pypi
intel-openmp 2021.3.0 h06a4308_3350
iopath 0.1.8 pypi_0 pypi
ipykernel 5.3.4 py36h5ca1d4c_0
ipython 5.8.0 py36_1 conda-forge
ipython_genutils 0.2.0 pyhd3eb1b0_1
jasper 2.0.14 h07fcdf6_1
jpeg 9b h024ee3a_2
jupyter_client 6.1.12 pyhd3eb1b0_0
jupyter_core 4.7.1 py36h06a4308_0
kernel-headers_linux-64 2.6.32 he073ed8_14 conda-forge
kiwisolver 1.3.1 py36h605e78d_1 conda-forge
krb5 1.19.2 hac12032_0
lame 3.100 h7b6447c_0
lcms2 2.12 h3be6417_0
ld_impl_linux-64 2.35.1 h7274673_9
libblas 3.9.0 1_h6e990d7_netlib conda-forge
libcblas 3.9.0 3_h893e4fe_netlib conda-forge
libcurl 7.71.1 h303737a_2
libedit 3.1.20210216 h27cfd23_1
libffi 3.3 he6710b0_2
libgcc-devel_linux-64 9.3.0 hb95220a_17
libgcc-ng 9.3.0 h5101ec6_17
libgfortran-ng 7.5.0 ha8ba4b0_17
libgfortran4 7.5.0 ha8ba4b0_17
libglu 9.0.0 hf484d3e_1
libgomp 9.3.0 h5101ec6_17
libiconv 1.15 h63c8f33_5
libidn2 2.3.2 h7f8727e_0
liblapack 3.9.0 3_h893e4fe_netlib conda-forge
libopenblas 0.3.10 h5a2b251_0
libopencv 3.4.2 hb342d67_1
libopus 1.3.1 h7b6447c_0
libpng 1.6.37 hbc83047_0
libprotobuf 3.16.0 h780b84a_0 conda-forge
libsodium 1.0.18 h7b6447c_0
libssh2 1.9.0 h1ba5d50_1
libstdcxx-devel_linux-64 9.3.0 hf0c5c8d_17
libstdcxx-ng 9.3.0 hd4cf53a_17
libtasn1 4.16.0 h27cfd23_0
libtiff 4.2.0 h85742a9_0
libunistring 0.9.10 h27cfd23_0
libuuid 1.0.3 h1bed415_2
libuv 1.40.0 h7b6447c_0
libvpx 1.7.0 h439df22_0
libwebp-base 1.2.0 h27cfd23_0
libxcb 1.14 h7b6447c_0
libxml2 2.9.12 h03d6c58_0
llvm-openmp 12.0.1 h4bd325d_1 conda-forge
lz4-c 1.9.3 h2531618_0
markdown 3.3.4 pyhd8ed1ab_0 conda-forge
matplotlib-base 3.3.4 py36hd391965_0 conda-forge
mkl 2020.2 256
mkl-service 2.3.0 py36he8ac12f_0
mypy-extensions 0.4.3 pypi_0 pypi
ncurses 6.2 he6710b0_1
nettle 3.7.3 hbbd107a_1
ninja 1.10.2 hff7bd54_1
numpy 1.19.5 py36hfc0c790_2 conda-forge
oauthlib 3.1.1 pypi_0 pypi
olefile 0.46 py36_0
omegaconf 2.1.0 pypi_0 pypi
opencv 3.4.2 py36h6fd60c2_1
openh264 2.1.0 hd408876_0
openjpeg 2.3.0 h05c96fa_1
openssl 1.1.1k h27cfd23_0
pathspec 0.9.0 pypi_0 pypi
pcre 8.45 h295c915_0
perl 5.26.2 h14c3975_0
pexpect 4.8.0 pyhd3eb1b0_3
pickleshare 0.7.5 pyhd3eb1b0_1003
pillow 8.3.1 py36h2c7a002_0
pip 21.1.3 py36h06a4308_0
pixman 0.40.0 h7b6447c_0
portalocker 2.3.0 pypi_0 pypi
prompt_toolkit 1.0.15 py_1 conda-forge
protobuf 3.17.3 pypi_0 pypi
ptyprocess 0.7.0 pyhd3eb1b0_2
py-opencv 3.4.2 py36hb342d67_1
pyasn1 0.4.8 pypi_0 pypi
pyasn1-modules 0.2.8 pypi_0 pypi
pycocotools 2.0.2 py36h4d9540e_2 conda-forge
pycparser 2.20 py_2
pydot 1.4.2 pypi_0 pypi
pygments 2.9.0 pyhd3eb1b0_0
pyparsing 2.4.7 pyh9f0ad1d_0 conda-forge
python 3.6.13 h12debd9_1
python-dateutil 2.8.2 pyhd3eb1b0_0
python_abi 3.6 2_cp36m conda-forge
pytorch 1.7.0 py3.6_cuda10.1.243_cudnn7.6.3_0 pytorch
pyyaml 5.4.1 pypi_0 pypi
pyzmq 20.0.0 py36h2531618_1
readline 8.1 h27cfd23_0
regex 2021.7.6 pypi_0 pypi
requests 2.26.0 pypi_0 pypi
requests-oauthlib 1.3.0 pypi_0 pypi
rsa 4.7.2 pypi_0 pypi
setuptools 52.0.0 py36h06a4308_0
simplegeneric 0.8.1 py36_2
six 1.16.0 pyhd3eb1b0_0
sleef 3.5.1 h7f98852_1 conda-forge
sqlite 3.36.0 hc218d9a_0
sysroot_linux-64 2.12 he073ed8_14 conda-forge
tabulate 0.8.9 pyhd8ed1ab_0 conda-forge
tensorboard 2.5.0 pypi_0 pypi
tensorboard-data-server 0.6.1 pypi_0 pypi
tensorboard-plugin-wit 1.8.0 pypi_0 pypi
termcolor 1.1.0 pypi_0 pypi
tk 8.6.10 hbc83047_0
toml 0.10.2 pypi_0 pypi
torchaudio 0.7.0 py36 pytorch
torchvision 0.8.0 py36_cu101 pytorch
tornado 6.1 py36h27cfd23_0
tqdm 4.62.0 pyhd8ed1ab_0 conda-forge
traitlets 4.3.3 py36_0
typed-ast 1.4.3 pypi_0 pypi
typing_extensions 3.10.0.0 pyh06a4308_0
urllib3 1.26.6 pypi_0 pypi
wcwidth 0.2.5 py_0
werkzeug 2.0.1 pyhd8ed1ab_0 conda-forge
wheel 0.36.2 pyhd3eb1b0_0
xz 5.2.5 h7b6447c_0
yacs 0.1.8 pypi_0 pypi
yaml 0.2.5 h516909a_0 conda-forge
zeromq 4.3.4 h2531618_0
zipp 3.5.0 pyhd8ed1ab_0 conda-forge
zlib 1.2.11 h7b6447c_3
zstd 1.4.9 haebb681_0
- Then I've run the following commands:
git clone git@github.com:facebookresearch/detectron2.git
cd detectron2
python -m pip install -e detectron2
- But I've the following error:
ERROR: Command errored out with exit status 1:
command: /appli/anaconda/versions/4.8.3/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'.../detectron2/setup.py'"'"'; __file__='"'"'.../detectron2/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info
cwd: .../detectron2/
Complete output (5 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File ".../detectron2/setup.py", line 10, in <module>
import torch
ModuleNotFoundError: No module named 'torch'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
and it seems that the torch package is not installed even if it's there
More:
If I run on a jupyter notebook (with my environment loaded) :
# check pytorch installation:
import torch, torchvision
print(torch.__version__, torch.cuda.is_available())
print(torchvision.__version__)
I obtain
So that the package seems to be correctly installed
Any help is welcome! thanks in advance and sorry if my question seems trivial:)
I couldn't find a similar issue in the forum, maybe due to my lack of understanding, so apologies if it's obvious
Instructions To Reproduce the Issue:
I would like to install detectron2 on a conda environment so I've followed the installation steps on https://detectron2.readthedocs.io/en/latest/tutorials/install.html# :
and it seems that the torch package is not installed even if it's there
More:
If I run on a jupyter notebook (with my environment loaded) :
I obtain
So that the package seems to be correctly installed
Any help is welcome! thanks in advance and sorry if my question seems trivial:)