Spyder: Jedi dependency not being correctly found

Created on 6 Mar 2016  路  25Comments  路  Source: spyder-ide/spyder

Description of your problem

What steps will reproduce the problem?

  1. I get this popup about missing dependencies, but Jedi is already installed.

image

What is the expected output? What do you see instead?
I would expect no popup at all!

Please provide any additional information below
@ccordoba12 I dont really like the tone of the message in the popup. The please dont complain sh*t is just wrong...We need to reword it, it is very unfriendly.

Versions and main components

  • Spyder Version: Master
  • Python Version: 2.7.11
  • Operating system: Kubuntu 14.04 / 64bits

    Dependencies

Please go to the menu entry Help > Optional Dependencies (or
Help > Dependencies), press the button Copy to clipboard
and paste the contents below:

Jedi is installed, but I get this still...

goanpeca@goanpeca-kubuntu:~$ conda install jedi
Using Anaconda Cloud api site https://api.anaconda.org
Fetching package metadata: ....
Solving package specifications: ...........

# All requested packages already installed.
# packages in environment at /home/goanpeca/anaconda2:
#
jedi                      0.9.0                    py27_0  

image

Most helpful comment

@anamabo another suggestion you could follow is to check your AppData directory (normally is hidden in you user directory), if you can't see it you can check some info regarding that here), search for a directory call Python in it and erase it. Hopefully with that any mismatch in the version detected for the dependencies should be resolved.

This worked! I don't know why, but it does. Thanks!

All 25 comments

The message is shown because Spyder can't find Jedi in your Python installation. Please review that it's correctly installed. You can do that by opening an IPython terminal console and trying to import Jedi in there.

The please dont complain sh*t is just wrong...We need to reword it, it is very unfriendly.

What do you propose instead? You're just complaining but not offering any positive feedback.

The thing is that I really don't want to deal with people having partial installations (i.e with some dependencies installed and some not). It's fine by me If they want to run Spyder like that, but they can't complain if things are broken or semi-broken (like in issue #3009).

Both consoles find jedi as you can see in the right, however the dependencies dialog does not seem to be aware of this

image

The wording should be more in the lines of:

Spyder could work without some of these dependencies, however to have a smooth experience when using Spyder we strongly recommend you install all the listed missing dependencies.

Failing to install the dependencies might result in bugs. Please make sure any bugs found are not the direct result of these missing dependencies prior to reporting a new issue.


BTW, why dont we make them hard dependencies... as in Spyder should not start at all if these dependencies are not there?

We are saying that the dependencies are needed... but Spyder starts anyway. That should not be the case probably...

Both consoles find jedi as you can see in the right, however the dependencies dialog does not seem to be aware of this

Then please help me to debug and fix this problem because I can't reproduce it :-)

The wording should be more in the lines of:

Ok, I'll update the wording ;-)


BTW, why dont we make them hard dependencies... as in Spyder should not start at all if these dependencies are not there?

They are hard deps now, but the problem is Spyder doesn't import all of them directly. Remember that after PR #2932, both Rope and Jedi are imported in external processes, not in the process Spyder is running.

Besides, we could make Spyder crash, but:

  1. Importing all our deps at startup just to check that they are there would make startup much more slow.
  2. It's unfriendly. That's why I opted for showing that dialog instead (at least in your case you can keep working in Spyder even if Jedi is not found ;-)

Ok, I improved the wording of that dialog as per your suggestions. I'm moving this issue to beta4 because I don't think you're going to have time to solve this right now.

:+1:

No one else has reported this error, so I'm closing it :-)

Same problem in raspberry pi 3, with spyder 3 and python 3.4.

FIxed with
sudo pip3 install --upgrade jedi

Same problem, jedi installed via sudo pip3 install --upgradejedi did not fix the issue. Also tried to install git version of jedi .. but spyder still complain on finding a 0.9.0 version somewhere.

epi@epi:~/dev/jedi$ ipython
Python 3.5.3 (default, Jan 19 2017, 14:11:04) 
Type 'copyright', 'credits' or 'license' for more information
IPython 6.0.0.dev -- An enhanced Interactive Python. Type '?' for help.

