Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix pip install error #126

Merged
merged 2 commits into from
Mar 5, 2024
Merged

Fix pip install error #126

merged 2 commits into from
Mar 5, 2024

Conversation

RogerQi
Copy link
Contributor

@RogerQi RogerQi commented Sep 28, 2023

pip install . is throwing errors on my machine because it's not finding requested packages. Using relative import fixes this issue.

Tested on three different machines with both pip install . and pip install pip install git+https://github.com/RogerQi/pydensecrf.git

@lucasb-eyer
Copy link
Owner

Thanks. Since I don't have the time to test it myself, if there's >2 thumbs up, I'll just hit merge :)

@jokester
Copy link

I'm not a py guru but this PR helped me to install in my linux PC. I'm using conda-provided Python 3.10 .

#requirements.txt
pydensecrf@git+https://github.com/RogerQi/pydensecrf.git

❯ venv/bin/pip install -r requirements.txt
Collecting pydensecrf@ git+https://github.com/RogerQi/pydensecrf.git
  Cloning https://github.com/RogerQi/pydensecrf.git to /tmp/pip-install-zgj1071_/pydensecrf_ad61512bf48b474a8f23121b4b25cea3
  Running command git clone --filter=blob:none --quiet https://github.com/RogerQi/pydensecrf.git /tmp/pip-install-zgj1071_/pydensecrf_ad61512bf48b474a8f
23121b4b25cea3
  Resolved https://github.com/RogerQi/pydensecrf.git to commit c8908960dac50093ea8a11ae2eb64445c04f8a0d
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done

.......

Building wheels for collected packages: pydensecrf
  Building wheel for pydensecrf (pyproject.toml) ... done
  Created wheel for pydensecrf: filename=pydensecrf-1.0rc2-cp310-cp310-linux_x86_64.whl size=300000 sha256=bbf09911dc3b5443e15ec5e183544af2b305ea48cb081ee6b6e93c2a501e67eb
  Stored in directory: /tmp/pip-ephem-wheel-cache-zv5dkgai/wheels/eb/c6/d1/85a07ad498f5560f3813578db0f50774a12233be2bbe241a52
Successfully built pydensecrf
Installing collected packages: pydensecrf
Successfully installed pydensecrf-1.0rc2
...


With the version in pypi, my build error was:

$ venv/bin/pip install pydensecrf

Collecting pydensecrf
  Downloading pydensecrf-1.0rc3.tar.gz (1.0 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.0/1.0 MB 11.0 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [305 lines of output]
      /home/mono/moeflow/manga-image-translator/venv/lib/python3.10/site-packages/Cython/Compiler/Main.py:381: FutureWarning: Cython directive 'language
_level' not set, using '3str' for now (Py3). This has changed from earlier releases! File: /tmp/pip-install-28xn5cpa/pydensecrf_41ba00d5dd4c489ca1678722
eb17cbbb/pydensecrf/densecrf.pxd
        tree = Parsing.p_module(s, pxd, full_module_name)
     
      Error compiling Cython file:
      ------------------------------------------------------------
      ...
      from eigen cimport *
      ^
      ------------------------------------------------------------
     
      pydensecrf/densecrf.pxd:1:0: 'eigen.pxd' not found
     
      Error compiling Cython file:
...

@jokester
Copy link

@lucasb-eyer dear owner I think the thumbs are enough now 🙏🏽

@lucasb-eyer
Copy link
Owner

Indeed, thanks for the ping!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants