error message when installing pyodbc in a venv

Bug #1879080 reported by Jeff
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
python3-defaults (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

I have a fresh install of Ubuntu 20.04. I have the following packages installed:

python3-venv
python3-pip
python3-wheel
unixodbc-dev

If I run these commands:

python3 -m venv ./test_env
. ./test_env/bin/activate
pip3 install pyodbc

This is the output I get. The package does seem to install successfully, in spite of the fact that this is an error, not a warning.

Collecting pyodbc
  Downloading pyodbc-4.0.30.tar.gz (266 kB)
     |████████████████████████████████| 266 kB 3.5 MB/s
Building wheels for collected packages: pyodbc
  Building wheel for pyodbc (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /tmp/test_env/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-5uh1fr89/pyodbc/setup.py'"'"'; __file__='"'"'/tmp/pip-install-5uh1fr89/pyodbc/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-snlh9z0l
       cwd: /tmp/pip-install-5uh1fr89/pyodbc/
  Complete output (6 lines):
  usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: setup.py --help [cmd1 cmd2 ...]
     or: setup.py --help-commands
     or: setup.py cmd --help

  error: invalid command 'bdist_wheel'
  ----------------------------------------
  ERROR: Failed building wheel for pyodbc
  Running setup.py clean for pyodbc
Failed to build pyodbc
Installing collected packages: pyodbc
    Running setup.py install for pyodbc ... done
Successfully installed pyodbc-4.0.30

Note that I do not get this error if I install pyodbc outside the venv. Also, if I install it outside the venv FIRST, then pip will cache the wheel package and use it when installing in the venv, and I don't get the above error in that case.

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: python3 3.8.2-0ubuntu2
ProcVersionSignature: Ubuntu 5.4.0-29.33-generic 5.4.30
Uname: Linux 5.4.0-29-generic x86_64
ApportVersion: 2.20.11-0ubuntu27
Architecture: amd64
CasperMD5CheckResult: skip
CurrentDesktop: ubuntu:GNOME
Date: Sat May 16 10:14:28 2020
InstallationDate: Installed on 2020-05-16 (0 days ago)
InstallationMedia: Ubuntu 20.04 LTS "Focal Fossa" - Release amd64 (20200423)
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: python3-defaults
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Jeff (loy-aei1-h67) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in python3-defaults (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.