-
Notifications
You must be signed in to change notification settings - Fork 89
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
ModuleNotFoundError: No module named 'jediepcserver' #347
Comments
Yep, it is not recommended to use jedi requirements from the global env, but if it works for you, feel free. What is the shebang for your jediepcserver script? Try running this:
|
The shebang is:
|
There have been reports of this shebang being created on OS X hosts (#346). As I don't have an OS X system available for testing, it's difficult to fix for me alone. Would you be willing to troubleshoot this on your side? |
Sure, I'll do what I can to help. |
Here's a snippet that will run (defvar trace-indent 0)
(defun trace-function (fn-name orig-fun &rest args)
(cl-incf trace-indent)
(unwind-protect
(let ((trace-prefix (make-string (* 2 trace-indent) (string-to-char "="))))
(message "======%s %s called with args %S" trace-prefix fn-name args)
(let ((res (apply orig-fun args)))
(message "======%s %s returned %S" trace-prefix fn-name res)
res))
(cl-decf trace-indent)))
(defun remove-advices (fn-sym)
(advice-mapc (lambda (func props) (advice-remove fn-sym func)) fn-sym))
(defun remove-single-advice (fn-sym func-to-remove)
(advice-mapc (lambda (func props)
(when (equal func func-to-remove)
(advice-remove fn-sym func)))
fn-sym))
(defun add-trace-function (fn-sym)
(lexical-let*
((fn-sym fn-sym)
(trace-fn (lambda (&rest args)
(apply #'trace-function
(format "Function %S" fn-sym)
args))))
(advice-add fn-sym :around trace-fn)
(list fn-sym trace-fn)))
(defun trace-jedi-install-server-block ()
(let* ((jedi:environment-root "jedi-trace-install-server-block")
(funcs-to-advise '(python-environment--blocking-process
python-environment-run-block
python-environment--deferred-process
call-process
deferred-process
jedi:install-server-block
jedi:install-server))
advices)
(unwind-protect
(progn
(mapc (lambda (fn-sym) (push (add-trace-function fn-sym) advices))
funcs-to-advise)
(when (python-environment-exists-p jedi:environment-root)
(delete-directory (python-environment-root-path jedi:environment-root) 'recursive))
(jedi:install-server-block))
(mapc (lambda (advice-info) (apply #'remove-single-advice advice-info))
advices))))
(trace-jedi-install-server-block) |
Sorry I took so long to answer. Here are the results: ======== Function jedi:install-server-block called with args nil |
No problem, thanks a lot. This gives a lot of information. The venv is created via the following command:
And then jedi is installed with
Could you please try the following:
If
(same command as before, but without the
|
Hi, I realize this is an old issue but I'm having the (exact) same problem on my Mac. I've followed the steps you've given and it seems that my My My case isn't the exact same as OP's, though. I'm using If it helps, the output of
|
@ibynx thank you for shedding some more light. So... to summarize the issue as I see it:
Looks like an issue between virtualenv and pip, but let's troubleshoot this more. Next questions:
|
same issue as @ibynx and identical |
Do
and
If yes, this is a bug that needs to be reported to |
Getting the same problem with python3.8 where the shebang is incorrect. It seems like a in issue in lisp code that installs jedi, doing the same by hand gives me the correct shebang. Doing a
|
I'm working on OSX and when trying to start Jedi by running jedi:setup after a jedi:install-server, I get this error:
I ran jedi:install-server and it installed everything under ~/.emacs.d/.python-environments. If I source ~/.emacs.d/.python-environments/default/bin/activate, and run python, I can import the jediepcserver module. But jedi:setup can't find the module. It seems that jedi:setup is not running in the correct environment.
For now I installed all jedi dependencies globally using pip and it is working, but it seems suboptimal and the jedi documentation even says it is not recommended.
Did I do something wrong? Is it some mac idiosyncrasy? Is it a bug?
The text was updated successfully, but these errors were encountered: