-
Notifications
You must be signed in to change notification settings - Fork 86
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
Problem with Python environment #188
Comments
Hi. Can you provide following information M-: (pythonic-executable) RET |
"python" then a window pops up with the error messages above. |
(executable-find (pythonic-executable)) |
I have exactly the same problem on OS EI Capitan with the system default python(i.e.
Then |
Does apple provide http server library with its python? |
@proofit404 - /usr/bin/python
|
Is there a way to indicate which python version/installation to use? I have system Python and more up to date versions installed using MacPorts, not to mention quite a few virtualenvs. |
Definitely some confusion when starting Emacs. If I activate a virtualenv on the command line and then |
I think you need to try |
I got the same issue with emacs 24.5 on OSX El Capitan starting from a prelude setup, with python3 installed via brew. In this case python 3.5.2 is linked to the
and delete the anaconda-mode folder under the prelude directory (prelude recreate it when you restart emacs). This solved the issue for me. |
You set exec path in the wrong way. I suggest you to remove it. Using interpreter with BaseHTTPServer installed is the right choice and you did it in the third line. |
Thanks, I'm new around here and still learning :-P
and it works correctly. |
I believe I've tried everything here, but I still have this same issue. I have even tried to use
And when I run Are there any other tricks to make this work? Happy to provide any info needed. Thanks! |
@smizell FWIW: I got the same error when trying to move over to |
@jacktasia thanks for the response. I just tried what you have here and did not have success. I am use Spacemacs. I set |
@smizell Sorry for late response. Open your favourite shell, activate pyenv version you want to use within Emacs and do following bash commands: $ cd ~/.emacs.d/anaconda-mode/0.1.2
$ python -i
>>> import site
>>> site.addsitedir('.')
>>> from six.moves.BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
>>>
$ python -i
>>> from http.server import BaseHTTPRequestHandler, HTTPServer
>>> Does they behave different? |
@proofit404 For the first command:
For the second:
Note, this was all using Python 2.7. When I switched to 3.5.2, the second import worked for me. |
@smizell I've released new anaconda-mode version 0.1.3. It doesn't use six library, so it should solve your import problem. Please wait for melpa build and update your emacs package. Any other actions should be done automatically by Emacs package. I wait for your feedback in any case. Let me know if it solve your problem, if it not or if it introduce the new one. |
I just loaded up the python layer for Spacemacs. It looks like the newest anaconda-mode version is there. However, when I open a Python file, I get a large wall of text for an error.
Just as a note, I'm on Spacemacs, so this may affect debugging here. I'm also a newcomer to this wonderful world of emacs. Edit: thanks for the help :) |
@proofit404 I have tracked down the issue above and fixed it. It was related to some issues with Spacemacs and using Fish as the shell. I moved back to Bash and restarted my computer (Emacs still used Fish—must have been cached) and was able to get Everything is working great. I was able to remove I'm wondering if my original issue was related to Fish. Either, it's working for me now with no special configuration other than using pyvenv.el. Thanks for the help! |
I've just installed Emacs and then the Spacemacs configuration. When I enable the python layer and open a .py file in the editor I am seeing this error message;
File "", line 4, in
File "build/bdist.macosx-10.11-intel/egg/anaconda_mode.py", line 18, in
File "build/bdist.macosx-10.11-intel/egg/service_factory/init.py", line 14, in
File "build/bdist.macosx-10.11-intel/egg/service_factory/factory.py", line 14, in
File "build/bdist.macosx-10.11-intel/egg/service_factory/providers/basehttp.py", line 18, in
ImportError: No module named BaseHTTPServer
I have a couple of different python versions installed on my machine and a number of python virtualenvs. I'm guessing that I have Emacs pointing at a broken virtualenv or incorrect Python version. Can anyone help me figure out how to find the broken component/link?
The text was updated successfully, but these errors were encountered: