Python Forum
New to python : need to install hwcounter
Thread Rating:
  • 2 Vote(s) - 4.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
New to python : need to install hwcounter
#1
Hi,

I'm new to python.

I have successfully got running a serial port read and write program communicating with another computer.

So, I need to install hwCounter.

It seems I need Visual C++ - so I've installed Visual Studio Build Tools 2017 and Visual Studio Community 2017. Not sure that I need both.

When I use pip install hwCounter I get :
Collecting hwCounter
  Using cached https://files.pythonhosted.org/packages/83/8d/855522fe8beb584e7ce748e551122943607655628c7a4a1be0270e2d8c07/hwcounter-0.1.1.tar.gz
Installing collected packages: hwCounter
  Running setup.py install for hwCounter ... error
    Complete output from command C:\Users\Sue\AppData\Local\Programs\Python\Python35-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Sue\\AppData\\Local\\Temp\\pip-install-08yo_2rf\\hwCounter\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\Sue\AppData\Local\Temp\pip-record-rhq2xjzf\install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_ext
    building 'hwcounter' extension
    creating build
    creating build\temp.win32-3.5
    creating build\temp.win32-3.5\Release
    C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\Sue\AppData\Local\Programs\Python\Python35-32\include -IC:\Users\Sue\AppData\Local\Programs\Python\Python35-32\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" /Tchwcounter.c /Fobuild\temp.win32-3.5\Release\hwcounter.obj
    hwcounter.c
    hwcounter.c(31): error C2061: syntax error: identifier 'hwcounter_measure_overhead'
    hwcounter.c(31): error C2059: syntax error: ';'
    hwcounter.c(31): error C2059: syntax error: '<parameter-list>'
    hwcounter.c(50): error C2065: 'uint64_t': undeclared identifier
    hwcounter.c(50): error C2146: syntax error: missing ';' before identifier 'ts'
    hwcounter.c(50): error C2065: 'ts': undeclared identifier
    hwcounter.c(54): error C2065: 'uint32_t': undeclared identifier
    hwcounter.c(54): error C2146: syntax error: missing ';' before identifier 'count_high'
    hwcounter.c(54): error C2065: 'count_high': undeclared identifier
    hwcounter.c(54): error C2065: 'count_low': undeclared identifier
    hwcounter.c(54): error C2065: 'asm': undeclared identifier
    hwcounter.c(54): error C2143: syntax error: missing ';' before 'volatile'
    hwcounter.c(54): error C2065: 'ts': undeclared identifier
    hwcounter.c(54): error C2065: 'uint64_t': undeclared identifier
    hwcounter.c(54): error C2146: syntax error: missing ')' before identifier 'count_high'
    hwcounter.c(54): error C2059: syntax error: ')'
    hwcounter.c(55): error C2065: 'ts': undeclared identifier
    hwcounter.c(61): error C2065: 'uint64_t': undeclared identifier
    hwcounter.c(61): error C2146: syntax error: missing ';' before identifier 'ts'
    hwcounter.c(61): error C2065: 'ts': undeclared identifier
    hwcounter.c(65): error C2065: 'uint32_t': undeclared identifier
    hwcounter.c(65): error C2146: syntax error: missing ';' before identifier 'count_high'
    hwcounter.c(65): error C2065: 'count_high': undeclared identifier
    hwcounter.c(65): error C2065: 'count_low': undeclared identifier
    hwcounter.c(65): error C2065: 'asm': undeclared identifier
    hwcounter.c(65): error C2143: syntax error: missing ';' before 'volatile'
    hwcounter.c(65): error C2065: 'ts': undeclared identifier
    hwcounter.c(65): error C2065: 'uint64_t': undeclared identifier
    hwcounter.c(65): error C2146: syntax error: missing ')' before identifier 'count_high'
    hwcounter.c(65): error C2059: syntax error: ')'
    hwcounter.c(66): error C2065: 'ts': undeclared identifier
    hwcounter.c(71): error C2061: syntax error: identifier 'uint64_t'
    hwcounter.c(72): error C2061: syntax error: identifier 'overhead'
    hwcounter.c(72): error C2059: syntax error: ';'
    hwcounter.c(73): error C2061: syntax error: identifier 'cycles'
    hwcounter.c(73): error C2059: syntax error: ';'
    hwcounter.c(74): error C2059: syntax error: '}'
    hwcounter.c(77): error C2143: syntax error: missing ')' before '*'
    hwcounter.c(77): error C2143: syntax error: missing '{' before '*'
    hwcounter.c(77): error C2059: syntax error: ')'
    hwcounter.c(78): error C2054: expected '(' to follow 'self'
    hwcounter.c(85): error C2065: 'hwcounter_Timer': undeclared identifier
    hwcounter.c(85): error C2065: 't': undeclared identifier
    hwcounter.c(85): warning C4552: '*': operator has no effect; expected operator with side-effect
    hwcounter.c(87): error C2065: 't': undeclared identifier
    hwcounter.c(87): error C2065: 'hwcounter_Timer': undeclared identifier
    hwcounter.c(87): error C2059: syntax error: ')'
    hwcounter.c(88): error C2065: 't': undeclared identifier
    hwcounter.c(88): warning C4047: '!=': 'int' differs in levels of indirection from 'void *'
    hwcounter.c(89): error C2065: 't': undeclared identifier
    hwcounter.c(89): error C2223: left of '->t0' must point to struct/union
    hwcounter.c(90): error C2065: 't': undeclared identifier
    hwcounter.c(90): error C2223: left of '->overhead' must point to struct/union
    hwcounter.c(91): error C2065: 't': undeclared identifier
    hwcounter.c(91): error C2223: left of '->cycles' must point to struct/union
    hwcounter.c(94): error C2065: 't': undeclared identifier
    hwcounter.c(100): error C2065: 'hwcounter_Timer': undeclared identifier
    hwcounter.c(100): error C2065: 'timer': undeclared identifier
    hwcounter.c(100): error C2059: syntax error: ')'
    hwcounter.c(102): error C2065: 'timer': undeclared identifier
    hwcounter.c(102): error C2223: left of '->overhead' must point to struct/union
    hwcounter.c(102): warning C4013: 'hwcounter_measure_overhead' undefined; assuming extern returning int
    hwcounter.c(103): error C2065: 'uint32_t': undeclared identifier
    hwcounter.c(103): error C2146: syntax error: missing ';' before identifier 'count_high'
    hwcounter.c(103): error C2065: 'count_high': undeclared identifier
    hwcounter.c(103): error C2065: 'count_low': undeclared identifier
    hwcounter.c(103): error C2065: 'asm': undeclared identifier
    hwcounter.c(103): error C2143: syntax error: missing ';' before 'volatile'
    hwcounter.c(103): error C2065: 'timer': undeclared identifier
    hwcounter.c(103): error C2223: left of '->t0' must point to struct/union
    hwcounter.c(103): error C2065: 'uint64_t': undeclared identifier
    hwcounter.c(103): error C2146: syntax error: missing ')' before identifier 'count_high'
    hwcounter.c(103): error C2059: syntax error: ')'
    hwcounter.c(111): error C2065: 'uint64_t': undeclared identifier
    hwcounter.c(111): error C2146: syntax error: missing ';' before identifier 'ts'
    hwcounter.c(111): error C2065: 'ts': undeclared identifier
    hwcounter.c(112): error C2065: 'hwcounter_Timer': undeclared identifier
    hwcounter.c(112): error C2065: 'timer': undeclared identifier
    hwcounter.c(112): error C2059: syntax error: ')'
    hwcounter.c(115): error C2065: 'uint32_t': undeclared identifier
    hwcounter.c(115): error C2146: syntax error: missing ';' before identifier 'count_high'
    hwcounter.c(115): error C2065: 'count_high': undeclared identifier
    hwcounter.c(115): error C2065: 'count_low': undeclared identifier
    hwcounter.c(115): error C2065: 'asm': undeclared identifier
    hwcounter.c(115): error C2143: syntax error: missing ';' before 'volatile'
    hwcounter.c(115): error C2065: 'ts': undeclared identifier
    hwcounter.c(115): error C2065: 'uint64_t': undeclared identifier
    hwcounter.c(115): error C2146: syntax error: missing ')' before identifier 'count_high'
    hwcounter.c(115): error C2059: syntax error: ')'
    hwcounter.c(116): error C2065: 'timer': undeclared identifier
    hwcounter.c(116): error C2223: left of '->cycles' must point to struct/union
    hwcounter.c(116): error C2065: 'ts': undeclared identifier
    hwcounter.c(116): error C2223: left of '->t0' must point to struct/union
    hwcounter.c(116): error C2223: left of '->overhead' must point to struct/union
    hwcounter.c(117): error C2065: 'timer': undeclared identifier
    hwcounter.c(117): error C2223: left of '->t0' must point to struct/union
    hwcounter.c(117): error C2223: left of '->overhead' must point to struct/union
    hwcounter.c(123): error C2065: 'hwcounter_Timer': undeclared identifier
    hwcounter.c(123): error C2059: syntax error: ')'
    hwcounter.c(125): error C2059: syntax error: '}'
    hwcounter.c(136): error C2065: 'hwcounter_Timer': undeclared identifier
    hwcounter.c(138): error C2065: 'hwcounter_Timer_dealloc': undeclared identifier
    hwcounter.c(133): error C2099: initializer is not a constant
    hwcounter.c(133): warning C4047: 'initializing': 'PyBufferProcs *' differs in levels of indirection from 'unsigned long'
    hwcounter.c(133): warning C4047: 'initializing': 'unsigned long' differs in levels of indirection from 'char [51]'
    hwcounter.c(133): warning C4047: 'initializing': 'iternextfunc' differs in levels of indirection from 'PyMethodDef *'
    hwcounter.c(133): warning C4133: 'initializing': incompatible types - from 'PyMemberDef *' to 'PyMethodDef *'
    hwcounter.c(133): warning C4113: 'PyObject *(__cdecl *)(PyTypeObject *,PyObject *,PyObject *)' differs in parameter lists from 'allocfunc'
    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\cl.exe' failed with exit status 2

    ----------------------------------------
Command "C:\Users\Sue\AppData\Local\Programs\Python\Python35-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Sue\\AppData\\Local\\Temp\\pip-install-08yo_2rf\\hwCounter\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\Sue\AppData\Local\Temp\pip-record-rhq2xjzf\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\Sue\AppData\Local\Temp\pip-install-08yo_2rf\hwCounter\
Can anyone help be understand what I'm doing wrong.

Sue.
Reply


Messages In This Thread
New to python : need to install hwcounter - by suedownhill - Jan-13-2019, 02:27 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020