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

conda 23.11 breaks Windows shortcuts, e.g. to Spyder #167

Closed
schtandard opened this issue Dec 7, 2023 · 8 comments · Fixed by #168
Closed

conda 23.11 breaks Windows shortcuts, e.g. to Spyder #167

schtandard opened this issue Dec 7, 2023 · 8 comments · Fixed by #168
Labels
os::windows relevant to Windows severity::1 blocker; broken functionality with no workaround source::community catch-all for issues filed by community members type::bug describes erroneous operation, use severity::* to classify the type

Comments

@schtandard
Copy link

schtandard commented Dec 7, 2023

What happened?

After updating to conda 23.11 the shortcut to open Spyder in the Windows start menu (automatically placed there by conda install spyder) does not work anymore. I assume that this applies to similar shortcuts of other packages to, though I tested it only with Spyder.

How to reproduce

  • Download the miniconda installer from here and install it on Windows. It currently installs conda version 23.10.
  • Add the conda-forge channel: conda config --add channels conda-forge.
  • Create an environment with Spyder: conda create -n testenv spyder.
  • This will create a shortcut "Spyder (testenv)" in the Windows start menu.
  • Click that shortcut, it will open Spyder.
  • Close Spyder.
  • Update conda: conda update --all (in base environment). This should update to conda version 23.11.
  • Click the Spyder shortcut again.
  • Nothing happens.

Note that the update does not change the Spyder version or even anything in testenv, so this can't be an issue on their end, I think. Also you can still start Spyder from the command line (conda activate testenv && spyder), so Spyder itself is not broken by the update. I assume that something in the commands called by the shortcut is broken.

Conda Details

conda info
active environment : None
       user config file : C:\Users\username\.condarc
 populated config files : C:\Users\username\.condarc
          conda version : 23.11.0
    conda-build version : not installed
         python version : 3.11.5.final.0
                 solver : libmamba (default)
       virtual packages : __archspec=1=x86_64
                          __conda=23.11.0=0
                          __win=0=0
       base environment : C:\Users\username\miniconda3  (writable)
      conda av data dir : C:\Users\username\miniconda3\etc\conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/conda-forge/win-64
                          https://conda.anaconda.org/conda-forge/noarch
                          https://repo.anaconda.com/pkgs/main/win-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/win-64
                          https://repo.anaconda.com/pkgs/r/noarch
                          https://repo.anaconda.com/pkgs/msys2/win-64
                          https://repo.anaconda.com/pkgs/msys2/noarch
          package cache : C:\Users\username\miniconda3\pkgs
                          C:\Users\username\.conda\pkgs
                          C:\Users\username\AppData\Local\conda\conda\pkgs
       envs directories : C:\Users\username\miniconda3\envs
                          C:\Users\username\.conda\envs
                          C:\Users\username\AppData\Local\conda\conda\envs
               platform : win-64
             user-agent : conda/23.11.0 requests/2.31.0 CPython/3.11.5 Windows/10 Windows/10.0.19045 solver/libmamba conda-libmamba-solver/23.11.1 libmambapy/1.5.4
          administrator : False
             netrc file : None
           offline mode : False
conda config
==> C:\Users\username\.condarc <==
channels:
  - conda-forge
  - defaults
