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

Your Conda version seems to be too old for the Conda Settings. Use the Interpreter setting instead. #1389

Closed
zxcvb2000 opened this issue Aug 15, 2020 · 25 comments
Milestone

Comments

@zxcvb2000
Copy link

Windows 10
xlwings 0.20.2
Excel 2019
Python 3.8.5

Hi, I've just done a new install of xlwings. I ran the standard "xlwings addin install" and "xlwings quickstart myproject". When I open "myproject" and click "Run Main" it works fine and "Hello xlwings!" appears.

However, when I run "Import Function" I get the Microsoft Excel error: "Your Conda version seems to be too old for the Conda Settings. Use the Interpreter setting instead."

This laptop has never had Conda installed. I've tried restarting and re-installing and modifying Interpreter paths and UDF Modules etc.

Thanks for your help

image

import xlwings as xw

@xw.sub  # only required if you want to import it or run it via UDF Server
def main():
    wb = xw.Book.caller()
    sheet = wb.sheets[0]
    if sheet["A1"].value == "Hello xlwings!":
        sheet["A1"].value = "Bye xlwings!"
    else:
        sheet["A1"].value = "Hello xlwings!"


@xw.func
def hello(name):
    return "hello {0}".format(name)


if __name__ == "__main__":
    xw.Book("myproject.xlsm").set_mock_caller()
    main()
@fzumstein fzumstein added this to the 0.20.3 milestone Aug 15, 2020
@fzumstein
Copy link
Member

sorry about that, that's now fixed in 0.20.3

@zxcvb2000
Copy link
Author

Thanks! Works great now :)

@auggiecat
Copy link

I am on 0.20.4 and just got this error too. Is it possible it came back with the newest version?

@fzumstein
Copy link
Member

Can you paste the content of your your config file under ~/.xlwings/xlwings.conf?

@auggiecat
Copy link

"CONDA ENV","base"
"CONDA BASE","C:\Users\First Lastname\Anaconda3"
"CONDA PATH","C:\Users\First Lastname\Anaconda3"

@fzumstein
Copy link
Member

yes, the space was the issue, I've opened a new issue for this (fixed with next release), see #1396

@fzumstein
Copy link
Member

@auggiecat can you please try again with 0.20.5

@auggiecat
Copy link

Works thanks!

@foldmaster
Copy link

foldmaster commented Feb 10, 2021

I am getting the same error, upon pressing "Run Main", on version 0.21.4. Has this error crept back in?

Windows 10
xlwings 0.21.4
MS Office Plus Professional 2016
Python 3.6.5

contents of xlwings.conf:

"CONDA PATH","C:\ProgramData\Continuum\Anaconda"
"CONDA ENV","base"
"USE UDF SERVER","False"

@fzumstein
Copy link
Member

what is your conda version?

(base) C:\Users\felix>conda --version

@foldmaster
Copy link

4.5.4

@foldmaster
Copy link

foldmaster commented Feb 10, 2021 via email

@fzumstein
Copy link
Member

in that case, the message is accurate and not shown erroneously. Conda versions < 4.6 require the path to be set on as Interpreter. I'd recommend you to upgrade conda, but if that's not an option, replace

"CONDA PATH","C:\ProgramData\Continuum\Anaconda"
"CONDA ENV","base"

with

"INTERPRETER_WIN","C:\ProgramData\Continuum\Anaconda\python.exe"

I guess the auto-configuration could be improved to check the version of Conda (on the other hand, 4.5.4 is almost 3 years old ;)

@foldmaster
Copy link

Couldn't upgrade, changing config worked. Thank you!

@jakedoesmath
Copy link

Getting this error with xlwings 0.20.8 on a fresh conda install version 4.9.2.
Conda path is c:\Users\jalbg\Anaconda3\python.exe

@fzumstein
Copy link
Member

Conda Path should just be c:\Users\jalbg\Anaconda3

@jakedoesmath
Copy link

Upon further investigation this appears to be related to the OneDrive Path (Issue #1253), and the fix of adding the project to the PYTHONPATH seems to have fixed my issue. Thanks!

@fzumstein
Copy link
Member

are you on macOS @slddnd? otherwise you shouldn't need to set the PYTHONPATH even with OneDrive, depends also on the version of xlwings.

@aragaki2003
Copy link

I have also an issue with running the addin in Excel. Either I get "your conda versions seems to be too old..." or "Could not create Python process.
Error message: Access is denied...."

@goroderickgo
Copy link

I'm also still having this issue, conda 4.11.0, xlwings 0.27.6, Windows 10

Using the interpreter path instead of conda path/env works though, at least in my testing so far.

@fzumstein
Copy link
Member

@goroderickgo What's the values you've tried for both CONDA PATH and CONDA ENV?

@HariMagarabooshanam
Copy link

Hi there. Am getting this error again now in V0.30.10 and conda V23.7.3. Could you please help. Thanks

@fzumstein
Copy link
Member

You probably haven't configured the add-in properly. It requires the Conda Path and Conda Env to be set. You can try to run xlwings config create --force from the Anaconda Prompt. Otherwise please open a new issue and paste your configuration of the ribbon add-in.

@HariMagarabooshanam
Copy link

Thanks mate. That worked !!!

@ghost
Copy link

ghost commented Feb 19, 2024

Hello,

Having issues calling python from excel from the quickstart project (with same error as original message here). Python to excel works fine.

Below are my env details

  • OS: Win 10
  • Conda: 4.5.11
  • xlwings : 0.29.1
  • Excel: 2019

I have tried using both global and local configs.

"CONDA PATH","C:\Program Files\Anaconda3"
"CONDA ENV","311"
"INTERPRETER_WIN","C:\Program Files\Anaconda3\envs\311\python.exe"
"SHOW CONSOLE","True"

(311) C:\Projects\code\xlwings\demo>xlwings addin status
xlwings version: 0.29.1
The add-in is installed at C:\Users\tma8181\AppData\Roaming\Microsoft\Excel\XLSTART\xlwings.xlam
Use "xlwings addin remove" to uninstall it.

What am I missing? Are there any debug logs that I can enable to investigate the issue ?

TIA

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

8 participants