Giter Site home page Giter Site logo

Comments (4)

Sum02dean avatar Sum02dean commented on July 28, 2024 1

Hello,

Attempting to pip install pydca into freshly created conda environment fails on Linux due to

build/temp.linux-x86_64-3.5/pydca/plmdca/lbfgs/lib/lbfgs.o: file not recognized: file format not recognized
collect2: ld returned 1 exit status
error: command 'g++' failed with exit status 1

I have gcc 10.1.0-2.

I have resolved the issue, the answer is practically the same as here (solved):
pytorch/pytorch#16683

In summary:

  1. Create new python env and activate it
  2. Git clone the repository to a directory of your choosing.
  3. Run python setup.py clean
  4. If using miniconda3: run cd ~/miniconda3/envs/ENV_NAME/compiler_compat/, else if using Anaconda: run ~/anaconda/envs/ENV_NAME/compiler_compat/
  5. Run mv ld ld_old
  6. Go back to dca repository
  7. Run bash install.sh

This should fix any issues with GCC compilation. The issue is that pydca is accessing the miniconda3/anaconda ld-linker when is should be using the system version.

Hope this helps.

Dean

from pydca.

Sum02dean avatar Sum02dean commented on July 28, 2024

I am also having this issue. I have tried installing from a fresh environment, both from pip and from install.sh but nothing seems to work.

file not recognized: file format not recognized collect2: error: ld returned 1 exit status error: command 'g++' failed with exit status 1

from pydca.

Sum02dean avatar Sum02dean commented on July 28, 2024

Important note:
I found that the installation is in conflict with the latest version of Python (version 3.9). Before following the above instructions, make sure to install Python==3.7 into your newly initialized env before running steps 1-7.

best,

D

from pydca.

edikedik avatar edikedik commented on July 28, 2024

Important note:
I found that the installation is in conflict with the latest version of Python (version 3.9). Before following the above instructions, make sure to install Python==3.7 into your newly initialized env before running steps 1-7.

best,

D

Thanks for the instructions.

Installing with python=3.7 was the crucial moment for me, as it allowed for an error-free installation without the trick of renaming the ld-linker. Although, when installed, it throws Segmentation fault on any attempt to run pydca, which is another issue.

from pydca.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.