Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Environment dependency issue #38

Open
jiaqiwu1999 opened this issue Oct 7, 2022 · 5 comments
Open

Environment dependency issue #38

jiaqiwu1999 opened this issue Oct 7, 2022 · 5 comments

Comments

@jiaqiwu1999
Copy link

Hi, I'm using mac and I followed the command to create conda environments, but encountered something like "torchvision requires torch 1.2.1 but torch version requires 1.3.0." I then tried to remove the version requirement for torch, but encountered PIL issues such as "cannot import name 'PILLOW_VERSION' from 'PIL'". I don't see a similar issue from anyone else, and I don't know if this is a mac problem or not. Thank you!

@CarlinLiao
Copy link

When I try to replicate the environment provided in their YAML files, I receive several of these same errors on both MacOS (especially Apple Silicon) and Linux environments. It took me a lot of coaxing to create a working environment, and this working one is very fragile; any updating of key components like python or torch breaks it immediately.

Find it below. It's a bit messy since it includes some other development dependencies, but it should work, although lately I've been finding that it's not giving me fully expected behavior.

name: hactnet_hpc
channels:
  - pytorch
  - conda-forge
  - defaults
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - alembic=1.0.9=py37_0
  - appdirs=1.4.4=pyh9f0ad1d_0
  - asn1crypto=1.4.0=pyh9f0ad1d_0
  - astroid=2.11.7=py37h06a4308_0
  - autopep8=1.6.0=pyhd3eb1b0_1
  - backcall=0.2.0=pyhd3eb1b0_0
  - blas=1.0=mkl
  - blosc=1.21.0=h8c45485_0
  - brotli=1.0.9=h9c3ff4c_4
  - brotlipy=0.7.0=py37h5e8e339_1001
  - bzip2=1.0.8=h7b6447c_0
  - c-ares=1.18.1=h7f8727e_0
  - ca-certificates=2022.07.19=h06a4308_0
  - certifi=2022.6.15=py37h06a4308_0
  - cffi=1.14.6=py37h400218f_0
  - chardet=4.0.0=py37h89c1867_2
  - charset-normalizer=2.0.0=pyhd8ed1ab_0
  - click=8.0.3=py37h89c1867_1
  - cloudpickle=2.0.0=pyhd8ed1ab_0
  - colorama=0.4.4=pyh9f0ad1d_0
  - configparser=5.1.0=pyhd8ed1ab_0
  - cryptography=35.0.0=py37h5d9358c_0
  - cudatoolkit=11.3.1=h2bc3f7f_2
  - curl=7.84.0=h5eee18b_0
  - cycler=0.11.0=pyhd8ed1ab_0
  - databricks-cli=0.12.1=pyhd8ed1ab_0
  - dataclasses=0.8=pyhc8e2a94_3
  - dbus=1.13.6=he372182_0
  - debugpy=1.5.1=py37h295c915_0
  - decorator=5.1.1=pyhd3eb1b0_0
  - dill=0.3.4=pyhd3eb1b0_0
  - docker-py=5.0.3=py37h89c1867_0
  - docker-pycreds=0.4.0=py_0
  - entrypoints=0.4=py37h06a4308_0
  - expat=2.4.1=h9c3ff4c_0
  - ffmpeg=4.3=hf484d3e_0
  - flask=2.0.2=pyhd8ed1ab_0
  - fontconfig=2.13.1=hba837de_1005
  - fonttools=4.25.0=pyhd3eb1b0_0
  - freetype=2.11.0=h70c0345_0
  - gettext=0.21.0=hf68c758_0
  - giflib=5.2.1=h7b6447c_0
  - git=2.34.1=pl5262hc120c5b_0
  - gitdb=4.0.9=pyhd8ed1ab_0
  - gitpython=3.1.24=pyhd8ed1ab_0
  - glib=2.69.1=h5202010_0
  - gmp=6.2.1=h2531618_2
  - gnutls=3.6.15=he1e5248_0
  - gst-plugins-base=1.14.0=hbbd80ab_1
  - gstreamer=1.14.0=h28cd5cc_2
  - gunicorn=20.1.0=py37h89c1867_1
  - hdf5=1.12.1=h69dfa17_1
  - icu=58.2=hf484d3e_1000
  - idna=3.1=pyhd3deb0d_0
  - importlib-metadata=4.8.1=py37h89c1867_1
  - intel-openmp=2021.4.0=h06a4308_3561
  - ipykernel=6.9.1=py37h06a4308_0
  - ipython=7.31.1=py37h06a4308_1
  - isort=5.9.3=pyhd3eb1b0_0
  - itsdangerous=2.0.1=pyhd8ed1ab_0
  - jedi=0.18.1=py37h06a4308_1
  - jinja2=3.0.2=pyhd8ed1ab_0
  - jpeg=9d=h7f8727e_0
  - jupyter_client=7.2.2=py37h06a4308_0
  - jupyter_core=4.10.0=py37h06a4308_0
  - kiwisolver=1.3.1=py37h2531618_0
  - krb5=1.19.2=hac12032_0
  - lame=3.100=h7b6447c_0
  - lazy-object-proxy=1.6.0=py37h27cfd23_0
  - lcms2=2.12=h3be6417_0
  - ld_impl_linux-64=2.38=h1181459_1
  - libcurl=7.84.0=h91b91d3_0
  - libedit=3.1.20210910=h7f8727e_0
  - libev=4.33=h7f8727e_1
  - libffi=3.3=he6710b0_2
  - libgcc-ng=11.2.0=h1234567_1
  - libgfortran-ng=7.5.0=ha8ba4b0_17
  - libgfortran4=7.5.0=ha8ba4b0_17
  - libgomp=11.2.0=h1234567_1
  - libiconv=1.15=h63c8f33_5
  - libidn2=2.3.2=h7f8727e_0
  - libnghttp2=1.46.0=hce63b2e_0
  - libpng=1.6.37=hbc83047_0
  - libprotobuf=3.15.8=h780b84a_0
  - libsodium=1.0.18=h7b6447c_0
  - libssh2=1.10.0=h8f2d780_0
  - libstdcxx-ng=11.2.0=h1234567_1
  - libtasn1=4.16.0=h27cfd23_0
  - libtiff=4.2.0=h85742a9_0
  - libunistring=0.9.10=h27cfd23_0
  - libuuid=2.32.1=h7f98852_1000
  - libuv=1.40.0=h7b6447c_0
  - libwebp=1.2.0=h89dd481_0
  - libwebp-base=1.2.0=h27cfd23_0
  - libxcb=1.13=h7f98852_1003
  - libxml2=2.9.12=h03d6c58_0
  - lz4-c=1.9.3=h295c915_1
  - lzo=2.10=h7b6447c_2
  - mako=1.1.5=pyhd8ed1ab_0
  - markupsafe=2.0.1=py37h5e8e339_0
  - matplotlib=3.4.3=py37h89c1867_1
  - matplotlib-base=3.4.3=py37hbbc1b5f_0
  - matplotlib-inline=0.1.2=pyhd3eb1b0_2
  - mccabe=0.7.0=pyhd3eb1b0_0
  - mkl=2021.4.0=h06a4308_640
  - mkl-service=2.4.0=py37h7f8727e_0
  - mkl_fft=1.3.1=py37hd3c417c_0
  - mkl_random=1.2.2=py37h51133e4_0
  - mlflow=1.20.2=py37h02d9ccd_1
  - mock=4.0.3=pyhd3eb1b0_0
  - munkres=1.1.4=pyh9f0ad1d_0
  - mypy=0.910=pyhd3eb1b0_0
  - mypy_extensions=0.4.3=py37h06a4308_1
  - ncurses=6.3=h5eee18b_3
  - nest-asyncio=1.5.5=py37h06a4308_0
  - nettle=3.7.3=hbbd107a_1
  - networkx=2.6.3=pyhd3eb1b0_0
  - numexpr=2.8.3=py37h807cd23_0
  - numpy=1.21.2=py37h20f2e39_0
  - numpy-base=1.21.2=py37h79a1101_0
  - olefile=0.46=py37_0
  - openh264=2.1.0=hd408876_0
  - openssl=1.1.1q=h7f8727e_0
  - packaging=21.0=pyhd8ed1ab_0
  - pandas=1.2.5=py37h219a48f_0
  - parso=0.8.3=pyhd3eb1b0_0
  - pcre=8.45=h9c3ff4c_0
  - pcre2=10.37=he7ceb23_1
  - perl=5.26.2=h14c3975_0
  - pexpect=4.8.0=pyhd3eb1b0_3
  - pickleshare=0.7.5=pyhd3eb1b0_1003
  - pillow=8.4.0=py37h5aabda8_0
  - pip=22.1.2=py37h06a4308_0
  - platformdirs=2.4.0=pyhd3eb1b0_0
  - prometheus_client=0.12.0=pyhd8ed1ab_0
  - prometheus_flask_exporter=0.18.5=pyhd8ed1ab_0
  - prompt-toolkit=3.0.20=pyhd3eb1b0_0
  - protobuf=3.15.8=py37hcd2ae1e_0
  - psutil=5.9.0=py37h5eee18b_0
  - pthread-stubs=0.4=h36c2ea0_1001
  - ptyprocess=0.7.0=pyhd3eb1b0_2
  - pycodestyle=2.8.0=pyhd3eb1b0_0
  - pycparser=2.21=pyhd8ed1ab_0
  - pygments=2.11.2=pyhd3eb1b0_0
  - pylint=2.14.5=py37h06a4308_0
  - pyopenssl=21.0.0=pyhd8ed1ab_0
  - pyparsing=3.0.5=pyhd8ed1ab_0
  - pyqt=5.9.2=py37hcca6a23_4
  - pysocks=1.7.1=py37h89c1867_4
  - pytables=3.7.0=py37h9da3b7f_0
  - python=3.7.13=h12debd9_0
  - python-dateutil=2.8.2=pyhd3eb1b0_0
  - python-editor=1.0.4=py_0
  - python_abi=3.7=2_cp37m
  - pytorch=1.10.0=py3.7_cuda11.3_cudnn8.2.0_0
  - pytorch-mutex=1.0=cuda
  - pytz=2021.3=pyhd8ed1ab_0
  - pyyaml=5.4.1=py37h5e8e339_0
  - pyzmq=23.2.0=py37h6a678d5_0
  - qt=5.9.7=h5867ecd_1
  - querystring_parser=1.2.4=py_0
  - readline=8.1.2=h7f8727e_1
  - requests=2.26.0=pyhd8ed1ab_0
  - scipy=1.7.1=py37h292c36d_2
  - setuptools=58.0.4=py37h06a4308_0
  - sip=4.19.8=py37hf484d3e_0
  - six=1.16.0=pyhd3eb1b0_1
  - smmap=3.0.5=pyh44b312d_0
  - sqlalchemy=1.3.23=py37h5e8e339_0
  - sqlite=3.39.2=h5082296_0
  - sqlparse=0.4.2=pyhd8ed1ab_0
  - tabulate=0.8.9=pyhd8ed1ab_0
  - tenacity=8.0.1=pyhd8ed1ab_0
  - tk=8.6.12=h1ccaba5_0
  - toml=0.10.2=pyhd3eb1b0_0
  - tomli=2.0.1=py37h06a4308_0
  - tomlkit=0.11.1=py37h06a4308_0
  - torchvision=0.11.1=py37_cu113
  - tornado=6.1=py37h27cfd23_0
  - tqdm=4.62.3=pyhd8ed1ab_0
  - traitlets=5.1.1=pyhd3eb1b0_0
  - typed-ast=1.4.3=py37h7f8727e_1
  - typing-extensions=3.10.0.2=hd3eb1b0_0
  - typing_extensions=3.10.0.2=pyh06a4308_0
  - urllib3=1.26.7=pyhd8ed1ab_0
  - wcwidth=0.2.5=pyhd3eb1b0_0
  - websocket-client=0.57.0=py37h89c1867_6
  - werkzeug=2.0.1=pyhd8ed1ab_0
  - wheel=0.37.1=pyhd3eb1b0_0
  - wrapt=1.14.1=py37h5eee18b_0
  - xorg-libxau=1.0.9=h7f98852_0
  - xorg-libxdmcp=1.1.3=h7f98852_0
  - xz=5.2.5=h7f8727e_1
  - yaml=0.2.5=h516909a_0
  - zeromq=4.3.4=h2531618_0
  - zipp=3.6.0=pyhd8ed1ab_0
  - zlib=1.2.12=h7f8727e_2
  - zstd=1.4.9=haebb681_0
  - pip:
    - cached-property==1.5.2
    - dgl==0.4.3.post2
    - h5py==3.5.0
    - histocartography==0.2.0
    - imageio==2.10.3
    - joblib==1.1.0
    - opencv-python==4.5.4.58
    - pywavelets==1.1.1
    - scikit-image==0.18.3
    - scikit-learn==1.0.1
    - seaborn==0.11.2
    - sklearn==0.0
    - threadpoolctl==3.0.0
    - tifffile==2021.11.2

@PushpakPati
Copy link
Collaborator

The requirements and environment information are updated according to the new library versions.
For GPU compatibility please install pytorch, torchvision and DGL GPU compatible libraries (instructions in the README)

@CarlinLiao
Copy link

CarlinLiao commented Nov 10, 2022

Great, thank you. I'll test this out on my machine. In the meantime, will you be pushing an update to the package on PyPI?

I've tried installing it as a local package using pip but it doesn't work because setup.py hasn't been updated.

@jiaqiwu1999
Copy link
Author

The requirements and environment information are updated according to the new library versions. For GPU compatibility please install pytorch, torchvision and DGL GPU compatible libraries (instructions in the README)

Thank you very much for the update, but I still seem to have import issue such as "cannot import name 'watershed' from 'skimage.morphology'" which is due to the older version of skimage. Do you know how to solve this?

@PeterrHH
Copy link

The requirements and environment information are updated according to the new library versions. For GPU compatibility please install pytorch, torchvision and DGL GPU compatible libraries (instructions in the README)

Thank you very much for the update, but I still seem to have import issue such as "cannot import name 'watershed' from 'skimage.morphology'" which is due to the older version of skimage. Do you know how to solve this?

I think you can change skimage.morphology to skimage.segmentation which is done here in the repo, but the update is not being reflected in Pypi for some reason.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants