ickc / pantable

CSV Tables in Markdown: Pandoc Filter for CSV Tables
https://ickc.github.io/pantable/
BSD 3-Clause "New" or "Revised" License
86 stars 15 forks source link

setup.py: problem with conditionally installing backport.csv; upgrade setuptools #26

Closed ickc closed 3 years ago

ickc commented 7 years ago

Dump of the error for further investigation.

Note that while installing in a conda, python3 env., backport.csv is still installed.

And note the final error about setuptools

Collecting panflute (from -r common/pip.txt (line 1))
  Using cached panflute-1.10.5-py3-none-any.whl
Collecting pantable (from -r common/pip.txt (line 2))
  Downloading pantable-0.11-py3-none-any.whl
Collecting yaml2cli (from -r common/pip.txt (line 3))
  Using cached yaml2cli-0.5.1-py2.py3-none-any.whl
Collecting quaternionarray (from -r common/pip.txt (line 4))
Collecting pykg-config (from -r common/pip.txt (line 5))
Collecting future (from panflute->-r common/pip.txt (line 1))
Requirement already up-to-date: pyyaml in /usr/local/anaconda3/envs/all3-defaults/lib/python3.6/site-packages (from panflute->-r common/pip.txt (line 1))
Collecting shutilwhich (from panflute->-r common/pip.txt (line 1))
Collecting setuptools>=20.6.8 (from pantable->-r common/pip.txt (line 2))
  Downloading setuptools-36.2.7-py2.py3-none-any.whl (477kB)
    100% |████████████████████████████████| 481kB 1.5MB/s 
Collecting backports.csv (from pantable->-r common/pip.txt (line 2))
  Downloading backports.csv-1.0.5-py2.py3-none-any.whl
Collecting yamlordereddictloader (from yaml2cli->-r common/pip.txt (line 3))
  Using cached yamlordereddictloader-0.4.0.tar.gz
Building wheels for collected packages: yamlordereddictloader
  Running setup.py bdist_wheel for yamlordereddictloader ... done
  Stored in directory: ~/Library/Caches/pip/wheels/92/30/01/9a9fc94901b1de7c87e1779db660b84b37e2c411852ab172bd
Successfully built yamlordereddictloader
Installing collected packages: future, shutilwhich, panflute, setuptools, backports.csv, pantable, yamlordereddictloader, yaml2cli, quaternionarray, pykg-config
  Found existing installation: setuptools 27.2.0
    Uninstalling setuptools-27.2.0:
      Successfully uninstalled setuptools-27.2.0
Successfully installed backports.csv-1.0.5 future-0.16.0 panflute-1.10.5 pantable-0.11 pykg-config-1.3.0 quaternionarray-0.6.2 setuptools-36.2.7 shutilwhich-1.1.0 yaml2cli-0.5.1 yamlordereddictloader-0.4.0
Traceback (most recent call last):
  File "/usr/local/anaconda3/envs/all3-defaults/bin/pip", line 6, in <module>
    sys.exit(pip.main())
  File "/usr/local/anaconda3/envs/all3-defaults/lib/python3.6/site-packages/pip/__init__.py", line 249, in main
    return command.main(cmd_args)
  File "/usr/local/anaconda3/envs/all3-defaults/lib/python3.6/site-packages/pip/basecommand.py", line 252, in main
    pip_version_check(session)
  File "/usr/local/anaconda3/envs/all3-defaults/lib/python3.6/site-packages/pip/utils/outdated.py", line 102, in pip_version_check
    installed_version = get_installed_version("pip")
  File "/usr/local/anaconda3/envs/all3-defaults/lib/python3.6/site-packages/pip/utils/__init__.py", line 838, in get_installed_version
    working_set = pkg_resources.WorkingSet()
  File "/usr/local/anaconda3/envs/all3-defaults/lib/python3.6/site-packages/pip/_vendor/pkg_resources/__init__.py", line 644, in __init__
    self.add_entry(entry)
  File "/usr/local/anaconda3/envs/all3-defaults/lib/python3.6/site-packages/pip/_vendor/pkg_resources/__init__.py", line 700, in add_entry
    for dist in find_distributions(entry, True):
  File "/usr/local/anaconda3/envs/all3-defaults/lib/python3.6/site-packages/pip/_vendor/pkg_resources/__init__.py", line 1949, in find_eggs_in_zip
    if metadata.has_metadata('PKG-INFO'):
  File "/usr/local/anaconda3/envs/all3-defaults/lib/python3.6/site-packages/pip/_vendor/pkg_resources/__init__.py", line 1463, in has_metadata
    return self.egg_info and self._has(self._fn(self.egg_info, name))
  File "/usr/local/anaconda3/envs/all3-defaults/lib/python3.6/site-packages/pip/_vendor/pkg_resources/__init__.py", line 1823, in _has
    return zip_path in self.zipinfo or zip_path in self._index()
  File "/usr/local/anaconda3/envs/all3-defaults/lib/python3.6/site-packages/pip/_vendor/pkg_resources/__init__.py", line 1703, in zipinfo
    return self._zip_manifests.load(self.loader.archive)
  File "/usr/local/anaconda3/envs/all3-defaults/lib/python3.6/site-packages/pip/_vendor/pkg_resources/__init__.py", line 1643, in load
    mtime = os.stat(path).st_mtime
FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/anaconda3/envs/all3-defaults/lib/python3.6/site-packages/setuptools-27.2.0-py3.6.egg'
ickc commented 6 years ago

recipe to produce this problem that backport.csv is installed in Python 3:

$ conda create -n testing python=3 -y
$ pip install pantable
Collecting pantable
  Using cached pantable-0.11.1-py3-none-any.whl
Collecting backports.csv (from pantable)
  Using cached backports.csv-1.0.5-py2.py3-none-any.whl
Collecting panflute>=1.8.2 (from pantable)
  Using cached panflute-1.10.6-py3-none-any.whl
Collecting shutilwhich (from panflute>=1.8.2->pantable)
Collecting future (from panflute>=1.8.2->pantable)
Collecting pyyaml (from panflute>=1.8.2->pantable)
Installing collected packages: backports.csv, shutilwhich, future, pyyaml, panflute, pantable
Successfully installed backports.csv-1.0.5 future-0.16.0 panflute-1.10.6 pantable-0.11.1 pyyaml-3.12 shutilwhich-1.1.0

Note that Collecting backports.csv (from pantable).

ickc commented 6 years ago

@reenberg, do you have an idea why the backports.csv is installed under Python 3?

ickc commented 3 years ago

We don't support Python 2 now.