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

cannot activate conda environments in vscode terminal #934

Open
2 tasks done
y-tamura opened this issue Apr 21, 2024 · 0 comments
Open
2 tasks done

cannot activate conda environments in vscode terminal #934

y-tamura opened this issue Apr 21, 2024 · 0 comments
Labels
type::bug describes erroneous operation, use severity::* to classify the type

Comments

@y-tamura
Copy link

Checklist

  • I added a descriptive title
  • I searched open reports and couldn't find a duplicate

What happened?

I cannot activate conda environments in vscode terminal, though can activate in mac's terminal and also could in vscode before.
Could you tell me how to fix it ?
The error is below.

% conda activate base
# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<

    Traceback (most recent call last):
      File "/Users/tamurayukito/opt/anaconda3/lib/python3.9/site-packages/conda/exception_handler.py", line 17, in __call__
        return func(*args, **kwargs)
      File "/Users/tamurayukito/opt/anaconda3/lib/python3.9/site-packages/conda/cli/main.py", line 110, in main_sourced
        print(activator.execute(), end="")
      File "/Users/tamurayukito/opt/anaconda3/lib/python3.9/site-packages/conda/activate.py", line 203, in execute
        return getattr(self, self.command)()
      File "/Users/tamurayukito/opt/anaconda3/lib/python3.9/site-packages/conda/activate.py", line 168, in activate
        builder_result = self.build_activate(self.env_name_or_prefix)
      File "/Users/tamurayukito/opt/anaconda3/lib/python3.9/site-packages/conda/activate.py", line 346, in build_activate
        return self._build_activate_stack(env_name_or_prefix, False)
      File "/Users/tamurayukito/opt/anaconda3/lib/python3.9/site-packages/conda/activate.py", line 436, in _build_activate_stack
        deactivate_scripts = self._get_deactivate_scripts(old_conda_prefix)
      File "/Users/tamurayukito/opt/anaconda3/lib/python3.9/site-packages/conda/activate.py", line 768, in _get_deactivate_scripts
        for entry in os.scandir(join(prefix, "etc", "conda", "deactivate.d"))
      File "/Users/tamurayukito/opt/anaconda3/lib/python3.9/posixpath.py", line 76, in join
        a = os.fspath(a)
    TypeError: expected str, bytes or os.PathLike object, not NoneType
$ /Users/tamurayukito/opt/anaconda3/bin/conda shell.posix activate base

Following this error report, conda information is output.
After the conda information , this message is finally output.

An unexpected error has occurred. Conda has prepared the above report.
If you suspect this error is being caused by a malfunctioning plugin,
consider using the --no-plugins option to turn off plugins.

Example: conda --no-plugins install <package>

Alternatively, you can set the CONDA_NO_PLUGINS environment variable on
the command line to run the command without plugins enabled.

Example: CONDA_NO_PLUGINS=true conda install <package>

Conda Info

active environment : None
            shell level : 4
       user config file : /Users/tamurayukito/.condarc
 populated config files : /Users/tamurayukito/.condarc
          conda version : 24.1.2
    conda-build version : 24.1.2
         python version : 3.9.18.final.0
                 solver : libmamba (default)
       virtual packages : __archspec=1=m1
                          __conda=24.1.2=0
                          __osx=10.16=0
                          __unix=0=0
       base environment : /Users/tamurayukito/opt/anaconda3  (writable)
      conda av data dir : /Users/tamurayukito/opt/anaconda3/etc/conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/conda-forge/osx-64
                          https://conda.anaconda.org/conda-forge/noarch
                          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
          package cache : /Users/tamurayukito/opt/anaconda3/pkgs
                          /Users/tamurayukito/.conda/pkgs
       envs directories : /Users/tamurayukito/opt/anaconda3/envs
                          /Users/tamurayukito/.conda/envs
               platform : osx-64
             user-agent : conda/24.1.2 requests/2.31.0 CPython/3.9.18 Darwin/23.2.0 OSX/10.16 solver/libmamba conda-libmamba-solver/24.1.0 libmambapy/1.5.6 aau/0.4.3 c/DYxaDtdSNjX-ZyrmbVnMDw s/_TQNSiWjk3uWohHgL6J9hg e/rG0lGFfWEQtw2qIaWAZ5uA
                UID:GID : 501:20
             netrc file : None
           offline mode : False

Conda Config

==> /Users/tamurayukito/.condarc <==
auto_activate_base: True
channels:
  - conda-forge
  - defaults
report_errors: False

Conda list

No response

Additional Context

No response

@y-tamura y-tamura added the type::bug describes erroneous operation, use severity::* to classify the type label Apr 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type::bug describes erroneous operation, use severity::* to classify the type
Projects
Status: 🆕 New
Development

No branches or pull requests

1 participant