Skip to content
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

Unable to Install Pyodbc while creating AWS EMR Cluster Bootstrapping. #735

Closed
SarathPuppala opened this issue Apr 6, 2020 · 3 comments
Closed

Comments

@SarathPuppala
Copy link

SarathPuppala commented Apr 6, 2020

Environment

Instance Hardware Details: AWS|EMR|x86_64|Linux

  • Python: 3
  • pyodbc: 4.0.27
  • OS: EC2 Instance (m4.large)
  • DB: MSSQL
  • driver: {SQL Server}

Issue

"observed behavior"

sudo: apt-get: command not found
sudo: apt-get: command not found
WARNING: Running pip install with root privileges is generally not a good idea. Try __main__.py install --user instead.
WARNING: Running pip install with root privileges is generally not a good idea. Try __main__.py install --user instead.
Could not find a version that satisfies the requirement json (from versions: )
No matching distribution found for json
WARNING: Running pip install with root privileges is generally not a good idea. Try __main__.py install --user instead.
WARNING: Running pip install with root privileges is generally not a good idea. Try __main__.py install --user instead.
Command "/bin/python3 -u -c "import setuptools, tokenize;file='/mnt/tmp/pip-build-9cp7ycb5/pyodbc/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-6sa0p0ud-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /mnt/tmp/pip-build-9cp7ycb5/pyodbc/

Following is the Snapshot of my Bootstrap file:

sudo apt-get install build-essential libssl-dev libffi-dev python3-dev
sudo apt-get install unixodbc-dev
sudo python3 -m pip install pandas
sudo python3 -m pip install json
sudo python3 -m pip install boto3
sudo pip install pyodbc==4.0.27

Also I tried with

sudo -H pip install pyodbc
sudo apt-get install python3-dev
sudo apt-get install unixodbc-dev

I referred following issues to solve my problem, but I could find a solution.

#275
#276

@mkleehammer Please assist me on this.

@v-chojas
Copy link
Contributor

v-chojas commented Apr 6, 2020

Your "OS" looks more like a VM size. That field is for specifying whether you're using Windows, Linux or Mac, and which specific version of the OS. Judging by the commands you are attempting as if it is a Ubuntu/Debian but the lack of apt-get suggests it is not. Figure out which OS you are using and the commands to install packages on it, and that may solve your problem.

@thekomx
Copy link

thekomx commented Jan 14, 2021

Try this:

sudo yum install gcc-c++
sudo yum install python3-devel
sudo yum install unixODBC-devel
sudo pip install pyodbc

@keitherskine
Copy link
Collaborator

Closed due to inactivity. Feel free to re-open with current information if necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants