I have a issue with VIM. I'm trying to install jedi-vim according to https://github.com/davidhalter/jedi-vim
but when I open vim, it report such error:
initialize.py" 25L, 831C'import site' failed; use -v for traceback
Error detected while processing /home/.../.vim/autoload/jedi.vim:
line 285
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/.../.vim/initialize.py", line 10, in <module>
import os
ImportError: No module named os
And when I use Ctrl+Space in vim, it results in
Error detected while processing function jedi#completions:
line 1:
Traceback (most recent call last):
Press ENTER or type command to continue
In fact, I don't get any error when importing os from the command line..
import os
os,
module 'os' from '/usr/local/install/python-2.7.5/lib/python2.7/os.pyc'
Anybody know how to solve this error?Thank You.
Pretty sure that there's something wrong with your VIM. You're probably using vim on mac and there's something wrong with the sys.path.
You should be able to use :python import os in VIM. If that doesn't work, Jedi certainly won't.
Related
I got this message at XCode after deleting some system files.
(lldb) script
Traceback (most recent call last):
File "<string>", line 1, in <module>
NameError: name 'run_python_interpreter' is not defined
P.S. Had to reinstall XCode, but I've got same message at debugger after reinstalling IDE
Terminal output
$ lldb
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "/usr/local/Cellar/python#2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/copy.py", line 52, in <module>
import weakref
File "/usr/local/Cellar/python#2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/weakref.py", line 14, in <module>
from _weakref import (
ImportError: cannot import name _remove_dead_weakref
You have a local installation of python on your computer (in /usr/local/Cellar). There's a problem when you have two different pythons on your system; lldb links against /System/Library/Frameworks/Python.framework but that python somehow ends up using the python libraries from your installed copy instead. I saw someone work around this once but I forget if it was by putting their local python last in $PATH or if they un-set their $PYTHONPATH before starting lldb.
After installing the pyautogui package with pip, I tried using it in the IDLE shell by typing pyautogui.
However I get the following error:
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
pyautogui
NameError: name 'pyautogui' is not defined
I have scoured the web but have not been able to identify why IDLE will not recognise that pyautogui is installed.
Please let me know if you need more information to answer.
Have you tried importing the package first?
Try:
import pyautogui
I have been trying to configure SublimeText 3 to run SublimeREPL, setting everything so it runs as IDLE, or PyCharm IDE, but, after trying different options I checked in SO, it keeps returning:
>>> import pandas
Traceback (most recent call last):
File "<console>", line 1, in <module>
ImportError: No module named pandas
>>> import os
>>> os.environ['PYTHONPATH']
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/UserDict.py", line 23, in __getitem__
raise KeyError(key)
KeyError: 'PYTHONPATH'
I have tried editing the SublimeREPL.sublime-settings file with the default extend path file you can see at the FAQ site of SublimeREPL, but still does not work.
Does anyone know how this could be solved?
I don't know if this is the problem for you, but I was getting the exact same error and learned that by opening sublime text from the command line (e.g. 'subl .' to open the directory, once you have that shortcut set up) you get one PATH- and if you open sublime text from Spotlight Search you get another PATH. Try opening sublime text from the command line once you've confirmed you can import pandas in an interactive command line session and hopefully it will work.
I want to execute below command but cygwin gives the error.
Please help me.
Python makeReadingsFile.py eichstaett.net.xml test.readings.xml
Traceback (most recent call last):
File "makeReadingsFile.py", line 75, in <module>
import argparse
ImportError: No module named argparse
As noted, the error message
$ Python makeReadingsFile.py eichstaett.net.xml test.readings.xml
Python: can't open file 'makeReadingsFile.py': [Errno 2] No such file or directory
occurs because there's no such file where you're telling it to look for one. Your second command looks to my eyes just like the first command:
Python makeReadingsFile.py eichstaett.net.xml test.readings.xml
Traceback (most recent call last):
File "makeReadingsFile.py", line 75, in <module>
import argparse
ImportError: No module named argparse
and you say that this is using the full address path, but since the given path is the same I think you must mean something like "when you change to the right directory". Anyway, the error message here is probably due to the fact you're using Python 2.6 or before: the argparse module was only introduced in Python 2.7.
I'm working my way through DiveIntoPython.com and I'm having trouble getting the import to work. I've installed ActiveState's Pythonwin on a windows xp prof environment.
In the website, there is an exercise which involves 'import odbchelper' and odbchelper.name
http://www.diveintopython.org/getting_to_know_python/testing_modules.html
When I run it interactive, i get:
>>> import odbchelper
Traceback (most recent call last):
File "<interactive input>", line 1, in <module>
ImportError: No module named odbchelper
>>> odbchelper.__name__
Traceback (most recent call last):
File "<interactive input>", line 1, in <module>
NameError: name 'odbchelper' is not defined
I'm guessing either i don't have the pathing set correctly or the module does not exist referenced in one of the folders when I run 'sys.path'. Any ideas?
thanks in advance
This module doesn't come packaged with Python2.6 for sure (just tried on my machine). Have you tried googling where this module might be?
Consider this post.
figured it out..
found this:
http://www.faqs.org/docs/diveintopython/odbchelper_divein.html
downloaded the file and then put it into a folder. c:\temp\python\ in my case with the commands:
>> import sys
>> sys.path.append('c:\\temp\\python\\')