Comments (28)
please install:
psycopg2==2.6.1
sqlalchemy-redshift==0.4.0
SQLAlchemy==1.0.9
from sqlalchemy-redshift.
I too encountered this issue when installed via conda install
within a conda env. After hours of struggling, I ended up using postgresql+psycopg2
from sqlalchemy-redshift.
I tried 0.4.0, then I got:
engine = create_engine('redshift+psycopg2://{}:{}@{}'.format(username, password, url))
File "/opt/project/env/local/lib/python2.7/site-packages/sqlalchemy/engine/init.py", line 332, in create_engine
return strategy.create(_args, *_kwargs)
File "/opt/project/env/local/lib/python2.7/site-packages/sqlalchemy/engine/strategies.py", line 50, in create
dialect_cls = u.get_dialect()
File "/opt/project/env/local/lib/python2.7/site-packages/sqlalchemy/engine/url.py", line 107, in get_dialect
cls = registry.load(name)
File "/opt/project/env/local/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.py", line 89, in load
return self.implsname
File "/opt/project/env/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/pkg_resources.py", line 1988, in load
if require: self.require(env, installer)
File "/opt/project/env/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/pkg_resources.py", line 2001, in require
working_set.resolve(self.dist.requires(self.extras),env,installer))
File "/opt/project/env/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/pkg_resources.py", line 584, in resolve
raise DistributionNotFound(req)
DistributionNotFound: SQLAlchemy>=0.8.0
from sqlalchemy-redshift.
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)
from sqlalchemy-redshift.
can you post a Vagrantfile that repeats the problem? Or give me SSH on the box
from sqlalchemy-redshift.
Do you mean my box's vagrant config?
from sqlalchemy-redshift.
yeah
from sqlalchemy-redshift.
-- mode: ruby --
vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "PROJECT"
config.vm.box_url = "https://mycomputer.com/vagrant/PROJECT.json"
config.vm.box_download_insecure = true
config.vm.hostname = "project"
config.vm.network "forwarded_port", guest: 123, host: 1123
config.vm.network "forwarded_port", guest: 2333, host: 2333
config.vm.box_check_update = false
config.vm.synced_folder "../project_web", "/opt/project/project_web"
config.vm.provider "virtualbox" do |vb|
# Display the VirtualBox GUI when booting the machine
vb.gui = true
# Customize the amount of memory on the VM:
vb.memory = "2048"
end
end
from sqlalchemy-redshift.
Can you publish the repo including provisioning scripts
from sqlalchemy-redshift.
I am sorry, I cannot publish the repo, and I don't think they provide provisioning scripts yet :(
from sqlalchemy-redshift.
Could you please suggest that needed to be included when doing vagrant provisioning? I didn't find a provisioning script anywhere yet.
from sqlalchemy-redshift.
Do you think I need to add any postgresql related package on the vagrant?
from sqlalchemy-redshift.
I don't know, can you create and post a new Vagrant image that replicates the problem?
from sqlalchemy-redshift.
Thanks @graingert, now we switched to use postgresql directly, and it's working. Sorry I cannot provide the vagrant image :(
from sqlalchemy-redshift.
I don't mean your current Vagrant image, I mean a minimal version that reproduces the problem
from sqlalchemy-redshift.
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!
from sqlalchemy-redshift.
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 vagrant up
and replicate your problem.
from sqlalchemy-redshift.
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
psycopg2==2.6.1
SQLAlchemy==1.0.9
sqlalchemy-redshift==0.4.0
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)
NoSuchModuleError Traceback (most recent call last)
<ipython-input-4-e58bd282584a> in <module>()
----> 1 create_engine(db_connect_url)
/Users/change/work/test/venv/lib/python2.7/site-packages/sqlalchemy/engine/__init__.pyc in create_engine(*args, **kwargs)
384 strategy = kwargs.pop('strategy', default_strategy)
385 strategy = strategies.strategies[strategy]
--> 386 return strategy.create(*args, **kwargs)
387
388
/Users/change/work/test/venv/lib/python2.7/site-packages/sqlalchemy/engine/strategies.pyc in create(self, name_or_url, **kwargs)
49 u = url.make_url(name_or_url)
50
---> 51 entrypoint = u._get_entrypoint()
52 dialect_cls = entrypoint.get_dialect_cls(u)
53
/Users/change/work/test/venv/lib/python2.7/site-packages/sqlalchemy/engine/url.pyc in _get_entrypoint(self)
129 else:
130 name = self.drivername.replace('+', '.')
--> 131 cls = registry.load(name)
132 # check for legacy dialects that
133 # would return a module with 'dialect' as the
/Users/change/work/test/venv/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyc in load(self, name)
203 raise exc.NoSuchModuleError(
204 "Can't load plugin: %s:%s" %
--> 205 (self.group, name))
206
207 def register(self, name, modulepath, objname):
NoSuchModuleError: Can't load plugin: sqlalchemy.dialects:redshift.psycopg2
from sqlalchemy-redshift.
I ended up using 'postgresql+psycopg2' directly.
On Fri, Apr 8, 2016 at 4:43 PM, Paul Minton [email protected]
wrote:
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.7psycopg2==2.6.1
SQLAlchemy==1.0.9
sqlalchemy-redshift==0.4.0from sqlalchemy.engine import url as sa_urlfrom 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)NoSuchModuleError Traceback (most recent call last)
in ()
----> 1 create_engine(db_connect_url)/Users/change/work/test/venv/lib/python2.7/site-packages/sqlalchemy/engine/init.pyc in create_engine(_args, *_kwargs)
384 strategy = kwargs.pop('strategy', default_strategy)
385 strategy = strategies.strategies[strategy]
--> 386 return strategy.create(_args, *_kwargs)
387
388/Users/change/work/test/venv/lib/python2.7/site-packages/sqlalchemy/engine/strategies.pyc in create(self, name_or_url, **kwargs)
49 u = url.make_url(name_or_url)
50
---> 51 entrypoint = u._get_entrypoint()
52 dialect_cls = entrypoint.get_dialect_cls(u)
53/Users/change/work/test/venv/lib/python2.7/site-packages/sqlalchemy/engine/url.pyc in _get_entrypoint(self)
129 else:
130 name = self.drivername.replace('+', '.')
--> 131 cls = registry.load(name)
132 # check for legacy dialects that
133 # would return a module with 'dialect' as the/Users/change/work/test/venv/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyc in load(self, name)
203 raise exc.NoSuchModuleError(
204 "Can't load plugin: %s:%s" %
--> 205 (self.group, name))
206
207 def register(self, name, modulepath, objname):NoSuchModuleError: Can't load plugin: sqlalchemy.dialects:redshift.psycopg2
—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#68 (comment)
from sqlalchemy-redshift.
I know that's an option but I'm looking to use some of the
redshift-specific commands (copy, unload, etc).
On Fri, Apr 8, 2016 at 4:46 PM, ziziermao [email protected] wrote:
I ended up using 'postgresql+psycopg2' directly.
On Fri, Apr 8, 2016 at 4:43 PM, Paul Minton [email protected]
wrote: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.7psycopg2==2.6.1
SQLAlchemy==1.0.9
sqlalchemy-redshift==0.4.0from sqlalchemy.engine import url as sa_urlfrom 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)NoSuchModuleError Traceback (most recent call last)
in ()
----> 1 create_engine(db_connect_url)/Users/change/work/test/venv/lib/python2.7/site-packages/sqlalchemy/engine/init.pyc
in create_engine(_args, *_kwargs)
384 strategy = kwargs.pop('strategy', default_strategy)
385 strategy = strategies.strategies[strategy]
--> 386 return strategy.create(_args, *_kwargs)
387
388/Users/change/work/test/venv/lib/python2.7/site-packages/sqlalchemy/engine/strategies.pyc
in create(self, name_or_url, **kwargs)
49 u = url.make_url(name_or_url)
50
---> 51 entrypoint = u._get_entrypoint()
52 dialect_cls = entrypoint.get_dialect_cls(u)
53/Users/change/work/test/venv/lib/python2.7/site-packages/sqlalchemy/engine/url.pyc
in _get_entrypoint(self)
129 else:
130 name = self.drivername.replace('+', '.')
--> 131 cls = registry.load(name)
132 # check for legacy dialects that
133 # would return a module with 'dialect' as the/Users/change/work/test/venv/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyc
in load(self, name)
203 raise exc.NoSuchModuleError(
204 "Can't load plugin: %s:%s" %
--> 205 (self.group, name))
206
207 def register(self, name, modulepath, objname):NoSuchModuleError: Can't load plugin:
sqlalchemy.dialects:redshift.psycopg2—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
<
#68 (comment)—
You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#68 (comment)
from sqlalchemy-redshift.
Had this problem locally with
Flask-SQLAlchemy (2.1)
psycopg2 (2.6.2)
SQLAlchemy (1.1.5)
sqlalchemy-redshift (0.5.0)
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.
from sqlalchemy-redshift.
please do no pip install sqlalchemy-redshift globally
from sqlalchemy-redshift.
closing this until I get a docker or VM image that reproduces the issue.
from sqlalchemy-redshift.
Also ran into this using anaconda 4.3.14, Python 2.7, Linux. Had to give up and use postgresql+psycopg2
directly as suggested above.
(Sorry, not able to provide docker/VM image. Posting to signal boost the postgresql+psycopg2
alternative.)
from sqlalchemy-redshift.
using:postgresql+psycopg2 is throwing error:ModuleNotFoundError: No module named 'MySQLdb'
with version:
psycopg2==2.7.3.1
sqlalchemy==1.1.15
sqlalchemy-redshift== 0.7.0
And if I am using: db+postgresql then error:sqlalchemy.exc.NoSuchModuleError: Can't load plugin: sqlalchemy.dialects:db.postgresql
from sqlalchemy-redshift.
@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.
from sqlalchemy-redshift.
I too encountered this error. Occurs if you are using a conda env. If you install it on the default env it works.
from sqlalchemy-redshift.
@GuSuku @Ic3fr0g etc, again I need a reproducible example to be able to fix this. eg a github repo connected to travis, a Docker image or a Vagrantfile/vm image
from sqlalchemy-redshift.
Related Issues (20)
- Drop support for EOL versions of python HOT 2
- support sqlalchemy 2.0 HOT 23
- Use bind parameters
- Update project CI
- Regression causing errors during reflection for 1.4 FutureEngine HOT 5
- Log handler added in v0.8.13 produces duplicate logs in application
- Regression in v0.8.13: table reflection broken for non-superusers HOT 2
- Do not run integration tests with dbuser having elevated permissions HOT 1
- Migration error: 'Relation "alembic_version" already exists'
- Alembic migration issue: alter table
- Alembic migrations use RETURNING on update
- Performance degradation and memory peaks when updating from 0.8.12
- Class method needs updating HOT 1
- Table Reflection Slowness
- Temp Table Reflection
- Programming Error with percentile_cont HOT 1
- statements save OIDs unless commited
- Proposal: Remove pkg_resources from the fast path
- Any way to support sqlalchemy >= 2.0? HOT 3
- util.text_type issue HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sqlalchemy-redshift.