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

Solve Issue #561. error: [Errno 2] No such file or directory: 'script… #562

Closed
wants to merge 1 commit into from

Conversation

iherreral
Copy link

When you try to install the python SDK by following these steps:

git clone https://github.com/intelligencex/sdk
cd sdk/Python
pip3 install -r requirements.txt
pip3 install .

You get the following error:
#0 46.86 Building wheels for collected packages: intelx
#0 46.86 Building wheel for intelx (pyproject.toml): started
#0 47.93 Building wheel for intelx (pyproject.toml): finished with status 'error'
#0 47.96 error: subprocess-exited-with-error
#0 47.96
#0 47.96 × Building wheel for intelx (pyproject.toml) did not run successfully.
#0 47.96 │ exit code: 1
#0 47.96 ╰─> [17 lines of output]
#0 47.96 running bdist_wheel
#0 47.96 running build
#0 47.96 running build_py
#0 47.96 creating build
#0 47.96 creating build/lib
#0 47.96 copying intelx/intelxapi.py -> build/lib
#0 47.96 copying intelx/intelx_identity.py -> build/lib
#0 47.96 running egg_info
#0 47.96 writing intelx/intelx.egg-info/PKG-INFO
#0 47.96 writing dependency_links to intelx/intelx.egg-info/dependency_links.txt
#0 47.96 writing requirements to intelx/intelx.egg-info/requires.txt
#0 47.96 writing top-level names to intelx/intelx.egg-info/top_level.txt
#0 47.96 reading manifest file 'intelx/intelx.egg-info/SOURCES.txt'
#0 47.96 writing manifest file 'intelx/intelx.egg-info/SOURCES.txt'
#0 47.96 running build_scripts
#0 47.96 creating build/scripts-3.8
#0 47.96 error: [Errno 2] No such file or directory: 'scripts/intelx.py'
#0 47.96 [end of output]
#0 47.96
#0 47.96 note: This error originates from a subprocess, and is likely not a problem with pip.
#0 47.97 ERROR: Failed building wheel for intelx

This is solved by modifying the pyproject.toml file updating the reference to the correct path cli/intelx.py

Copy link
Collaborator

@cmlh cmlh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/IntelligenceX/Python/tree/main/scripts was renamed to scripts from cli due to the scripts keyword from the prior setup.py

This is resolved with git mv cli scripts

@cmlh cmlh added the bug Something isn't working label Jun 28, 2024
@iherreral
Copy link
Author

https://github.com/IntelligenceX/Python/tree/main/scripts was renamed to scripts from cli due to the scripts keyword from the prior setup.py

This is resolved with git mv cli scripts

Sorry, but in the https://github.com/intelligencex/sdk/Python repo the cli folder appears.

@cmlh
Copy link
Collaborator

cmlh commented Jun 28, 2024

@iherreral wrote

Sorry, but in the https://github.com/intelligencex/sdk/Python repo the cli folder appears.

https://github.com/IntelligenceX/SDK/tree/cmlh-Identity/Python/scripts represents what was to be merged back into SDK after rejecting the Git Submodule.

cffd1d4#diff-3ea299e18b216e4e18f002e232266c833a1d9d69cab9af74375773f2523a6e7e is the alternate merge performed by @Kleissner.

There is no PEP which mandates the name for the script directory so bin is also common.

@iherreral
Copy link
Author

cmlh

Thank you very much @cmlh,
Sorry but my Python knowledge is limited and I didn't understand your answer.
I will change our application to clone the Python repository, instead of SDK so that the error is fixed during the build.

@cmlh cmlh added the Python label Jun 30, 2024
@cmlh
Copy link
Collaborator

cmlh commented Jul 1, 2024

@cmlh wrote:

There is no PEP which mandates the name for the script directory so bin is also common.

Sorry I forgot to add and credit to @Kleissner for pointing this out to me sometime ago, we avoided bin and hence renaming the script to intelx, i.e. removing the .py file extension, would be difficult for an end user to determine at face value if intelx was a binary file or a Python script.

@iherreral iherreral closed this Jul 1, 2024
cmlh added a commit that referenced this pull request Jul 1, 2024
@github Issue: #561

Pull Request: #562

Credit: @iherreral
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Python
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants