Exception: java.lang.IllegalStateException Message: Duplicate key E:\Anaconda3\python.exe
I encountered a problem when configuring Python in RapidMiner in Win10.
I have installed Anaconda 3 inE:\anaconda3and wanted to configure Python in RapidMiner. I opened thePreferencesdialog and in thePython Scriptingtab, when I was clicking the droplist ofConda Environment, I encountered the following error. I do not know what I should do next.
I have installed Anaconda 3 inE:\anaconda3and wanted to configure Python in RapidMiner. I opened thePreferencesdialog and in thePython Scriptingtab, when I was clicking the droplist ofConda Environment, I encountered the following error. I do not know what I should do next.
Exception: java.lang.IllegalStateException
Message: Duplicate key E:\Anaconda3\python.exe
Stack trace:
java.util.stream.Collectors.lambda$throwingMerger$0(Collectors.java:133)
java.util.HashMap.merge(HashMap.java:1254)
java.util.stream.Collectors.lambda$toMap$58(Collectors.java:1320)
java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169)
java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
java.util.ArrayList$Itr.forEachRemaining(ArrayList.java:899)
java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
com.rapidminer.extension.pythonscripting.operator.scripting.python.PythonSetupTester.forceRefreshCondaEnvironments(PythonSetupTester.java:913)
com.rapidminer.extension.pythonscripting.operator.scripting.python.PythonSetupTester.listCondaEnvironments(PythonSetupTester.java:837)
com.rapidminer.extension.pythonscripting.operator.scripting.python.PythonSetupTester.listCondaEnvironments(PythonSetupTester.java:819)
com.rapidminer.extension.pythonscripting.parameter.CondaEnvironmentSuggestionProvider.getSuggestions(CondaEnvironmentSuggestionProvider.java:27)
com.rapidminer.extension.pythonscripting.gui.properties.celleditors.value.PythonEnvironmentCellEditor.getSuggestions(PythonEnvironmentCellEditor.java:203)
com.rapidminer.gui.properties.celleditors.value.AbstractSuggestionBoxValueCellEditor$SuggestionComboBoxModel$1.run(AbstractSuggestionBoxValueCellEditor.java:263)
com.rapidminer.gui.tools.ProgressThread$3.run(ProgressThread.java:586)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
java.lang.Thread.run(Thread.java:748)
Message: Duplicate key E:\Anaconda3\python.exe
Stack trace:
java.util.stream.Collectors.lambda$throwingMerger$0(Collectors.java:133)
java.util.HashMap.merge(HashMap.java:1254)
java.util.stream.Collectors.lambda$toMap$58(Collectors.java:1320)
java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169)
java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
java.util.ArrayList$Itr.forEachRemaining(ArrayList.java:899)
java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
com.rapidminer.extension.pythonscripting.operator.scripting.python.PythonSetupTester.forceRefreshCondaEnvironments(PythonSetupTester.java:913)
com.rapidminer.extension.pythonscripting.operator.scripting.python.PythonSetupTester.listCondaEnvironments(PythonSetupTester.java:837)
com.rapidminer.extension.pythonscripting.operator.scripting.python.PythonSetupTester.listCondaEnvironments(PythonSetupTester.java:819)
com.rapidminer.extension.pythonscripting.parameter.CondaEnvironmentSuggestionProvider.getSuggestions(CondaEnvironmentSuggestionProvider.java:27)
com.rapidminer.extension.pythonscripting.gui.properties.celleditors.value.PythonEnvironmentCellEditor.getSuggestions(PythonEnvironmentCellEditor.java:203)
com.rapidminer.gui.properties.celleditors.value.AbstractSuggestionBoxValueCellEditor$SuggestionComboBoxModel$1.run(AbstractSuggestionBoxValueCellEditor.java:263)
com.rapidminer.gui.tools.ProgressThread$3.run(ProgressThread.java:586)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
java.lang.Thread.run(Thread.java:748)
0
Best Answer
-
varunm1 Moderator, MemberPosts:1,207Unicorn@zhaiyhbetter do it and also do a complete uninstall, by this I mean to remove all folders as well after uninstall because anaconda doesn't remove some folders even after uninstall, we need to remove manually. Also, be careful with the paths as well, see if you have old paths in environment variables and try to remove them so that it doesn't conflict once you install the new version.
I saw the following issue with blank environment names in other forums as well and people mostly use the command I provided but if it removes all then better try installing it freshly. Make sure the paths are clear and also once done installing check your environments. Don't forget Rapidminer needs pandas (package) data frame in anaconda.Regards,
Varun
https://www.varunmandalapu.com/
Be Safe. Follow precautions and Maintain Social Distancing
3
Answers
Thanks for sharing the error message. Do you have any screenshot on the configuration of python?
Does it currently show "base" in conda environment? Something similar to the below image. Also, in the search paths are they pointed out to your folder where the python for anaconda is store something similar to right side image.
Varun
https://www.varunmandalapu.com/
Be Safe. Follow precautions and Maintain Social Distancing
I do have a screenshot about the configuration and the error, but it seems I cannot post links as a Newbie.
In addition, I tried the configuration as shown in the screenshot, and then click theTestbutton, a dialog flashes by.
When I execute a script in a process, it shows a similar error:
Message: java.lang.IllegalStateException: Duplicate key E:\Anaconda3\python.exe
Stack trace:
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
java.lang.reflect.Constructor.newInstance(Constructor.java:423)
java.util.concurrent.ForkJoinTask.getThrowableException(ForkJoinTask.java:593)
java.util.concurrent.ForkJoinTask.get(ForkJoinTask.java:1005)
com.rapidminer.studio.concurrency.internal.AbstractConcurrencyContext.collectResults(AbstractConcurrencyContext.java:206)
com.rapidminer.studio.concurrency.internal.StudioConcurrencyContext.collectResults(StudioConcurrencyContext.java:33)
com.rapidminer.studio.concurrency.internal.AbstractConcurrencyContext.call(AbstractConcurrencyContext.java:141)
com.rapidminer.studio.concurrency.internal.StudioConcurrencyContext.call(StudioConcurrencyContext.java:33)
com.rapidminer.Process.executeRootInPool(Process.java:1349)
com.rapidminer.Process.execute(Process.java:1314)
com.rapidminer.Process.run(Process.java:1291)
com.rapidminer.Process.run(Process.java:1177)
com.rapidminer.Process.run(Process.java:1130)
com.rapidminer.Process.run(Process.java:1125)
com.rapidminer.Process.run(Process.java:1115)
com.rapidminer.gui.ProcessThread.run(ProcessThread.java:65)
Cause
Exception: java.lang.IllegalStateException
Message: Duplicate key E:\Anaconda3\python.exe
Stack trace:
java.util.stream.Collectors.lambda$throwingMerger$0(Collectors.java:133)
java.util.HashMap.merge(HashMap.java:1254)
java.util.stream.Collectors.lambda$toMap$58(Collectors.java:1320)
java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169)
java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
java.util.ArrayList$Itr.forEachRemaining(ArrayList.java:899)
java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
com.rapidminer.extension.pythonscripting.operator.scripting.python.PythonSetupTester.forceRefreshCondaEnvironments(PythonSetupTester.java:913)
com.rapidminer.extension.pythonscripting.operator.scripting.python.PythonSetupTester.listCondaEnvironments(PythonSetupTester.java:837)
com.rapidminer.extension.pythonscripting.operator.scripting.python.PythonSetupTester.refreshCondaCache(PythonSetupTester.java:194)
com.rapidminer.extension.pythonscripting.operator.scripting.python.PythonSetupTester.isCondaExecutable(PythonSetupTester.java:948)
com.rapidminer.extension.pythonscripting.operator.scripting.python.PythonProcessBuilder.getPathPrefix(PythonProcessBuilder.java:141)
com.rapidminer.extension.pythonscripting.operator.scripting.python.PythonProcessBuilder.start(PythonProcessBuilder.java:90)
com.rapidminer.extension.pythonscripting.operator.scripting.python.PythonSetupTester.processTestFast(PythonSetupTester.java:1307)
com.rapidminer.extension.pythonscripting.operator.scripting.python.PythonSetupTester.scriptingPathTest(PythonSetupTester.java:441)
com.rapidminer.extension.pythonscripting.operator.scripting.python.PythonSetupTester.isPythonInstalled(PythonSetupTester.java:229)
com.rapidminer.extension.pythonscripting.operator.scripting.python.PythonScriptingOperator.doWork(PythonScriptingOperator.java:354)
com.rapidminer.operator.Operator.execute(Operator.java:1031)
com.rapidminer.operator.execution.SimpleUnitExecutor.execute(SimpleUnitExecutor.java:77)
com.rapidminer.operator.ExecutionUnit$2.run(ExecutionUnit.java:812)
com.rapidminer.operator.ExecutionUnit$2.run(ExecutionUnit.java:807)
java.security.AccessController.doPrivileged(Native Method)
com.rapidminer.operator.ExecutionUnit.execute(ExecutionUnit.java:807)
com.rapidminer.operator.OperatorChain.doWork(OperatorChain.java:423)
com.rapidminer.operator.Operator.execute(Operator.java:1031)
com.rapidminer.Process.executeRoot(Process.java:1372)
com.rapidminer.Process.lambda$executeRootInPool$5(Process.java:1351)
com.rapidminer.studio.concurrency.internal.AbstractConcurrencyContext$AdaptedCallable.exec(AbstractConcurrencyContext.java:328)
java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
Yes, it shows the "base" in conda environment. I have tried the configuration as the screenshot shows. When I click theTestbutton, nothing happens.
When I execute a script in a process, it shows a similar error:
Message: java.lang.IllegalStateException: Duplicate key E:\Anaconda3\python.exe
Stack trace:
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
java.lang.reflect.Constructor.newInstance(Constructor.java:423)
java.util.concurrent.ForkJoinTask.getThrowableException(ForkJoinTask.java:593)
java.util.concurrent.ForkJoinTask.get(ForkJoinTask.java:1005)
com.rapidminer.studio.concurrency.internal.AbstractConcurrencyContext.collectResults(AbstractConcurrencyContext.java:206)
com.rapidminer.studio.concurrency.internal.StudioConcurrencyContext.collectResults(StudioConcurrencyContext.java:33)
com.rapidminer.studio.concurrency.internal.AbstractConcurrencyContext.call(AbstractConcurrencyContext.java:141)
com.rapidminer.studio.concurrency.internal.StudioConcurrencyContext.call(StudioConcurrencyContext.java:33)
com.rapidminer.Process.executeRootInPool(Process.java:1349)
com.rapidminer.Process.execute(Process.java:1314)
com.rapidminer.Process.run(Process.java:1291)
com.rapidminer.Process.run(Process.java:1177)
com.rapidminer.Process.run(Process.java:1130)
com.rapidminer.Process.run(Process.java:1125)
com.rapidminer.Process.run(Process.java:1115)
com.rapidminer.gui.ProcessThread.run(ProcessThread.java:65)
Cause
Exception: java.lang.IllegalStateException
Message: Duplicate key E:\Anaconda3\python.exe
Stack trace:
java.util.stream.Collectors.lambda$throwingMerger$0(Collectors.java:133)
java.util.HashMap.merge(HashMap.java:1254)
java.util.stream.Collectors.lambda$toMap$58(Collectors.java:1320)
java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169)
java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
java.util.ArrayList$Itr.forEachRemaining(ArrayList.java:899)
java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
com.rapidminer.extension.pythonscripting.operator.scripting.python.PythonSetupTester.forceRefreshCondaEnvironments(PythonSetupTester.java:913)
com.rapidminer.extension.pythonscripting.operator.scripting.python.PythonSetupTester.listCondaEnvironments(PythonSetupTester.java:837)
com.rapidminer.extension.pythonscripting.operator.scripting.python.PythonSetupTester.refreshCondaCache(PythonSetupTester.java:194)
com.rapidminer.extension.pythonscripting.operator.scripting.python.PythonSetupTester.getFullPathForCondaEnvironment(PythonSetupTester.java:962)
com.rapidminer.extension.pythonscripting.PluginInitPythonScripting.getDefaultPythonBinary(PluginInitPythonScripting.java:379)
com.rapidminer.extension.pythonscripting.operator.scripting.python.PythonScriptingOperator.getPythonBinary(PythonScriptingOperator.java:540)
com.rapidminer.extension.pythonscripting.operator.scripting.python.PythonScriptingOperator.doWork(PythonScriptingOperator.java:343)
com.rapidminer.operator.Operator.execute(Operator.java:1031)
com.rapidminer.operator.execution.SimpleUnitExecutor.execute(SimpleUnitExecutor.java:77)
com.rapidminer.operator.ExecutionUnit$2.run(ExecutionUnit.java:812)
com.rapidminer.operator.ExecutionUnit$2.run(ExecutionUnit.java:807)
java.security.AccessController.doPrivileged(Native Method)
com.rapidminer.operator.ExecutionUnit.execute(ExecutionUnit.java:807)
com.rapidminer.operator.OperatorChain.doWork(OperatorChain.java:423)
com.rapidminer.operator.Operator.execute(Operator.java:1031)
com.rapidminer.Process.executeRoot(Process.java:1372)
com.rapidminer.Process.lambda$executeRootInPool$5(Process.java:1351)
com.rapidminer.studio.concurrency.internal.AbstractConcurrencyContext$AdaptedCallable.exec(AbstractConcurrencyContext.java:328)
java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
我认为这是一个错误th的早期版本e Python scripting Extension. Could you check please, what version of the extension are you using? If not the latest (9.3.0), please upgrade, and try, if it works.
如果你升级,仍然不工作,你能please type in the Anaconda Prompt and send me the results of the command. (You could also write a private message to me, if you don't want to post the results publicly).
Best regards,
Bence Tamás
Scott
Thank you for help.
Thank you for your reply.
The Python scripting Extension is being up to date:
The output of
The last env was built because I saw some posts saying that it needs to build a special env for RapidMiner.
I see a dummy conda environment without any name showing in E:\Anaconda3 above the base env in your screenshot, looks like this is conflicting. I think there is an issue in anaconda installation because it is not in default C. I think if you remove this dummy environment it will work.
Can you try in anaconda prompt?
Varun
https://www.varunmandalapu.com/
Be Safe. Follow precautions and Maintain Social Distancing
It seems that the commandconda env remove -p E: \Anaconda3removes all the files inE: \Anaconda3:
I want to re-install Anaconda 3; do I need to install it in C:\ ?
I have re-installed Anaconda 3 still in e:\Anaconda3, and it seems all things are working well. I use the command "conda env list" and it shows only one envbase. So as@varunm1said, the issue must be the dummy conda environment. Whatever, it works well now.
We are not sure how Anaconda ends up with this kind of environment setup.
Nevertheless, Python Scripting Extension 9.3.1 is prepared to handle such setup and won't fail.
Thank you for reporting.
Best,
Peter