前提
Condaの仮想環境をYAMLファイルを元に作成したいのですが、
後述のエラーが発生し、仮想環境を作成できません。
実現したいこと
YAMLファイルに記載のパッケージをインストールした状態の仮想環境を作成したい。
発生している問題・エラーメッセージ
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: - myenv.yml Current channels: - https://repo.anaconda.com/pkgs/main/osx-64 - https://repo.anaconda.com/pkgs/main/noarch - https://repo.anaconda.com/pkgs/r/osx-64 - https://repo.anaconda.com/pkgs/r/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.
該当のソースコード ※python 3.8.13
python
1 2(djangoenv) usernoMacBook-Pro scraping % conda create -n django_selenium -f myenv.yml
myenv.ymlファイルの中身
python
1name: django_selenium 2channels: 3 - defaults 4dependencies: 5 - bzip2=1.0.8=h1de35cc_0 6 - libcxx=14.0.6=h9765a3e_0 7 - libffi=3.3=hb1e8313_2 8 - ncurses=6.3=hca72f7f_3 9 - openssl=1.1.1q=hca72f7f_0 10 - pip=22.1.2=py310hecd8cb5_0 11 - python=3.10.4=hdfd78df_0 12 - readline=8.1.2=hca72f7f_1 13 - setuptools=63.4.1=py310hecd8cb5_0 14 - sqlite=3.39.2=h707629a_0 15 - tk=8.6.12=h5d9f67b_0 16 - tzdata=2022a=hda174b7_0 17 - wheel=0.37.1=pyhd3eb1b0_0 18 - xz=5.2.5=hca72f7f_1 19 - zlib=1.2.12=h4dc903c_3 20 - argon2-cffi-bindings==21.2.0 21 - argon2-cffi==21.3.0 22 - asgiref==3.5.2 23 - attrs==21.4.0 24 - autopep8==1.6.0 25 - backports.zoneinfo==0.2.1 26 - beautifulsoup4==4.11.1 27 - cffi==1.15.0 28 - colorama==0.4.5 29 - defusedxml==0.7.1 30 - idna==3.3 31 - lxml==4.7.1 32 - oauthlib==3.2.0 33 - openpyxl==3.0.9 34 - outcome==1.1.0 35 - pandas-datareader==0.10.0 36 - Pillow==9.0.1 37 - pycodestyle==2.8.0 38 - pycparser==2.21 39 - PyJWT==2.4.0 40 - pyOpenSSL==22.0.0 41 - python-dateutil==2.8.2 42 - python3-openid==3.2.0 43 - pytz==2021.3 44 - PyYAML==6.0 45 - requests==2.27.1 46 - six==1.16.0 47 - sniffio==1.2.0 48 - sortedcontainers==2.4.0 49 - soupsieve==2.3.1 50 - toml==0.10.2 51 - tomli==2.0.1 52 - trio==0.19.0 53 - typing_extensions==4.3.0 54 - urllib3==1.26.8 55 - xlrd==2.0.1 56 - pip: 57 - cssbeautifier==1.14.6 58 - pandas==1.4.0 59 - charset-normalizer==2.0.11 60 - user-agents==2.2.0 61 - django-allauth==0.51.0 62 - click==8.1.3 63 - numpy==1.22.1 64 - sqlparse==0.4.2 65 - webdriver-manager==3.6.1 66 - h11==0.13.0 67 - zipp==3.8.1 68 - djlint==1.12.3 69 - html-void-elements==0.1.0 70 - platformdirs==2.5.2 71 - django-cors-headers==3.13.0 72 - cryptography==36.0.1 73 - trio-websocket==0.9.2 74 - html-tag-names==0.1.2 75 - pathspec==0.10.1 76 - wikipedia==1.4.0 77 - et-xmlfile==1.1.0 78 - argon2==0.1.10 79 - ua-parser==0.16.1 80 - tqdm==4.64.1 81 - async-generator==1.10 82 - mypy-extensions==0.4.3 83 - regex==2022.8.17 84 - editorconfig==0.12.3 85 - selenium==4.1.0 86 - importlib-metadata==4.12.0 87 - wsproto==1.0.0 88 - django==4.0.5 89 - black==22.8.0 90 - django-boost==2.0 91 - requests-oauthlib==1.3.1 92 - jsbeautifier==1.14.6
試したこと
myenv.ymlファイルが正しいディレクトリにあるかターミナルで ls コマンドを使って確認済みです。
また、このサイトを見て、実行しました。
https://helve-blog.com/posts/python/conda-virtual-environment/
他にも色々とサイトを回りましたが、同じようなことしか書いておらず、解決に至りませんでした。
補足情報
私の理解では、requiremetns.txtはAnacondaの仮想環境には使えず、
yml を使うという認識ですが、正しいでしょうか。
requirements.txtを試してみましたが、うまくいきませんでした。
どうぞよろしくお願いいたします。

回答1件
あなたの回答
tips
プレビュー