"Anaconda can not spawn a new process..." I have sublime text error - tensorflow

OS: window 10
Tensorflow version: 2.0.0
python: 3.7
After I installed tensorflow = 2.0.0, the error has occurred. When I open sublime text3, the error message pops up. It says
Anaconda.anaconda_lib.workers.local_process.LocalProcess object at Ox000001DE094E9DD8> process can not start a new anaconda JsonServer in the operating system because: Anaconda can not spawn a new process with your current configured python interpreter (python) Make sure your interpreter is a valid binary and is in your PATH or use an absolute path to it, for example: C:\Python27\python.exe
Actually, It doesn't shoot any trouble, when I run some python coding with tensorflow, but it's annoying..,
Every time I open sublime text, the error message comes out. When I do on pycharm, there is no error like this, and it works perfectly in terms of running tensorflow and anaconda.
I tried delete and install sublime text, but nothing has changed. Please help me.

Change Anaconda.sublime-settings User to have the following line (along with any other settings your might have)
{
"python_interpreter": "python3"
}
I had same issue, hope this helps.

Related

plotnine is broken with matplotlib==3.6

I am getting the following error with plotnine==0.9 and matplotlib==3.6.
File "D:\Python\Python310\lib\site-packages\plotnine\stats\stat_density_2d.py", line 3, in <module>
import matplotlib._contour as _contour
ModuleNotFoundError: No module named 'matplotlib._contour'
If I downgrade matplotlib==3.5, the problem goes away.
It's discussed here and it's already fixed here Note that it's already merged to main.
It was due to a internal matplotlib call that is no longer supported and has been replaced.
So I guess you could choose between:
downgrade to mlp 3.5.3
install plotnine#main
till the next plotnine release.
Carlos's answer is correct. However if anybody else, like me, is uncertain of how to install plotnine#main, you can implement the fix rather easily:
Find the site_packages folder you python script uses. It usually is a subdirectory of the python version you are using, which can located reliably by trying to reinstall matplotlib or any other package you know you have access to, and checking the logs in the console. ex using python -m pip install matplotlib.
Go down into the site_packages/plotnine/stats directory and open up the stats_density_2d.py file in your editor of choice.
Apply & save the modifications made in the fix. Alternatively, overwrite the file with the one from the github.
ModuleNotFoundError: No module named 'matplotlib._contour'
Issues with matplotlib 3.6.1 and
plotnine 0.9.0
K.I.S.S.
in terminal:
pip show matplotlib #enables you to check version
pip install matplotlib==3.5 #revert and problem is resolved for now.
no more:
ModuleNotFoundError: No module named 'matplotlib._contour'
resolves issue for now that will stop progress...

Error: Importing notebooks requires Jupyter nbconvert to be installed. Julia

I am trying to export a Julia Jupyter Notebook to pdf
I installed last version of Julia and VS Code (and the Julia and jupyter extension on VS Code)
I can do fine in jupyter notebooks, the code runs and it's saved on .ipynb format.
So this is what i've done:
In the cmd I just put
py -m pip install jupyter
py -m pip install nbconvert
But whenever I try to export the notebook from VS Code I get this error:
Error 2021-10-19 19:25:11: Export failed [Error: Importing notebooks requires Jupyter nbconvert to be installed.
at u.getExportInterpreter (c:\Users\jparedesm\.vscode\extensions\ms-toolsai.jupyter-2021.9.1101343141\out\client\extension.js:37:319922)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async b.export (c:\Users\jparedesm\.vscode\extensions\ms-toolsai.jupyter-2021.9.1101343141\out\client\extension.js:52:919260)
at async g.export (c:\Users\jparedesm\.vscode\extensions\ms-toolsai.jupyter-2021.9.1101343141\out\client\extension.js:37:290037)
at async l._executeContributedCommand (c:\Users\jparedesm\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:94:111644)]
Error 2021-10-19 19:25:11: If you have not installed xelatex (TeX) you will need to do so before you can export to PDF, for further instructions go to https://nbconvert.readthedocs.io/en/latest/install.html#installing-tex.
To avoid installing xelatex (TeX) you might want to try exporting to HTML and using your browsers "Print to PDF" feature.
I do have MikTex installed.
So I don't know what is going on.
Please, let me know how to export a jupyter notebook.
This is what the notebook looks like:
I have a similar problem than yours. The only difference, as I can guess, is that I'm using Mac and have TeXShop instead of MikTex. I have compiled .tex files using xelatex, so I think we both need to tell Visual Studio Code where is the xelatex file. I did a bit of research on the Internet and find suggestions to install the LaTex Workshop extension on VSC. It didn't solve the problem for me, but it'd work for you. I hope so. Let me know in that case.
Best,

Cannot find module PIL in Python

I am using:
Thonny Version 3.2.1
Python Version 3.7.0
PIP Version 19.2.3
Pillow Version 6.1.0
I am trying to import an image into my program and show it on the screen with the below code:
I get the error:
ModuleNotFoundError: No module named 'PIL'
backend.py, line 276
I believe the problem isn't my code, but instead an issue with the module Pillow not being found by Python?
Can anyone please help with a fix? I can clarify any info needed.
Additionally, I am new to Python and so go easy on me :-) Apologies if any of my terminology is incorrect.
I have tried:
1\ Removing PIL as per the install warning from Pillow (PIL Fork) install info. It was not present on my system. I did this through CMD.
2\ I always access CMD as the administrator.
3\ Updating all program versions above through CMD.
4\ Info I’ve found shows the above versions are compatible.
5\ Using the code help('modules') to show available modules, it does not show 'PIL' or 'Image', but does show 'pip'.
6\ Checked many forums for other fixes.
from PIL import Image
im = Image.open("JC.png")
im.show()

Missing package to enable rendering OpenAI Gym in Colab

I'm attempting to render OpenAI Gym environments in Colab via a Mac using the StarAI code referenced in previous questions on this topic. However, it fails. The key error (at least the first error) is shown in full below, but the import part seems to be "Please install xdpyinfo!"
PyPI doesn't have xdpyinfo. What is it and how do I install it?
Full error message:
482780428160 abstractdisplay.py:151] xdpyinfo was not found, X start can not be checked! Please install xdpyinfo!
I've seen the same error, and solved it by installing x11-utils package which includes xdpyinfo command.
!apt-get install x11-utils

casperjs.bat on windows fails with cannot find module cli.js error

I'm trying out casperJS to run some automated tests. On windows. I followed this installation guide but am stuck.
when I try to run a simple test from the command line like this:
casperjs.bat smoketest.js
I get the following error:
Error: Cannot find module 'C:/code/base/main/Shared/casperjs\modules\cli.js'
I checked, and the file cli.js does exist under the specified path.
I thought the problem could be the mixture of forward and backward slashes in the path, but I edited the bootstrap.js casper code to hard code the path and it made no difference - it still the cannot find module.
I'm have tried this using phantomJS version 1.9.0, and 1.8.2.
Anyone know what I am doing wrong?
Has anyone had success running casper on Windows?
This is due to a bug in PhantomJS 1.9.0 that does not allow for absolute path loading in Windows. Afaik, this should only be apparent if you are using a master build of CasperJS (v1.1).
This bug has been fixed, but is not yet in the Windows binary. You can compile it yourself if you'd like, but that can take quite a bit of time.
I was using the master build of casper. With the latest released version, 1.0.2, it works fine.