ImportError ropevim using ropevim plugin in vim - python

According to the documentation of rope-vim plugin I install python-rope and python-ropemode mode packages. However when I try to open some file using vim I get following ImportError:
Error detected while processing function LoadRope:
line 4:
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named ropevim
I have found the ropevim module is already in plugin's directory but when I had tried to import it:
python -c "import ropevim"
I get another ImportError:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "ropevim.py", line 10, in <module>
import vim
ImportError: No module named vim
Have I miss any package? Some ideas? Thank you for your help.

Install ropevim using pip install ropevim

ropevim is currently a Python 2 project.
pip2 install --user --update ropevim

I know it might not be the answer you're looking for, but I'm using klen/python-mode plugin with rope included and it's working like a charm.
I'm also using Vim-Plug to manage my plugins and it's as easy as:
Plug 'klen/python-mode', { 'for': ['python'] }
Here is my .vimrc
Hope this helps! :)

Related

Can't import pymatgen.core "No module named 'pymatgen.core'"

I've used pip install pymatgen with Python 3.9.1 on Windows 10 to install pymatgen, but I'm getting the following error:
Traceback (most recent call last):
File "D:\code\pymatgen\pymatgen.py", line 1, in <module>
import pymatgen.core as mg
File "D:\code\pymatgen\pymatgen.py", line 1, in <module>
import pymatgen.core as mg
ModuleNotFoundError: No module named 'pymatgen.core'; 'pymatgen' is not a package
I have also tried to install the previous 2 versions but still getting the same error though I can already see it in the pip list
pymatgen 2022.3.22
What am I missing?
Maybe try using conda ? if this doesn't work then there is definitely some dependencies issue
https://pymatgen.org/installation.html

ModuleNotFoundError: No module named 'Quartz'

I'm trying to work on python3 and using mac. I have installed pyobjc-core and pyobjc, but the error said Quartz not found. I'm very new to this kind of installing. Is there any solution?
Here is my error from pycharm:
Traceback (most recent call last):
File "/Users/Thyme/PycharmProjects/DinosourBot/venv/lib/python3.6/site-packages/pyautogui/_pyautogui_osx.py", line 5, in <module>
import Quartz
ModuleNotFoundError: No module named 'Quartz'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/Thyme/PycharmProjects/DinosourBot/Bot.py", line 2, in <module>
import pyautogui
File "/Users/Thyme/PycharmProjects/DinosourBot/venv/lib/python3.6/site-packages/pyautogui/__init__.py", line 110, in <module>
from . import _pyautogui_osx as platformModule
File "/Users/Thyme/PycharmProjects/DinosourBot/venv/lib/python3.6/site-packages/pyautogui/_pyautogui_osx.py", line 7, in <module>
assert False, "You must first install pyobjc-core and pyobjc: https://pyautogui.readthedocs.io/en/latest/install.html"
AssertionError: You must first install pyobjc-core and pyobjc: https://pyautogui.readthedocs.io/en/latest/install.html
Process finished with exit code 1
In case anyone stumbles here use:
pip install pyobjc-framework-Quartz
I have solved the problem by
installing pyobjc-framework-Quartz,
it's provided by pycharm
I'd suggest it's best to install all of pyObjC, rather than just specific frameworks. Invariably, if you're working with Quartz, you're going to need various CoreFoundation objects and constants at the very least. To say nothing of AppKit, or other frameworks, depending on what you're doing.
pip install pyobjc (or pip3) should install everything and let you import Quartz. (It works for me on several pythons!)

ImportError: No module named django_auth_ldap

I can't seem to get python ldap libraries to work properly with Django:
>>> from django_auth_ldap import *
Traceback (most recent call last):
File "<console>", line 1, in <module>
ImportError: No module named django_auth_ldap
I'm running Ubuntu v14.
This is what a pip freeze looks like on my working environment:
Django==1.9.4
django-auth-ldap==1.2.7
django-filter==0.13.0
djangorestframework==3.3.3
Markdown==2.6.5
pyasn1==0.1.9
pyldap==2.4.25.1
python3-ldap==0.9.8.4
(I installed ldap for python3 as well to do a sanity check)
But as I go through all the guides here, they all seem to point to the same libraries I already have except for "pip install python-ldap".
When I try to do:
pip install python-ldap
I just get the following result:
Collecting python-ldap
Using cached python-ldap-2.4.25.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-0c5p7fkj/python-ldap/setup.py", line 53
print name + ': ' + cfg.get('_ldap', name)
^
SyntaxError: invalid syntax
----------------------------------------
Does anyone know what are the best steps I should take to get around this issue to get the library working?
I've tried doing a wget for
https://pypi.python.org/pypi/python-ldap
And I extracted the files and simply used
python setup.py install to the tar ball, but to no avail.
Any suggestions?
Found the solution from this page:
https://www.howtoinstall.co/en/ubuntu/precise/universe/python-django-auth-ldap/
The following command seems to have done the trick:
apt-get install python-django-auth-ldap

ImportError: path/to/_spatialite.so: undefined symbol: sqlite3_bind_int64

I know, simmilar questions have been asked, but I didn't really find any help.
I used pip install pyspatialite to build the pyspatialite library.
Since this doesn't work, I had to build it manualy with:
python setup.py install
Therefore I first had to download the amalgamation for libspatialite and put this into
/build/pyspatialite/amalgamation from this source: http://www.gaia-gis.it/gaia-sins/libspatialite-sources/
I also edited the /build/pyspatialite/src/connection.h file and removed 'int spatialite_init(int verbose);' because of duplication.
after all, I made it to build the whole library with:
python setup.py install
But now I get this python error:
from pyspatialite import dbapi2
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/user/pythonPlayground/local/lib/python2.7/site-packages/pyspatialite/dbapi2.py", line 27, in <module>
from pyspatialite._spatialite import *
ImportError: /home/user/pythonPlayground/local/lib/python2.7/site-packages/pyspatialite/_spatialite.so: undefined symbol: sqlite3_bind_int64
I read, this has something to do with the linked librarys for _spatialite.so file.
How can I fix this, or what did I miss?
Thanks in advance for any help.

ImportError: No module named extras

While trying to run (Ubuntu) the Zuul tool: http://ci.openstack.org/zuul/zuul.html
I see the following error:
zuul#master:~/zuul/zuul$ python cmd/server.py
Traceback (most recent call last):
File "cmd/server.py", line 20, in <module>
import extras
ImportError: No module named extras
zuul#master:~/zuul/zuul$
Uncle Google didn't help.
How to find the missing dependency?
Open your command prompt and install extras using :
$ pip install extras
or
$ easy_install extras
The "extras" library suggested in the deleted answer:
https://pypi.python.org/pypi/extras/
did the job!

Categories

Resources