conda list
# packages in environment at C:\Users\username\miniconda3:
#
# Name                    Version                   Build  Channel
archspec                  0.2.2              pyhd8ed1ab_0    conda-forge
boltons                   23.0.0             pyhd8ed1ab_0    conda-forge
brotli-python             1.1.0           py311h12c1d0e_1    conda-forge
bzip2                     1.0.8                hcfcfb64_5    conda-forge
ca-certificates           2023.11.17           h56e8100_0    conda-forge
certifi                   2023.11.17         pyhd8ed1ab_0    conda-forge
cffi                      1.16.0          py311ha68e1ae_0    conda-forge
charset-normalizer        3.3.2              pyhd8ed1ab_0    conda-forge
colorama                  0.4.6              pyhd8ed1ab_0    conda-forge
conda                     23.11.0         py311h1ea47a8_1    conda-forge
conda-content-trust       0.2.0              pyhd8ed1ab_0    conda-forge
conda-libmamba-solver     23.11.1            pyhd8ed1ab_0    conda-forge
conda-package-handling    2.2.0              pyh38be061_0    conda-forge
conda-package-streaming   0.9.0              pyhd8ed1ab_0    conda-forge
console_shortcut_miniconda 0.1.1                haa95532_1
cryptography              41.0.7          py311h7cb4080_1    conda-forge
distro                    1.8.0              pyhd8ed1ab_0    conda-forge
fmt                       10.1.1               h181d51b_1    conda-forge
idna                      3.6                pyhd8ed1ab_0    conda-forge
jsonpatch                 1.33               pyhd8ed1ab_0    conda-forge
jsonpointer               2.4             py311h1ea47a8_3    conda-forge
krb5                      1.21.2               heb0366b_0    conda-forge
libarchive                3.7.2                h6f8411a_0    conda-forge
libcurl                   8.5.0                hd5e4a3a_0    conda-forge
libffi                    3.4.4                hd77b12b_0
libiconv                  1.17                 h8ffe710_0    conda-forge
libmamba                  1.5.4                h3f09ed1_0    conda-forge
libmambapy                1.5.4           py311h0317a69_0    conda-forge
libsolv                   0.7.27               h12be248_0    conda-forge
libsqlite                 3.44.2               hcfcfb64_0    conda-forge
libssh2                   1.11.0               h7dfc565_0    conda-forge
libxml2                   2.11.6               hc3477c8_0    conda-forge
libzlib                   1.2.13               hcfcfb64_5    conda-forge
lz4-c                     1.9.4                hcfcfb64_0    conda-forge
lzo                       2.10              he774522_1000    conda-forge
menuinst                  2.0.0           py311h12c1d0e_1    conda-forge
openssl                   3.2.0                hcfcfb64_1    conda-forge
packaging                 23.2               pyhd8ed1ab_0    conda-forge
pcre2                     10.42                h17e33f8_0    conda-forge
pip                       23.3.1             pyhd8ed1ab_0    conda-forge
platformdirs              4.1.0              pyhd8ed1ab_0    conda-forge
pluggy                    1.3.0              pyhd8ed1ab_0    conda-forge
powershell_shortcut_miniconda 0.0.1                haa95532_1
pybind11-abi              4                    hd8ed1ab_3    conda-forge
pycosat                   0.6.6           py311ha68e1ae_0    conda-forge
pycparser                 2.21               pyhd8ed1ab_0    conda-forge
pyopenssl                 23.3.0             pyhd8ed1ab_0    conda-forge
pysocks                   1.7.1              pyh0701188_6    conda-forge
python                    3.11.5               he1021f5_0
python_abi                3.11                    2_cp311    conda-forge
reproc                    14.2.4.post0         hcfcfb64_1    conda-forge
reproc-cpp                14.2.4.post0         h63175ca_1    conda-forge
requests                  2.31.0             pyhd8ed1ab_0    conda-forge
ruamel.yaml               0.18.5          py311ha68e1ae_0    conda-forge
ruamel.yaml.clib          0.2.7           py311ha68e1ae_2    conda-forge
setuptools                68.2.2             pyhd8ed1ab_0    conda-forge
sqlite                    3.44.2               hcfcfb64_0    conda-forge
tk                        8.6.13               h5226925_1    conda-forge
tqdm                      4.66.1             pyhd8ed1ab_0    conda-forge
truststore                0.8.0              pyhd8ed1ab_0    conda-forge
tzdata                    2023c                h71feb2d_0    conda-forge
ucrt                      10.0.22621.0         h57928b3_0    conda-forge
urllib3                   2.1.0              pyhd8ed1ab_0    conda-forge
vc                        14.3                h64f974e_17    conda-forge
vc14_runtime              14.36.32532         hdcecf7f_17    conda-forge
vs2015_runtime            14.36.32532         h05e6639_17    conda-forge
wheel                     0.42.0             pyhd8ed1ab_0    conda-forge
win_inet_pton             1.1.0              pyhd8ed1ab_6    conda-forge
xz                        5.4.2                h8cc25b3_0
yaml-cpp                  0.8.0                h63175ca_0    conda-forge
zlib                      1.2.13               hcfcfb64_5    conda-forge
zstandard                 0.22.0          py311he5d195f_0    conda-forge
zstd                      1.5.5                h12be248_0    conda-forge
@schtandard schtandard added the type::bug describes erroneous operation, use severity::* to classify the type label Dec 7, 2023
@kenodegard kenodegard transferred this issue from conda/conda Dec 7, 2023
@kenodegard kenodegard added source::community catch-all for issues filed by community members severity::1 blocker; broken functionality with no workaround labels Dec 7, 2023
@kenodegard
Copy link
Contributor

What happens if you reinstall spyder conda install -n testenv --force-reinstall spyder or recreate the env?

@kenodegard kenodegard added the os::windows relevant to Windows label Dec 7, 2023
@schtandard
Copy link
Author

Still doesn't work. I also tried updating conda first and only then creating the environment, which gave the same result.

@jezdez
Copy link
Member

jezdez commented Dec 8, 2023

This is probably related to menuinst 2.x being dependend on in 23.11.0. @jaimergp Please take a look at this.

@pythonic2020
Copy link

pythonic2020 commented Dec 8, 2023

Not sure if this is related, but menuinst 2.0.0 removed the _legacy package which is called by cwp.py from miniconda.

cwp.py:

from menuinst._legacy.knownfolders import FOLDERID, get_folder_path

When menuinst 2.0.0 is installed, change the above to:

from menuinst.knownfolders import FOLDERID, get_folder_path

All shoftcuts that use cwp.py will be broken until this change is made to cwp.py.

@kenodegard kenodegard mentioned this issue Dec 8, 2023
3 tasks
@kenodegard
Copy link
Contributor

@pythonic2020 good catch! I've opened #168 to address this issue

@jaimergp
Copy link
Contributor

2.0.1 will be cut soon, addressing this issue. Thanks for the report, investigation and patience!

@JTignor-Raltron
Copy link
Contributor

Has it been verified that the import error is the only cause of this issue? I was about to start a new issue with the same problem (but with shortcuts to my own packages) reporting that I think the error is related to the switch to argparse when I found this.

I have not been the best about keeping conda up to date so this presented itself to my when I went to set up a new machine with our software thus I don't know exactly when it was introduced. I created shortcuts as I have on other machines, but they didn't work. I then attempted to run the shortcut command manually on the terminal (using python instead of pythonw:python [Anaconda install location]\cwp.py [environment prefix] [environment prefix]pythonw -m [my.module]) and got this error:

usage: cwp.py [-h] [--no-console] prefix [args ...] cwp.py: error: unrecognized arguments: -m [my.module]

I know cwp.py was switched to argparse back in March of 2023 and this issue wasn't reported until December, but I don't know how long those changes would take to propagate to users to be reported and thus if I have the same issue as here or a new one. If this constitutes it's own issue, let me know and I will make one.

@jaimergp
Copy link
Contributor

Yes, might be due to the change to argparse. Please open a new issue so we can investigate. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
os::windows relevant to Windows severity::1 blocker; broken functionality with no workaround source::community catch-all for issues filed by community members type::bug describes erroneous operation, use severity::* to classify the type
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

6 participants