Doesn't install properly from PyPI
call opened this issue · 3 comments
Attempting to install from PyPI produces the following errors:
$ pip3 install bigquery-schema-generator
Collecting bigquery-schema-generator
Downloading bigquery-schema-generator-0.1.2.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/_q/d57c1qhn5fb9ng6ycg2_3sxc0000gp/T/pip-build-i66hkje9/bigquery-schema-generator/setup.py", line 5, in <module>
import pypandoc
ModuleNotFoundError: No module named 'pypandoc'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/_q/d57c1qhn5fb9ng6ycg2_3sxc0000gp/T/pip-build-i66hkje9/bigquery-schema-generator/
After installing pypandoc and trying again, I encountered this error:
pip3 install bigquery-schema-generator
The directory '/Users/call/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/Users/call/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting bigquery-schema-generator
Downloading bigquery-schema-generator-0.1.2.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/tmp/pip-build-mr9vuupc/bigquery-schema-generator/setup.py", line 6, in <module>
long_description = pypandoc.convert('README.md', 'rst')
File "/usr/local/lib/python3.6/site-packages/pypandoc/__init__.py", line 66, in convert
raise RuntimeError("Format missing, but need one (identified source as text as no "
RuntimeError: Format missing, but need one (identified source as text as no file with that name was found).
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/tmp/pip-build-mr9vuupc/bigquery-schema-generator/
I was able to work around this by cloning this repo, cd'ing into the local repo and installing via pip3 install .
, but it'd be great if this installed properly from PyPI.
Also, this is a much-needed utility. I'd previously been semi-solving this problem using wolverdude/genSON to infer a JSON schema, then converting that to BigQuery schema with some custom code, but this looks much more idiomatic. Looking forward to taking it for a spin. Thanks, and keep up the good work.
(Sorry for the delayed response, I'm seeing this just now. I thought GitHub would email me, but it didn't.)
Thanks for reporting the installation problems. This is my first submission to PyPI, so clearly I missed something. I'll try to fix this soon. Glad that you found this useful.
Took me a couple of tries, but I think I fixed the problem with v0.1.4 which I pushed to PyPI. This new setup.py no longer requires 'pypandoc' to be installed for the end user.
Tested on another Ubuntu machine:
$ sudo -H pip3 install bigquery-schema-generator
[sudo] password for brian:
Collecting bigquery-schema-generator
Downloading bigquery-schema-generator-0.1.4.tar.gz
Building wheels for collected packages: bigquery-schema-generator
Running setup.py bdist_wheel for bigquery-schema-generator ... done
Stored in directory: /root/.cache/pip/wheels/69/31/94/ad8badcbb5508c24cec90a7b0f0767e2e191a40869cad5a129
Successfully built bigquery-schema-generator
Installing collected packages: bigquery-schema-generator
Successfully installed bigquery-schema-generator-0.1.4
I've verified that the latest version on PyPI (v0.1.5) installs properly on MacOS 10.13.2 as well. I'm going to mark this as Fixed, but please reopen if there's a problem.