3

If I try to open my Rscript.ipynb file via Windows Explorer I get the following warning and my file does not open.

c:\Users\kirst\anaconda3\lib\site-packages\setuptools\distutils_patch.py:25 UserWarning: Distutils was imported before Setuptools. This usage is discouraged and may exhibit undesirable errors. Please use setuptools 'objects directly or at least import setuptools first.

Warning

If I first open the Jupyter Notebook using a shortcut with the following target

C:\Users\kirst\anaconda3\python.exe C:\Users\kirst\anaconda3\cwp.py C:\Users\kirst\anaconda3\envs\R C:\Users\kirst\anaconda3\envs\R\python.exe C:\Users\kirst\anaconda3\envs\R\Scripts\jupyter-notebook-script.py "%USERPROFILE%/"

and then open the notebook by browsing to it, I don't have problems.

How do I set up to be able to open the file from explorer?

Gino Mempin
  • 25,369
  • 29
  • 96
  • 135
Kirsten
  • 15,730
  • 41
  • 179
  • 318

3 Answers3

8

I found a solution at https://www.gitmemory.com/issue/brian-team/brian2/1213/673490152

You need to upgrade to the latest version:

pip3 install --upgrade pip setuptools

and the warning will disappear.

Gino Mempin
  • 25,369
  • 29
  • 96
  • 135
Grzesik
  • 111
  • 2
  • 3
5

I'm copy-pasting an answer from a github user with the same problem and this solution seemed to work like a charm for me. Here is what you need to type on your command prompt:

pip uninstall pyzmq

(you might need to confirm the choice by entering y) and once that is done type:

pip install pyzmq

it might help. I had a similar problem while opening jupyter notebook. that fixed it.

  • don't have python in my cmd environment. If I want it I have to activate Anaconda command prompt. Maybe that is my problem. – Kirsten Mar 11 '21 at 22:35
0

It can solved by editing conda_api.py in C:\ProgramData\Anaconda3\Lib\site-packages\anaconda_navigator\api.

In load_rc function, change data = yaml.load(f) to data = yaml.safeload(f) (at line 1360)

osm
  • 39
  • 7