mpastell / Pweave

Pweave is a scientific report generator and a literate programming tool for Python. It can capture the results and plots from data analysis and works well with numpy, scipy and matplotlib.
http://mpastell.com/pweave
Other
435 stars 64 forks source link

pip install Pweave hits a configparser.DuplicateOptionError #25

Closed g2boojum closed 7 years ago

g2boojum commented 9 years ago

I'm not sure what has changed, but pip is now failing to install the Pweave scripts. I've included the traceback below, but apparently configparser lower-cases keys (I found the error mentioned at http://www.gilesorr.com/blog/python-3-configparser.html), and so Ptangle and ptangle look the same to it and they collide. Running "python setup.py install" works just fine, so presumably the bug is in pip, not in Pweave. That said, pip is failing to correctly install Pweave....

$ pip install Pweave
Collecting Pweave
Installing collected packages: Pweave
Exception:
Traceback (most recent call last):
  File "/home/grant/Envs/py34test/lib/python3.4/site-packages/pip/basecommand.py", line 211, in main
    status = self.run(options, args)
  File "/home/grant/Envs/py34test/lib/python3.4/site-packages/pip/commands/install.py", line 311, in run
    root=options.root_path,
  File "/home/grant/Envs/py34test/lib/python3.4/site-packages/pip/req/req_set.py", line 646, in install
    **kwargs
  File "/home/grant/Envs/py34test/lib/python3.4/site-packages/pip/req/req_install.py", line 803, in install
    self.move_wheel_files(self.source_dir, root=root)
  File "/home/grant/Envs/py34test/lib/python3.4/site-packages/pip/req/req_install.py", line 998, in move_wheel_files
    isolated=self.isolated,
  File "/home/grant/Envs/py34test/lib/python3.4/site-packages/pip/wheel.py", line 345, in move_wheel_files
    console, gui = get_entrypoints(ep_file)
  File "/home/grant/Envs/py34test/lib/python3.4/site-packages/pip/wheel.py", line 225, in get_entrypoints
    cp.readfp(data)
  File "/usr/lib64/python3.4/configparser.py", line 736, in readfp
    self.read_file(fp, source=filename)
  File "/usr/lib64/python3.4/configparser.py", line 691, in read_file
    self._read(f, source)
  File "/usr/lib64/python3.4/configparser.py", line 1070, in _read
    fpname, lineno)
configparser.DuplicateOptionError: While reading from '<???>' [line  4]: option 'ptangle' in section 'console_scripts' already exists

I ran this using a fresh python 3.4 virtualenv:

$ pip list
pip (7.1.2)
Pweave (0.23)
setuptools (18.2)
wheel (0.24.0)

Pweave does apparently get installed, albeit without the scripts, despite the pip failure.

mpastell commented 8 years ago

There seems to be a fix coming to pip: https://github.com/pypa/pip/pull/3324

stefanv commented 8 years ago

Latest pip works fine. Amend the comment in the docs to no longer warn against using pip?

ndvanforeest commented 7 years ago

While trying to install the latest pweave (0.30.1) I just ran into this message too. To solve it, I deleted the pweave directory:

nicky@chuck:/usr/local/lib/python3.5/dist-packages$ sudo rm -rf Pweave-0.2*

and I also removes Pweave and Ptangle in /usr/local/bin. After this, pip3 install worked without problem.

Might the pip3 install files for Pweave not be completely correct?

BTW: thanks for the great work.

mpastell commented 7 years ago

pip fails uinstalling 0.25, but uninstalling 0.30 will work. Uppercase version of pweave and ptangle were removed from 0.30 to prevent this error.