kahne / fastwer

A PyPI package for fast word/character error rate (WER/CER) calculation
MIT License
67 stars 14 forks source link

package init file 'src/__init__.py' not found (or not a regular file) #1

Closed VictorAtPL closed 3 years ago

VictorAtPL commented 3 years ago

When I try to install your package, I get following logs:

  Building wheel for fastwer (setup.py): started
  Building wheel for fastwer (setup.py): finished with status 'error'
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-9ycgx467/fastwer/setup.py'"'"'; __file__='"'"'/tmp/pip-install-9ycgx467/fastwer/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-u5ooap27
       cwd: /tmp/pip-install-9ycgx467/fastwer/
  Complete output (18 lines):
  running bdist_wheel
  running build
  running build_py
  package init file 'src/__init__.py' not found (or not a regular file)
  running build_ext
  creating tmp
  x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.6m -c /tmp/tmp6skrj6ig.cpp -o tmp/tmp6skrj6ig.o -std=c++17
  x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.6m -c /tmp/tmpioypszq6.cpp -o tmp/tmpioypszq6.o -fvisibility=hidden
  building 'fastwer' extension
  creating build
  creating build/temp.linux-x86_64-3.6
  creating build/temp.linux-x86_64-3.6/src
  x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include -I/usr/include -I/usr/include/python3.6m -c src/fastwer.cpp -o build/temp.linux-x86_64-3.6/src/fastwer.o -DVERSION_INFO="0.1.3" -std=c++17 -fvisibility=hidden
  x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include -I/usr/include -I/usr/include/python3.6m -c src/bindings.cpp -o build/temp.linux-x86_64-3.6/src/bindings.o -DVERSION_INFO="0.1.3" -std=c++17 -fvisibility=hidden
  src/bindings.cpp:9:16: error: expected constructor, destructor, or type conversion before ‘(’ token
   PYBIND11_MODULE(fastwer, m) {
                  ^
  error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for fastwer
  Running setup.py clean for fastwer
kahne commented 3 years ago

Thanks for reporting the issue. Can you share your command line for this? I cannot replicate this error via pip install nor setup.py.

kahne commented 3 years ago

I will close the issue for now. Please feel free to re-open if this is still not resolved.

sahikabetul commented 2 years ago

Hi, I have same problem when isntalling package by pip. The error is:

WARNING: Ignoring invalid distribution -umpy (c:\users\tcsyayli\anaconda3\lib\site-packages)
WARNING: Ignoring invalid distribution -umpy (c:\users\tcsyayli\anaconda3\lib\site-packages)
  error: subprocess-exited-with-error

  python setup.py bdist_wheel did not run successfully.
  exit code: 1

  [7 lines of output]
  running bdist_wheel
  running build
  running build_py
  package init file 'src\__init__.py' not found (or not a regular file)
  running build_ext
  building 'fastwer' extension
  error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
  [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for fastwer
WARNING: Ignoring invalid distribution -umpy (c:\users\tcsyayli\anaconda3\lib\site-packages)
  error: subprocess-exited-with-error

  Running setup.py install for fastwer did not run successfully.
  exit code: 1

  [7 lines of output]
  running install
  running build
  running build_py
  package init file 'src\__init__.py' not found (or not a regular file)
  running build_ext
  building 'fastwer' extension
  error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
  [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

Encountered error while trying to install package.

fastwer

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
WARNING: Ignoring invalid distribution -umpy (c:\users\tcsyayli\anaconda3\lib\site-packages)
WARNING: Ignoring invalid distribution -umpy (c:\users\tcsyayli\anaconda3\lib\site-packages)

Please help me for solving this problem.