mpenning / ciscoconfparse

Parse, Audit, Query, Build, and Modify Arista / Cisco / Juniper / Palo Alto / F5 configurations.
http://www.pennington.net/py/ciscoconfparse/
GNU General Public License v3.0
793 stars 220 forks source link

Failed install of 1.2.40 with Python 3.5.2 #59

Closed pmona closed 7 years ago

pmona commented 8 years ago

I've tried to install this package with both 3.5.2 and 2.7 without success using PIP. I've also tried to load an older version, 1.2.38 but it also returns the same error. Python is new for me, so I'm sure I am probably missing something. This is running on a window7 box with cygwin.

This is what I get:

$ pip3 install --upgrade ciscoconfparse Collecting ciscoconfparse Using cached ciscoconfparse-1.2.40.tar.gz Complete output from command python setup.py egg_info: Traceback (most recent call last): File "", line 1, in File "C:\cygwin64\tmp\pip-build-q270j8sh\ciscoconfparse\setup.py", line 14, in from version_info.version import version as ccpversion File "c:\cygwin64\tmp\pip-build-q270j8sh\ciscoconfparse\version_infoinit.py", line 1, in from .version import * ImportError: No module named 'version_info.version'

----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in C:\cygwin64\tmp\pip-build-q270j8sh\ciscoconfparse\

Can anyone offer any help in resolving this install problem?

Thank you, Paul

XenonR commented 8 years ago

Hello @pmona , i don't see the point running python with cygwin. Why do you not use the "native" Python Build? I use ciscoconfpare with Python 2.7.11 on Windows 7 without problems.

Regards, Steffen

pmona commented 8 years ago

I do run the native build. I only use cygwin for the terminal. Running from a normal command prompt results in the same error:

C:\Python\Python35>pip3 install ciscoconfparse --upgrade Collecting ciscoconfparse Using cached ciscoconfparse-1.2.40.tar.gz Complete output from command python setup.py egg_info: Traceback (most recent call last): File "", line 1, in File "C:\Users\pmona\AppData\Local\Temp\pip-build-cvbz52lw\ciscoconfparse\ setup.py", line 14, in from version_info.version import version as ccpversion File "c:\users\pmona\appdata\local\temp\pip-build-cvbz52lw\ciscoconfparse\ version_infoinit.py", line 1, in from .version import * ImportError: No module named 'version_info.version'

----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in C:\Users\pmona\Ap pData\Local\Temp\pip-build-cvbz52lw\ciscoconfparse\

C:\Python\Python35>

XenonR commented 8 years ago

@pmona I did a fresh windows install, installed python 3.5.2 (32-bit) and everything works. But, please try to change the file contents of version_info/version.py to from ciscoconfparse.version import __version__, __version_tuple__ and try again.

Alternatively try the fork richardstrnad/ciscoconfparse it has the proposed modifiaction already build in.

C:\Users\servi\AppData\Local\Programs\Python\Python35-32>python.exe --version
Python 3.5.2

C:\Users\servi\AppData\Local\Programs\Python\Python35-32\Scripts>pip.exe install ciscoconfparse
Collecting ciscoconfparse
  Downloading ciscoconfparse-1.2.40.tar.gz (260kB)
    100% |################################| 266kB 936kB/s
Collecting ipaddress (from ciscoconfparse)
  Downloading ipaddress-1.0.16.tar.gz
Collecting dnspython3 (from ciscoconfparse)
  Downloading dnspython3-1.12.0.zip (226kB)
    100% |################################| 235kB 43kB/s
Collecting colorama (from ciscoconfparse)
  Downloading colorama-0.3.7-py2.py3-none-any.whl
Installing collected packages: ipaddress, dnspython3, colorama, ciscoconfparse
  Running setup.py install for ipaddress ... done
  Running setup.py install for dnspython3 ... done
  Running setup.py install for ciscoconfparse ... done
Successfully installed ciscoconfparse-1.2.40 colorama-0.3.7 dnspython3-1.12.0 ipaddress-1.0.16
pmona commented 8 years ago

Thank you -- that allowed me to install the package.

XenonR commented 8 years ago

Glad to help. :)