conda-incubator / condacolab

Install Conda and friends on Google Colab, easily
MIT License
341 stars 49 forks source link

Getting error while installing dependency python packages #6

Closed ElsaLuz closed 3 years ago

ElsaLuz commented 3 years ago

@jaimergp Hi! Thank you for your guide. I have successfully installed Conda. But now when I try to run this line of code:

!conda create --name ABC--file requirements.txt

I am getting this output:

Collecting package metadata (current_repodata.json): done
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed

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

  - argon2-cffi==20.1.0=pypi_0
  - cython==0.29.21=pypi_0
  - cudatoolkit==9.2=0
  - smmap==3.0.4=pypi_0
  - bleach==3.2.1=pypi_0
  - wandb==0.10.5=pypi_0
  - jupyter==1.0.0=pypi_0
  - pandocfilters==1.4.3=pypi_0
  - prometheus-client==0.9.0=pypi_0
  - wcwidth==0.2.5=pypi_0
  - send2trash==1.5.0=pypi_0
  - libtiff==4.1.0=h2733197_1
  - jupyter-console==6.2.0=pypi_0
  - cffi==1.14.0=py37h2e261b9_0
  - opencv-python==4.4.0.44=pypi_0
  - numpy==1.19.1=py37hbc911f0_0
  - notebook==6.1.6=pypi_0
  - matplotlib==3.3.2=pypi_0
  - zipp==3.3.0=pypi_0
  - pytorch==1.3.1=cuda92py37hb0ba70e_0
  - xz==5.2.5=h7b6447c_0
  - libstdcxx-ng==9.1.0=hdf63c60_0
  - libffi==3.2.1=hf484d3e_1007
  - pexpect==4.8.0=pypi_0
  - prompt-toolkit==3.0.10=pypi_0
  - setuptools==49.6.0=py37_1
  - lz4-c==1.9.2=he6710b0_1
  - jpeg==9b=h024ee3a_2
  - nbformat==5.0.8=pypi_0
  - pyzmq==20.0.0=pypi_0
  - ca-certificates==2020.7.22=0
  - attrs==20.3.0=pypi_0
  - docker-pycreds==0.4.0=pypi_0
  - llvmlite==0.34.0=pypi_0
  - pathtools==0.1.2=pypi_0
  - webencodings==0.5.1=pypi_0
  - psutil==5.7.2=pypi_0
  - tornado==6.1=pypi_0
  - pip==20.2.2=py37_0
  - configparser==5.0.1=pypi_0
  - networkx==2.5=pypi_0
  - libedit==3.1.20191231=h14c3975_1
  - widgetsnbextension==3.5.1=pypi_0
  - cudnn==7.6.5=cuda9.2_0
  - gitpython==3.1.9=pypi_0
  - click==7.1.2=pypi_0
  - ipython==7.19.0=pypi_0
  - sklearn==0.0=pypi_0
  - nest-asyncio==1.4.3=pypi_0
  - qtpy==1.9.0=pypi_0
  - protobuf==3.13.0=pypi_0
  - scikit-image==0.17.2=pypi_0
  - watchdog==0.10.3=pypi_0
  - threadpoolctl==2.1.0=pypi_0
  - certifi==2020.6.20=py37_0
  - intel-openmp==2020.2=254
  - pandas==1.1.4=pypi_0
  - nvidia-ml-py3==7.352.0=pypi_0
  - pickleshare==0.7.5=pypi_0
  - pytz==2020.4=pypi_0
  - ninja==1.10.1=py37hfd86e86_0
  - cycler==0.10.0=pypi_0
  - joblib==0.16.0=pypi_0
  - zlib==1.2.11=h7b6447c_3
  - tk==8.6.10=hbc83047_0
  - mistune==0.8.4=pypi_0
  - pillow==7.2.0=py37hb39fc2d_0
  - async-generator==1.10=pypi_0
  - markupsafe==1.1.1=pypi_0
  - python-dateutil==2.8.1=pypi_0
  - openssl==1.1.1h=h7b6447c_0
  - packaging==20.8=pypi_0
  - olefile==0.46=py37_0
  - zstd==1.4.5=h9ceee32_0
  - ncurses==6.2=he6710b0_1
  - libpng==1.6.37=hbc83047_0
  - metric-learn==0.6.2=pypi_0
  - jupyter-core==4.7.0=pypi_0
  - _pytorch_select==0.2=gpu_0
  - entrypoints==0.3=pypi_0
  - promise==2.3=pypi_0
  - jupyterlab-widgets==1.0.0=pypi_0
  - nbclient==0.5.1=pypi_0
  - traitlets==5.0.5=pypi_0
  - wheel==0.35.1=py_0
  - scipy==1.5.2=pypi_0
  - kiwisolver==1.2.0=pypi_0
  - chardet==3.0.4=pypi_0
  - jupyterlab-pygments==0.1.2=pypi_0
  - pyparsing==2.4.7=pypi_0
  - pycparser==2.20=py_2
  - jupyter-client==6.1.11=pypi_0
  - tqdm==4.50.0=pypi_0
  - pywavelets==1.1.1=pypi_0
  - mkl_fft==1.2.0=py37h23d657b_0
  - ipykernel==5.4.3=pypi_0
  - gitdb==4.0.5=pypi_0
  - pycocotools==2.0.2=pypi_0
  - h5py==2.10.0=pypi_0
  - tifffile==2020.11.26=pypi_0
  - readline==7.0=h7b6447c_5
  - torchvision==0.4.2=cuda92py37h1667eeb_0
  - jsonschema==3.2.0=pypi_0
  - freetype==2.10.2=h5ab3b9f_0
  - idna==2.10=pypi_0
  - subprocess32==3.5.4=pypi_0
  - defusedxml==0.6.0=pypi_0
  - numba==0.51.2=pypi_0
  - terminado==0.9.2=pypi_0
  - ipywidgets==7.6.3=pypi_0
  - requests==2.24.0=pypi_0
  - six==1.15.0=py_0
  - sqlite==3.33.0=h62c20be_0
  - mkl_random==1.1.1=py37h0573a6f_0
  - qtconsole==5.0.1=pypi_0
  - lcms2==2.11=h396b838_0
  - python==3.7.5=h0371630_0
  - jinja2==2.11.2=pypi_0
  - backcall==0.2.0=pypi_0
  - numpy-base==1.19.1=py37hfa32c7d_0
  - jedi==0.18.0=pypi_0
  - decorator==4.4.2=pypi_0
  - flake8==3.8.4=pypi_0
  - ipython-genutils==0.2.0=pypi_0
  - pyflakes==2.2.0=pypi_0
  - scikit-learn==0.23.2=pypi_0
  - testpath==0.4.4=pypi_0
  - sentry-sdk==0.19.0=pypi_0
  - pyyaml==5.3.1=pypi_0
  - nbconvert==6.0.7=pypi_0
  - pygments==2.7.3=pypi_0
  - mkl-service==2.3.0=py37he904b0f_0
  - pycodestyle==2.6.0=pypi_0
  - mccabe==0.6.1=pypi_0
  - importlib-metadata==2.0.0=pypi_0
  - urllib3==1.25.10=pypi_0
  - shortuuid==1.0.1=pypi_0
  - imageio==2.9.0=pypi_0
  - ptyprocess==0.7.0=pypi_0
  - pyrsistent==0.17.3=pypi_0
  - parso==0.8.1=pypi_0
  - libgcc-ng==9.1.0=hdf63c60_0

Current channels:

  - https://conda.anaconda.org/conda-forge/linux-64
  - https://conda.anaconda.org/conda-forge/noarch

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.

I tried to update Conda as well using this statement:

!conda update --all

But I get this error while rerunning the above line of code, i.e,

!conda create --name ABC--file requirements.txt

Error:

Collecting package metadata (current_repodata.json): failed

InvalidVersionSpec: Invalid version '4.19.112+': empty version component

Could you please help me out that what am I doing wrong here? Regards

jaimergp commented 3 years ago

Can you share the notebook + requirements.txt so I can debug a bit? Thanks for the report!

jacqueline-he commented 3 years ago

^^ I'm getting the same error! It looks like an error with conda itself since I first tried without condacolab. This quick fix seems to work (temporarily) for now, https://stackoverflow.com/questions/66956203/conda-colab-error-collecting-package-metadata-current-repodata-json-failed-in

jaimergp commented 3 years ago

Some comments about Conda & Colab:

I edited your notebook to reflect these limitations. This is the YML file I crafted out of your TXT file. Take into account that you are possibly overwriting some key packages with that YML file. I suggest creating a slimmer env file with only the things you are missing in the condacolab installation, without restricting versions too much (e.g. Colab uses CUDA 11 but you are asking for CUDA 9.2 packages).

Rename to .yml after downloading:

condacolab-issue6.yml.txt

ElsaLuz commented 3 years ago

@jaimergp Thank you so much for all the help. I can't thank you enough. You are a lifesaver! I am now able to train the model. :) Can I please delete the above files that I have uploaded, if it is okay for you?

Regards

ElsaLuz commented 3 years ago

@jacqueline-he I have followed the steps mentioned in the link but I wasn't able to resolve the problem. Jiamergp's solution fixed the problem though.

jaimergp commented 3 years ago

Can I please delete the above files that I have uploaded, if it is okay for you?

All good. Do you need me to delete my copies too? It'd be useful for other users to know how to use environment files within conda colab, though (but this can be done with other examples).

ElsaLuz commented 3 years ago

@jaimergp I just want to delete the ones that I have uploaded. It's okay if you want to keep yours, it will be helpful for other users. :)

jaimergp commented 3 years ago

Perfect! Marking this as solved then. Glad you are enjoying condacolab!