-
Notifications
You must be signed in to change notification settings - Fork 142
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
NoSuchModuleError: Can't load plugin: sqlalchemy.dialects:redshift.psycopg2 #68
Comments
please install:
|
I tried 0.4.0, then I got: |
FYI you should create URL objects: from sqlalchemy.engine import url as sa_url
db_connect_url = sa_url.URL(
drivername='redshift+psycopg2',
username=username,
password=password,
host=config['host'],
port=config['port'],
database=config.get('database'),
)
create_engine(db_connect_url) |
can you post a Vagrantfile that repeats the problem? Or give me SSH on the box |
Do you mean my box's vagrant config? |
yeah |
-- mode: ruby --vi: set ft=ruby :Vagrant.configure(2) do |config| config.vm.box_check_update = falseconfig.vm.synced_folder "../project_web", "/opt/project/project_web" config.vm.provider "virtualbox" do |vb| # Display the VirtualBox GUI when booting the machinevb.gui = true# Customize the amount of memory on the VM:
end |
Can you publish the repo including provisioning scripts |
I am sorry, I cannot publish the repo, and I don't think they provide provisioning scripts yet :( |
Could you please suggest that needed to be included when doing vagrant provisioning? I didn't find a provisioning script anywhere yet. |
Do you think I need to add any postgresql related package on the vagrant? |
I don't know, can you create and post a new Vagrant image that replicates the problem? |
Thanks @graingert, now we switched to use postgresql directly, and it's working. Sorry I cannot provide the vagrant image :( |
I don't mean your current Vagrant image, I mean a minimal version that reproduces the problem |
I will try to find a mini version. So far I am not sure where they keep the vagrant images. Thanks so much for helping! |
Sorry I don't mean that you should send me your actual vagrant images, I'd just like you to create a new Vagrant project so I can |
I'm running into the same issue and I'm wondering if there's been any progress here. I'm on OSX running python version 2.7
from sqlalchemy.engine import url as sa_url
from sqlalchemy import create_engine
db_connect_url = sa_url.URL(
drivername='redshift+psycopg2',
username='username',
password='password',
host='host',
port=port,
database='db',
)
create_engine(db_connect_url)
|
I ended up using 'postgresql+psycopg2' directly. On Fri, Apr 8, 2016 at 4:43 PM, Paul Minton notifications@github.com
|
I know that's an option but I'm looking to use some of the On Fri, Apr 8, 2016 at 4:46 PM, ziziermao notifications@github.com wrote:
|
Had this problem locally with
After some search, saw someone mention something about installing globally instead of virtualenv. And when I did install sqlalchemy-redshift globally, it worked just fine. |
please do no pip install sqlalchemy-redshift globally |
closing this until I get a docker or VM image that reproduces the issue. |
Also ran into this using anaconda 4.3.14, Python 2.7, Linux. Had to give up and use (Sorry, not able to provide docker/VM image. Posting to signal boost the |
using:postgresql+psycopg2 is throwing error:ModuleNotFoundError: No module named 'MySQLdb' |
@jaaved please don't co-opt other issues that are irrelevant to your problem. I can't resolve the issue without instructions on how to reproduce it. |
I too encountered this error. Occurs if you are using a conda env. If you install it on the default env it works. |
I too encountered this issue when installed via |
I am trying to connect to redshift from my python code. my pip installed:
psycopg2==2.6.1
redshift-sqlalchemy==0.4.1
SQLAlchemy==1.0.9
and my virtual machine(ubuntu) has:
libpq-dev
python-psycopg2
But I am still getting
engine = create_engine('redshift+psycopg2://{}:{}@{}'.format(username, password, url))
File "/opt/project/env/local/lib/python2.7/site-packages/sqlalchemy/engine/init.py", line 386, in create_engine
return strategy.create(args, *kwargs)
File "/opt/project/env/local/lib/python2.7/site-packages/sqlalchemy/engine/strategies.py", line 51, in create
entrypoint = u._get_entrypoint()
File "/opt/project/env/local/lib/python2.7/site-packages/sqlalchemy/engine/url.py", line 131, in _get_entrypoint
cls = registry.load(name)
File "/opt/project/env/local/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.py", line 205, in load
(self.group, name))
NoSuchModuleError: Can't load plugin: sqlalchemy.dialects:redshift.psycopg2
I tried SQLAlchemy version 0.8.0, but doesn't work either.
With the same config, I am able to run from my laptop (mac), but on linux, I guess some packages still missing? Any suggestion will be appreciated, thanks!
The text was updated successfully, but these errors were encountered: