-
Notifications
You must be signed in to change notification settings - Fork 981
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Installed through pip3, Thonny can't import jedi #434
Comments
I'll dig into your stacktrace later, but did you know that on Bionic you can |
Original comment by cefn (Bitbucket: cefn Thanks for the suggestion and clear guidance. However, one of the reasons for looking into Thonny and Pip3 specifically is to benefit a project I am launching where users are expected to do python coding, and I am guiding them remotely. I am trying to minimise the number of steps involved, and the diversity across platforms by starting with pip3 and getting everything from there, such that the same instructions can be used for Linux, Mac and Windows. I have even been speculating if I can use Thonny as a precursor to pip instead of installing python3. It seems to work well from the Thonny shell like... import pip ...and even... pip.main("install --upgrade pip".split()) ...but it's just weird enough to be confusing for learners I think, compared to any other instructions they would see for using pip, and hard to see all the output, compared to a routine console launch of pip install. I am certainly quite confused that in the stack trace above Thonny fails to import jedi which is directly importable from python3. Does it maintain some kind of walled-off site-packages into which jedi also needs to be installed? |
Does I know that with I agree that this is not the most elegant solution. Maybe it's better to leave user site-packages as it is and just acknowledge, that Thonny stuff may be located in 3 places (installation site, Another option would be to keep the original user site-packages in |
I could also import all Thonny deps before this path manipulation. You can test it by putting |
Original comment by cefn (Bitbucket: cefn It seems it is related to using --user But as per http://metadata.ftp-master.debian.org/changelogs/main/p/python-pip/python-pip_9.0.1-2_changelog this is not going away, and is likely to be increasingly adopted in the wider python community ( pypa/pip#1668 ) so worth getting a fix in place. Until the --global flag is adopted via pypa/pip#4865 Debian users at least can use --system to override the default. To fix this on my machine I first had to uninstall jedi and parso from my user directories (else a --system install is a no-op), then installed to system, by running...
I think it would make sense to keep the original user site-packages at the end of sys.path. If you were to add the user directories last, then presumably Thonny would continue to receive its own managed updates first and I don't have to advise my users to use sudo and --system. Raspbian is likely to be affected by this and they are core to your market I think. |
Fixed by dc1502c and 8b33bd3 . See https://bitbucket.org/plas/thonny/pull-requests/13/changes-to-enable-thonny-to-launch-on/diff for discussion Please test and reopen if not fixed! |
Original changes by Aivar Annamaa (Bitbucket: aivarannamaa
|
Original report by cefn (Bitbucket: cefn
GitHub: cefn
).
Hi there,
When I launch Thonny, it is throwing up a huge window with a traceback in a massive font which is unreadable as it wraps every line 8 times, and the lines continue off the bottom of the screen. I am assuming that what I see in the console is a replica of the error in the alert dialog.
I installed thonny on Ubuntu Bionic using...
I learned from early launch errors that I needed to also install...
...then...
However, even after apparently successfully installing Jedi I get the following result...
This is even though I get the following in a console...
Any ideas?
The text was updated successfully, but these errors were encountered: