Telecominfraproject / oopt-gnpy

Optical Route Planning Library, Based on a Gaussian Noise Model
http://telecominfraproject.com
BSD 3-Clause "New" or "Revised" License
198 stars 87 forks source link

release version on PyPI out of date #402

Closed CarlZhang-HUST closed 3 years ago

CarlZhang-HUST commented 3 years ago

Describe the bug Current version(v2.2) on PyPI still has this bug, even though the source code on GitHub has been fixed.

To Reproduce Steps to reproduce the behavior:

conda create -n gnpy_new python=3.7 -y
conda activate gnpy_new
pip install gnpy
gnpy-transmission-example -pl

Expected behavior

Traceback (most recent call last):
  File ".conda\envs\gnpy_new\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File ".conda\envs\gnpy_new\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File ".conda\envs\gnpy_new\Scripts\gnpy-transmission-example.exe\__main__.py", line 7, in <module>
  File ".conda\envs\gnpy_new\lib\site-packages\gnpy\tools\cli_examples.py", line 129, in transmission_main_example
    plot_baseline(network)
  File ".conda\envs\gnpy_new\lib\site-packages\gnpy\tools\plots.py", line 29, in plot_baseline
    plot = draw_networkx_nodes(network, nodelist=network.nodes(), node_color='#ababab', **kwargs)
TypeError: draw_networkx_nodes() got an unexpected keyword argument 'figure'

Environment:

jktjkt commented 3 years ago

Hello, sorry for the inconvenience. We regularly close bugreports once a fix have hit the master branch. The next release is scheduled to happen before OFC 2021 and it will include a fix for this problem. In the meanwhile, you can downgrade the networkx package via something like:

$ pip install --force-reinstall 'networkx==2.4'

BTW, the release-after-the-next-one will start requiring Python 3.8. Do you have a specific reason to be sticking with Python 3.7?

CarlZhang-HUST commented 3 years ago

Thanks a lot. I have managed it with pip install --editable . from the master branch, and the problem has been solved. I have no specific reason to use python=3.7. The only probable reason is that I worry about the compatibility of the lastest python release.