In [1]: import jedi

In [2]: jedi
Out[2]: <module 'jedi' from '/usr/local/lib/python3.5/dist-packages/jedi/__init__.py'>

In [3]: jedi.__version__
Out[3]: '0.10.0'

Maybe you installed Jedi with --user pip flag.

FWIW, we don't support the latest Jedi yet, in case you're using Spyder master.

Hi, thanks for the info. I misread the error message. I thought jedi>=0.9.0 was required. I applied this PR https://github.com/spyder-ide/spyder/pull/4121/ now everything works as expected.
note: I'm using ipython master too .. the module core.utils.quick_guide is no more available. (should I open an issue for it?)

I thought jedi>=0.9.0 was required

Jedi 0.10.0 caused some breakage for us, fixed (as you discovered) by PR #4121. We'll merge that PR in Spyder 3.1.4 because we're about to finish 3.1.3.

the module core.utils.quick_guide is no more available. (should I open an issue for it?)

If it's breaking Spyder, please do :-)

same issue on Ubuntu 16.04 with Python 3.6 in Spyder 3.1.3. I have jedi 0.10 installed. Not sure how to fixt it. sudo pip3 install --upgrade jedi didn't work for me.
screenshot from 2017-04-22 20-24-29

fixed in 3.1.4

Yep, that's correct.

Hello all..experiencing same error message / warning about jedi 0.9.0 : 0.10.0.
Tried to upgrade spyder to 3.1.4 which failed in a "python 35" environment. Can you help?
Here is the partial trace from where errors begin:


Failed building wheel for MarkupSafe
Running setup.py clean for MarkupSafe
Failed to build MarkupSafe
Installing collected packages: spyder, setuptools, webencodings, html5lib, bleach, MarkupSafe
Found existing installation: spyder 3.1.3
DEPRECATION: Uninstalling a distutils installed project (spyder) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.
Uninstalling spyder-3.1.3:
Successfully uninstalled spyder-3.1.3
Rolling back uninstall of spyder
Exception:
Traceback (most recent call last):
File "C:\Anaconda3\envs\py35\lib\site-packages\pip\basecommand.py", line 215, in main
status = self.run(options, args)
File "C:\Anaconda3\envs\py35\lib\site-packages\pip\commands\install.py", line 342, in run
prefix=options.prefix_path,
File "C:\Anaconda3\envs\py35\lib\site-packages\pip\req\req_set.py", line 784, in install
**kwargs
File "C:\Anaconda3\envs\py35\lib\site-packages\pip\req\req_install.py", line 851, in install
self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
File "C:\Anaconda3\envs\py35\lib\site-packages\pip\req\req_install.py", line 1064, in move_wheel_files
isolated=self.isolated,
File "C:\Anaconda3\envs\py35\lib\site-packages\pip\wheel.py", line 345, in move_wheel_files
clobber(source, lib_dir, True)
File "C:\Anaconda3\envs\py35\lib\site-packages\pip\wheel.py", line 323, in clobber
shutil.copyfile(srcfile, destfile)
File "C:\Anaconda3\envs\py35\lib\shutil.py", line 115, in copyfile
with open(dst, 'wb') as fdst:
PermissionError: [Errno 13] Permission denied: 'C:\Anaconda3\envs\py35\Lib\site-packages\spyder\fonts\spyder.ttf'

Please wait until new conda packages are uploaded and use conda to do the update.

Don't use pip because that could most probably break your installation

I see the same issue on the recent spyder 4.0.1 release, jedi is installed but is not recognized
Screenshot_20200306_012003

The message is clear enough. Spyder 4 doesn't work with version 0.16 but only with 0.14.1.

I'm getting the same error of above:
Capture

But my version of Jedi is 0.14.1. I'm using Anaconda 4.8.1 for windows 10 and spyder version 4.

however, I have jedi version 0.14.1

