xuebinqin / DIS

This is the repo for our new project Highly Accurate Dichotomous Image Segmentation
Apache License 2.0
2.27k stars 269 forks source link

Failed installation on MacBook with M1 Processor and Ventura 13.4.1 OS #86

Open helmutkaufmann opened 1 year ago

helmutkaufmann commented 1 year ago

I have cloned the repository locally and ran conda env create -f pytorch18.yml on a M1 MacBook with Ventura OS. This fails though with the following Solving environment: failed

ResolvePackageNotFound: 
  - pytorch==1.8.0=py3.7_cuda10.2_cudnn7.6.5_0
  - ffmpeg==4.3=hf484d3e_0
  - gmp==6.2.1=h2531618_2
  - readline==8.1.2=h7f8727e_1
  - torchvision==0.9.0=py37_cu102
  - kiwisolver==1.3.2=py37h295c915_0
  - libstdcxx-ng==9.3.0=hd4cf53a_17
  - tk==8.6.11=h1ccaba5_0
  - libunistring==0.9.10=h27cfd23_0
  - locket==0.2.1=py37h06a4308_2
  - mkl-service==2.4.0=py37h7f8727e_0
  - libtasn1==4.16.0=h27cfd23_0
  - matplotlib-base==3.5.1=py37ha18d171_1
  - pywavelets==1.1.1=py37h7b6447c_2
  - bzip2==1.0.8=h7b6447c_0
  - libiconv==1.15=h63c8f33_5
  - pyyaml==6.0=py37h7f8727e_1
  - libtiff==4.2.0=h85742a9_0
  - zstd==1.4.9=haebb681_0
  - ca-certificates==2022.2.1=h06a4308_0
  - ld_impl_linux-64==2.35.1=h7274673_9
  - libgfortran-ng==7.5.0=ha8ba4b0_17
  - mkl==2021.4.0=h06a4308_640
  - pip==21.2.2=py37h06a4308_0
  - intel-openmp==2021.4.0=h06a4308_3561
  - libpng==1.6.37=hbc83047_0
  - yaml==0.2.5=h7b6447c_0
  - cudatoolkit==10.2.89=hfd86e86_1
  - gnutls==3.6.15=he1e5248_0
  - freetype==2.11.0=h70c0345_0
  - lcms2==2.12=h3be6417_0
  - lame==3.100=h7b6447c_0
  - scikit-image==0.15.0=py37hb3f55d8_2
  - brotli==1.0.9=he6710b0_2
  - numpy-base==1.21.2=py37h79a1101_0
  - jpeg==9b=h024ee3a_2
  - setuptools==58.0.4=py37h06a4308_0
  - python==3.7.11=h12debd9_0
  - _openmp_mutex==4.5=1_gnu
  - libgomp==9.3.0=h5101ec6_17
  - lz4-c==1.9.3=h295c915_1
  - sqlite==3.38.0=hc218d9a_0
  - libwebp-base==1.2.2=h7f8727e_0
  - ninja==1.10.2=py37hd09550d_3
  - libuv==1.40.0=h7b6447c_0
  - mkl_fft==1.3.1=py37hd3c417c_0
  - xz==5.2.5=h7b6447c_0
  - zlib==1.2.11=h7f8727e_4
  - scipy==1.7.3=py37hc147768_0
  - nettle==3.7.3=hbbd107a_1
  - pillow==8.0.0=py37h9a89aac_0
  - libffi==3.3=he6710b0_2
  - cytoolz==0.11.0=py37h7b6447c_0
  - numpy==1.21.2=py37h20f2e39_0
  - libidn2==2.3.2=h7f8727e_0
  - libgcc-ng==9.3.0=h5101ec6_17
  - openh264==2.1.1=h4ff587b_0
  - mkl_random==1.2.2=py37h51133e4_0
  - ncurses==6.3=h7f8727e_2
  - libgfortran4==7.5.0=ha8ba4b0_17
  - openssl==1.1.1n=h7f8727e_0
  - certifi==2021.10.8=py37h06a4308_2

Is this repository at all running with a non-Intel chipset?

MuLoo commented 1 year ago

Same error with Mac M2

chaosaiart commented 1 year ago

same error:

If I remove the hashes after the version, the list becomes smaller... Then, there are only 17 out of 64 that throw an error; presumably, these packages are not available on Windows.

Still Buged: ResolvePackageNotFound:

Boxser567 commented 1 year ago

same error:

conda env create -f pytorch18.yml Collecting package metadata (repodata.json): \ WARNING conda.models.version:get_matcher(556): Using . with relational operator is superfluous and deprecated and will be removed in a future version of conda. Your spec was 1.9.0., but conda is ignoring the . and treating it as 1.9.0 WARNING conda.models.version:get_matcher(556): Using . with relational operator is superfluous and deprecated and will be removed in a future version of conda. Your spec was 1.8.0., but conda is ignoring the . and treating it as 1.8.0 WARNING conda.models.version:get_matcher(556): Using . with relational operator is superfluous and deprecated and will be removed in a future version of conda. Your spec was 1.7.1., but conda is ignoring the . and treating it as 1.7.1 WARNING conda.models.version:get_matcher(556): Using . with relational operator is superfluous and deprecated and will be removed in a future version of conda. Your spec was 1.6.0., but conda is ignoring the . and treating it as 1.6.0 done Solving environment: failed

ResolvePackageNotFound:

chrbruckmann commented 1 year ago

same error:

  • Windows 11
  • Python 3.10.6 (because Stable Diffusion)
  • pip 23.2
  • miniConda ...

If you are not on Linux you should ignore the pytorch18.yml.

When I wanted to run the net on Windows I got a simliar error that a lot of the packages were not available. With WSL I could install everything from the yml and run the code. But when you look into the packages almost all are not needed and are only Linux dependencies. So to run the code with Windows 11, in a new Anaconda environment I only needed to install the following packages manually: scikit-image, tqdm, matplotlib

pytorch and torchvision were already there via: conda install pytorch torchvision torchaudio pytorch-cuda=11.7 -c pytorch -c nvidia but even if something were not there just try to run the "train_valid_inference_main.py" and it will tell you what packages it really needs.

This way you can not only run the code on Windows 11 but also use an up-to-date version like python 3.10.12 in my case. Though I got a few deprecation warnings, they didn’t affect the results but are easily fixable. Just replacing older lines like: bce_loss = nn.BCELoss(size_average=True) with bce_loss = nn.BCELoss(reduce='mean')

LukaGiorgadze commented 10 months ago

I have the same issue. I did the steps you suggested @chrbruckmann , but still experiencing issues.

muhammadhassan999 commented 5 months ago

same issue in my windows: Channels:

PackagesNotFoundError: The following packages are not available from current channels:

Current channels:

To search for alternate channels that may provide the conda package you're looking for, navigate to

https://anaconda.org

and use the search bar at the top of the page.