spyder showing missing dependencies - spyder

Just wondering if this is a spyder bug, or whether there was an update between yesterday and today? spyder was working fine for me yesterday. This error message showed up.
jedi=0.17.1: 0.18.0 (NOK)
parso=0.7.0: 0.8.2 (NOK)
Somewhat related, what do jedi and parso do, and what does "NOK" mean?

(Spyder maintainer here) My answers to your questions:
just wondering if this is a spyder bug, or that there was an update between yesterday and today?
This is not a bug. It means that you have the wrong versions of some of our dependencies (as the message clearly states).
spyder was working fine for me yesterday
You probably ran conda update --all, or installed another package with conda or pip, which updated Jedi and Parso as well.
To fix this problem, you need to reinstall those packages with the right versions. For that, please open the Anaconda Prompt or a system terminal (i.e. cmd.exe) and run one of the following commands:
conda install jedi=0.17 parso=0.7
if you're using Anaconda, or
pip install jedi==0.17.1 parso==0.7.0
if not.
somewhat related, what do jedi and parso do, and what does "NOK" mean?
Jedi provides code completion in the editor and Parso is used for code folding on it as well.
NOK means Not ok.

Related

Updating opencv to version 4.5.1

I need to update opencv to version 4.5.1 because there is a function that is not implemented in my current version 3.4.2. (I need to use the SIFT_create function, when I google a bit it seems that they removed it from 3.4.2 because of a patent. However, I have also heard from someone that this function has a different name in 3.4.2, so if you know this different name this is fine as well. I googled it but couldn't find anything about it.)
I tried updating opencv in the anaconda navigator but that didn't work. I tried typing
pip install opencv-python==4.0.0.21
(if I replaced 4.0.0.21 by 4.5.1 it couldn't find the version), but when I type
cv2.__version__
afterwards it still says I'm using version 3.4.2. I found this post: How to upgrade OpenCV in Anaconda (windows)? which says I should use
conda install -c conda-forge opencv=4.3.0
I do this, both the exact same command and the command with 4.3.0 replaced by 4.5.1 but in both cases I only get version 4.0.0 (which apparently also doesn't have the SIFT_create function).
Any idea what I could do?
In the meanwhile I found the answer myself (or rather: with the help of non-internet people).
The problem was that while trying to update opencv, I ended up having two versions of opencv at once. I had opencv 4.5.1 and at the same time I had opencv-python 4.0.0.21 installed. When importing opencv, it chose to import opencv-python in stead of just opencv. When I deleted the opencv-python this fixed the problem.

How to install luarocks for Windows 10

So I've been searching everywhere and I'm completely stuck right now. Initially I just installed the binaries which came with luarocks.exe and luarocks_admin.exe but with that there was no config file so when I go to install the luarocks-mysql module, luarocks was unable to find the lua library and said I needed to set the LUA_LIBDIR variable in the config. I can't make changes to the luarocks config though because it either doesn't exist or I can't find it.
After getting this problem I went back to install the luarocks all in one package but I'm unable to follow the instructions because I can't find the install.bat file that they were talking about. Sorry if this is a lot but I'm just running into a bunch of problems right now.
EDIT: Just use Ubuntu, it's 100 times easier.
I had similar problems. I didn't look for a solution and just installed wsl on windows 10.
https://learn.microsoft.com/en-us/windows/wsl/install
Then execute the commands in the console:
sudo apt install lua5.3 liblua5.3-0 liblua5.3-dev
sudo apt install luarocks

How To Update Spyder 3.3.0

I currently use Spyder 3.2.8 with Anaconda/Miniconda. When I open the Spyder editor, a Spyder update window pops up and shows Spyder 3.3.0 is available. It also indicates that "please wait until new conda packages are available and use conda to perform the update".
I followed the direction using anaconda prompt to update. My computer shows the packages were already installed successfully. However, my Spyder Editor is still the version 3.2.8 I also used Anaconda Navigator to update by clicking on the "gear" but no luck. How can I update from Spyder 3.2.8 to 3.3.0? Thank you!!!!
The only thing which really did the trick is
conda install spyder=3.3.0
so in this case you have to explicitly provide the package version.
I have a clean anaconda 5.2.0 installation.
Update: after that i can "conda update spyder" and everything is consistent (for 3.3.1 and further versions)
(Spyder maintainer here) If you already tried to update (either through Navigator or in a system terminal) and you didn't get a new version, that means that conda packages are still unavailable and you have to wait a couple more days to perform the update.
You can get it from conda-forge:
conda install -c conda-forge spyder
https://anaconda.org/anaconda/spyder
As you can see in that internet address, there is only 3.3.0 version for linux and osx.
I think that 3.3.0 version for window would be a little late.

How can I restore the traditional console in Spyder?

Recent versions of Spyder have removed the traditional console, and now only include the IPython console. (See https://github.com/spyder-ide/spyder/issues/4524) Is there any way to add it back?
UPDATE: I have accepted the answer given by the Spyder maintainer, which is "No", as it is the answer to the question. The question itself is somewhat inchoate, and I note here that it is possible to just install a previous version of Spyder. The last version with the traditional console is 3.1.4. Anaconda Python makes this fairly easy to install a previous version:
Launch Anaconda Navigator.
Activate the virtual environment in which you wish to install a previous version of Spyder.
On the Home screen, you will see several tools such as IPython, Jupyter, and Spyder.
In the box for Spyder, click the gear icon, "Install specific version", and 3.1.4:
(Spyder maintainer here) No, unfortunately there's no way to add it back again.
We decided to remove it because of all the problems the Python console had, as mentioned in the issue you referenced above in your question.

How to install luagraph using luarocks

I'm trying to use luagraph, a binding to the graphviz library:
http://luagraph.luaforge.net/index.html
To install, I'm using luarocks in Mac OS X. The following command is executed in bash:
luarocks install luagraph
The output is the following:
Installing https://luarocks.org/luagraph-1.0.4-1.src.rock... Using
https://luarocks.org/luagraph-1.0.4-1.src.rock... switching to 'build'
mode
Error: Could not find expected file graphviz/graph.h, or
graphviz/graph.h for GRAPHVIZ -- you may have to install GRAPHVIZ in
your system and/or pass GRAPHVIZ_DIR or GRAPHVIZ_INCDIR to the
luarocks command. Example: luarocks install luagraph
GRAPHVIZ_DIR=/usr/local
I have been installed graphviz using homebrew, but I can't figure out how to pass GRAPHVIZ_DIR or GRAPHVIZ_INCDIR properly.
How can I install luagraph?
I've updated LuaGRAPH a couple of weeks ago. It now supports the newest version of Graphviz based on the cgraph library instead of the old graph library.
There is one drawback: I couldn't get luagraph to run on Windows using mingw because of some runtime library issues (compiler and dll compatibility probably). Please look at the README file for more details.
I personally never produced a rockspec for this module. This was created by someone else based on a fork of my luagraph library.
Installation without Luarocks is simple. Download from
https://github.com/hleuwer/luagraph
and follow the instruction in the documentation and the README file. You need adopt a simple config file which is included by make.
Herbert
Well, luaGRAPH is still the top result when searching for lua and graph. So the question is still standing.
And, unfortunately, the answer is: luagraph is OLD, the last update happened before the ubuntu 14.04 was released. And there seem to be some notable changes in the system itself, the flags the error message show do not seem to work. On top of that, graphviz is now about 20 releases newer than the luarock recommends.
There now is a bare bone alternative lua package: graphviz
It is extremely basic, and documentation in not at all informative, but at least it works.
update: Luagraph may be working again, but not through rocks. See the other answer.

Resources