Hi @anamabo what is the version of Jedi that shows up in our dependencies dialog (Help > dependencies)? have you installed any package with pip in the environment where Spyder is installed? (maybe you have two versions of Jedi currently installed in your env, one with conda and another with pip) . Also, seems like you aren't using the latest Spyder version (4.1.3).

Some suggestions:

  • To prevent the dialog showing up, try running conda install jedi=0.14.1 to check if an installation takes place.

  • If you want to try the latest Spyder 4.1.x release, try running conda install spyder=4.1.* (Spyder 4.1.3 for example requires Jedi 0.15.2 and should change the version of Jedi to that one when being installed).

Thanks @dalthviz for your prompt answer. I created a new environment in conda by running the following command (following your instructions):

conda create -n spyder python=3.7 jedi=0.15.2 spyder=4.1.3

The list of dependencies is the following:

Name Version Build Channel

alabaster 0.7.12 py37_0
argh 0.26.2 py37_0
astroid 2.4.1 py37_0
atomicwrites 1.4.0 py_0
attrs 19.3.0 py_0
autopep8 1.4.4 py_0
babel 2.8.0 py_0
backcall 0.1.0 py37_0
bcrypt 3.1.7 py37he774522_1
bleach 3.1.4 py_0
ca-certificates 2020.1.1 0
certifi 2020.4.5.1 py37_0
cffi 1.14.0 py37h7a1dbc1_0
chardet 3.0.4 py37_1003
cloudpickle 1.4.1 py_0
colorama 0.4.3 py_0
cryptography 2.9.2 py37h7a1dbc1_0
decorator 4.4.2 py_0
defusedxml 0.6.0 py_0
diff-match-patch 20181111 py_0
docutils 0.16 py37_1
entrypoints 0.3 py37_0
flake8 3.7.9 py37_0
future 0.18.2 py37_1
icu 58.2 ha925a31_3
idna 2.9 py_1
imagesize 1.2.0 py_0
importlib-metadata 1.6.0 py37_0
importlib_metadata 1.6.0 0
intervaltree 3.0.2 py_0
ipykernel 5.1.4 py37h39e3cac_0
ipython 7.13.0 py37h5ca1d4c_0
ipython_genutils 0.2.0 py37_0
isort 4.3.21 py37_0
jedi 0.15.2 py37_0
jinja2 2.11.2 py_0
jpeg 9b hb83a4c4_2
jsonschema 3.2.0 py37_0
jupyter_client 6.1.3 py_0
jupyter_core 4.6.3 py37_0
keyring 21.1.1 py37_2
lazy-object-proxy 1.4.3 py37he774522_0
libpng 1.6.37 h2a8f88b_0
libsodium 1.0.16 h9d3ae62_0
libspatialindex 1.9.3 h33f27b4_0
markupsafe 1.1.1 py37he774522_0
mccabe 0.6.1 py37_1
mistune 0.8.4 py37he774522_0
nbconvert 5.6.1 py37_0
nbformat 5.0.6 py_0
numpydoc 0.9.2 py_0
openssl 1.1.1g he774522_0
packaging 20.3 py_0
pandoc 2.2.3.2 0
pandocfilters 1.4.2 py37_1
paramiko 2.7.1 py_0
parso 0.5.2 py_0
pathtools 0.1.2 py_1
pexpect 4.8.0 py37_0
pickleshare 0.7.5 py37_0
pip 20.0.2 py37_3
pluggy 0.13.1 py37_0
prompt-toolkit 3.0.5 py_0
prompt_toolkit 3.0.5 0
psutil 5.7.0 py37he774522_0
pycodestyle 2.5.0 py37_0
pycparser 2.20 py_0
pydocstyle 4.0.1 py_0
pyflakes 2.1.1 py37_0
pygments 2.6.1 py_0
pylint 2.5.2 py37_0
pynacl 1.3.0 py37h62dcd97_0
pyopenssl 19.1.0 py37_0
pyparsing 2.4.7 py_0
pyqt 5.9.2 py37h6538335_2
pyrsistent 0.16.0 py37he774522_0
pysocks 1.7.1 py37_0
python 3.7.7 h81c818b_4
python-dateutil 2.8.1 py_0
python-jsonrpc-server 0.3.4 py_0
python-language-server 0.31.10 py37_0
pytz 2020.1 py_0
pywin32 227 py37he774522_1
pywin32-ctypes 0.2.0 py37_1000
pyyaml 5.3.1 py37he774522_0
pyzmq 18.1.1 py37ha925a31_0
qdarkstyle 2.8.1 py_0
qt 5.9.7 vc14h73c81de_0
qtawesome 0.7.0 py_0
qtconsole 4.7.4 py_0
qtpy 1.9.0 py_0
requests 2.23.0 py37_0
rope 0.17.0 py_0
rtree 0.9.4 py37h21ff451_1
setuptools 47.1.1 py37_0
sip 4.19.8 py37h6538335_0
six 1.15.0 py_0
snowballstemmer 2.0.0 py_0
sortedcontainers 2.1.0 py37_0
sphinx 3.0.4 py_0
sphinxcontrib-applehelp 1.0.2 py_0
sphinxcontrib-devhelp 1.0.2 py_0
sphinxcontrib-htmlhelp 1.0.3 py_0
sphinxcontrib-jsmath 1.0.1 py_0
sphinxcontrib-qthelp 1.0.3 py_0
sphinxcontrib-serializinghtml 1.1.4 py_0
spyder 4.1.3 py37_0
spyder-kernels 1.9.1 py37_0
sqlite 3.31.1 h2a8f88b_1
testpath 0.4.4 py_0
toml 0.10.0 py37h28b3542_0
tornado 6.0.4 py37he774522_1
traitlets 4.3.3 py37_0
typed-ast 1.4.1 py37he774522_0
ujson 1.35 py37hfa6e2cd_0
urllib3 1.25.8 py37_0
vc 14.1 h0510ff6_4
vs2015_runtime 14.16.27012 hf0eaf9b_2
watchdog 0.10.2 py37_0
wcwidth 0.1.9 py_0
webencodings 0.5.1 py37_1
wheel 0.34.2 py37_0
win_inet_pton 1.1.0 py37_0
wincertstore 0.2 py37_0
wrapt 1.11.2 py37he774522_0
yaml 0.1.7 hc54c509_2
yapf 0.28.0 py_0
zeromq 4.3.1 h33f27b4_3
zipp 3.1.0 py_0
zlib 1.2.11 h62dcd97_4

I haven't installed anything with pip; that is why I installed spyder in a different environment, just to avoid incompatibilities between conda and pip installations... Anyways, when opening spyder, now this error appears:
image

However the versions of jedi and parso are 0.15.2 and 0.5.2 (in the enviroment of spyder)!

Aditionally, the kernel is not working.... I feel a bit dissapointed, since I used to have spyder 3 and it worked fine, but for some reason I can't get this new version of Spyder working on my Windows 10 x64 bits machine...
Any help is appreciated!

Thank you.

Thanks for the detailed explanation @anamabo ! Now that I check the versions requested, how are you running Spyder? or better are you running Spyder from source by any chance?

The unreleased Spyder 4.1.4 is the one that requires Jedi 0.17.0 and Parso 0.7.0

Is quite strange then for you to get such a message if you have installed version 4.1.3 and the corresponding dependencies (Jedi 0.15.2 and Parso 0.5.2).

About the kernel not starting be sure that spyder-kernels >= 1.9.1 in installed in the env where your selected interpreter is located (starting from Spyder 4.1.3 the minimum version for spyder-kernels is 1.9.1)

@anamabo another suggestion you could follow is to check your AppData directory (normally is hidden in you user directory), if you can't see it you can check some info regarding that here), search for a directory call Python in it and erase it. Hopefully with that any mismatch in the version detected for the dependencies should be resolved.

@anamabo another suggestion you could follow is to check your AppData directory (normally is hidden in you user directory), if you can't see it you can check some info regarding that here), search for a directory call Python in it and erase it. Hopefully with that any mismatch in the version detected for the dependencies should be resolved.

This worked! I don't know why, but it does. Thanks!

Was this page helpful?
0 / 5 - 0 ratings