-2

I want to install a package from GitHub that uses Cython (https://github.com/mlysy/kalmantv). I cloned the package locally, and after trying to install it with pip install ., I'm getting the following error:

DEPRECATION: A future pip version will change local packages to be built in-place without first copying to a temporary directory. We recommend you use --use-feature=in-tree-build to test your packages with this new behavior before it becomes the default.
   pip 21.3 will remove support for this functionality. You can find discussion regarding this at https://github.com/pypa/pip/issues/7555.
Processing /Users/me/Downloads/kalmantv
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  ERROR: Command errored out with exit status 1:
   command: /Users/me/.pyenv/versions/3.8.3/bin/python3.8 /Users/me/.pyenv/versions/3.8.3/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py get_requires_for_build_wheel /var/folders/g1/0pjsd_bs24jgccrd6g0lzfvc0000gn/T/tmpxmrdlgnk
       cwd: /Users/me/Downloads/kalmantv
  Complete output (6 lines):
  running egg_info
  writing kalmantv.egg-info/PKG-INFO
  writing dependency_links to kalmantv.egg-info/dependency_links.txt
  writing requirements to kalmantv.egg-info/requires.txt
  writing top-level names to kalmantv.egg-info/top_level.txt
  error: package directory 'eigen-3.3.7' does not exist
  ----------------------------------------
WARNING: Discarding file:///Users/me/Downloads/kalmantv. Command errored out with exit status 1: /Users/me/.pyenv/versions/3.8.3/bin/python3.8 /Users/me/.pyenv/versions/3.8.3/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py get_requires_for_build_wheel /var/folders/g1/0pjsd_bs24jgccrd6g0lzfvc0000gn/T/tmpxmrdlgnk Check the logs for full command output.
ERROR: Command errored out with exit status 1: /Users/me/.pyenv/versions/3.8.3/bin/python3.8 /Users/me/.pyenv/versions/3.8.3/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py get_requires_for_build_wheel /var/folders/g1/0pjsd_bs24jgccrd6g0lzfvc0000gn/T/tmpxmrdlgnk Check the logs for full command output.

I tried adding --use-feature=in-tree-build from the deprecation warning but still got the error (without the initial warning).

I saw a number of suggestions such as using pip install --upgrade pip setuptools wheel, but nothing is doing the trick. I would guess that this has a simple fix but this stuff is a little over my head and I don't want to break anything else.

What do I need to do to safely correct this issue without causing other problems?

torek
  • 448,244
  • 59
  • 642
  • 775
SuperCodeBrah
  • 2,874
  • 2
  • 19
  • 33

1 Answers1

0

The setup.py file has the following lines:

# path to eigen library
EIGEN_PATH = r"eigen-3.3.7"

Strangely, it seems to expect the Eigen header library to be present at that location. You can install the library with brew install eigen, or sudo apt install libeigen3-dev. Note that this may not install version 3.3.7 of the library, which the project expects. I don't know if using a newer version would cause any issues.

If you want to install version 3.3.7, you can build and install it from source with the following link by following these instructions:

https://gitlab.com/libeigen/eigen/-/releases/3.3.7

Once that's done, change to the project directory, and create a symlink to the Eigen library:

If installed with brew: ln -s /usr/local/Cellar/eigen/*/include/eigen3 eigen-3.3.7

If installed with apt: ln -s /usr/include/eigen3 eigen-3.3.7

If installed from source: /usr/local/include/eigen3 eigen-3.3.7

Once the Eigen library has been installed and made available at ./eigen-3.3.7, pip install . should work, but for good measures you should run the following command first:

pip install -U pip setuptools wheel; pip install -U cython

Refer to Catalina C++: Using <cmath> headers yield error: no member named 'signbit' in the global namespace if you run into an error like: error: no member named 'signbit' in the global namespace.

Will Da Silva
  • 6,386
  • 2
  • 27
  • 52
  • I got a bunch of errors after installing with brew. I'm trying this: https://stackoverflow.com/questions/64745768/install-eigen3-3-7-on-macos (source: https://gitlab.com/libeigen/eigen/-/releases/3.3.7) and getting the same errors, which seem like they could be version issues, but here's an example: `In file included from eigen-3.3.7/Eigen/src/Core/util/Macros.h:679: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:317:9: error: no member named 'signbit' in the global namespace` – SuperCodeBrah Aug 21 '21 at 06:05
  • 1
    @SuperCodeBrah That seems to be a separate issue from what this question is about. This question is about why `pip install .` is giving you `error: package directory 'eigen-3.3.7' does not exist`, which has been fully answered. Refer to https://stackoverflow.com/questions/58628377 for a solution, or ask another question if your new issue is notably distinct from the one I just linked (and other questions like it on this site). – Will Da Silva Aug 22 '21 at 15:13