Skip to content

BUG(pip) - pip installed on ubuntu scratch but error once call for credo pip numpy #49

@alessandriLuca

Description

@alessandriLuca

Description...
docker run -it ubuntu
`./credo pip numpy
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x95990b]

goroutine 1 [running]:
github.com/CREDOProject/go-pythonvenv.createVenv({0xc0001f82c0, 0xe})
/home/runner/go/pkg/mod/github.com/!c!r!e!d!o!project/go-pythonvenv@v0.1.3/pythonvenv.go:42 +0x14b
github.com/CREDOProject/go-pythonvenv.Create({0xc0001f82c0, 0xe})
/home/runner/go/pkg/mod/github.com/!c!r!e!d!o!project/go-pythonvenv@v0.1.3/pythonvenv.go:25 +0x25
credo/modules.setupPythonVenv(...)
/home/runner/work/core/core/modules/pip.go:113
credo/modules.getPipBinary()
/home/runner/work/core/core/modules/pip.go:127 +0xaa
credo/modules.(*pipModule).bareRun(_, {{0x7ffdc7365975, 0x5}, {{0x0, 0x0, 0x0}, {0x0, 0x0, 0x0}, {0x0, ...}, ...}})
/home/runner/work/core/core/modules/pip.go:148 +0x14d
credo/modules.(*pipModule).CliConfig.(*pipModule).cobraRun.func2(0xc000194a00?, {0xc00011fcf0?, 0x4?, 0xabdf69?})
/home/runner/work/core/core/modules/pip.go:231 +0xa5
github.com/spf13/cobra.(*Command).execute(0xc000191b08, {0xc00011fcc0, 0x1, 0x1})
/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.9.1/command.go:1019 +0xa7b
github.com/spf13/cobra.(*Command).ExecuteC(0xc000190308)
/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.9.1/command.go:1148 +0x40c
github.com/spf13/cobra.(*Command).Execute(0xc000190308?)
/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.9.1/command.go:1071 +0x13
main.main()
/home/runner/work/core/core/main.go:20 +0xca
`
./credo apt pip
./credo apply
./credo pip numpy
./credo pip numpy
2025/04/08 09:25:34 pip.go:235: bareRun, retrieving pip binary: getPipBinary, binary from path: No pip found.
root@2d09de149ab3:/# pip

Usage:
pip [options]

Commands:
install Install packages.
download Download packages.
uninstall Uninstall packages.
freeze Output installed packages in requirements format.
list List installed packages.
show Show information about installed packages.
check Verify installed packages have compatible dependencies.
config Manage local and global configuration.
search Search PyPI for packages.
cache Inspect and manage pip's wheel cache.
index Inspect information available from package indexes.
wheel Build wheels from your requirements.
hash Compute hashes of package archives.
completion A helper command used for command completion.
debug Show information useful for debugging.
help Show help for commands.

General Options:
-h, --help Show help.
--debug Let unhandled exceptions propagate outside the main subroutine, instead of logging them to stderr.
--isolated Run pip in an isolated mode, ignoring environment variables and user configuration.
--require-virtualenv Allow pip to only run in a virtual environment; exit with an error otherwise.
-v, --verbose Give more output. Option is additive, and can be used up to 3 times.
-V, --version Show version and exit.
-q, --quiet Give less output. Option is additive, and can be used up to 3 times (corresponding to WARNING, ERROR, and CRITICAL logging levels).
--log Path to a verbose appending log.
--no-input Disable prompting for input.
--proxy Specify a proxy in the form [user:passwd@]proxy.server:port.
--retries Maximum number of retries each connection should attempt (default 5 times).
--timeout Set the socket timeout (default 15 seconds).
--exists-action Default action when a path already exists: (s)witch, (i)gnore, (w)ipe, (b)ackup, (a)bort.
--trusted-host Mark this host or host:port pair as trusted, even though it does not have valid or any HTTPS.
--cert Path to PEM-encoded CA certificate bundle. If provided, overrides the default. See 'SSL Certificate Verification' in pip documentation for more information.
--client-cert Path to SSL client certificate, a single file containing the private key and the certificate in PEM format.
--cache-dir

Store the cache data in .
--no-cache-dir Disable the cache.
--disable-pip-version-check
Don't periodically check PyPI to determine whether a new version of pip is available for download. Implied with --no-index.
--no-color Suppress colored output.
--no-python-version-warning
Silence deprecation warnings for upcoming unsupported Pythons.
--use-feature Enable new functionality, that may be backward incompatible.
--use-deprecated Enable deprecated functionality, that will be removed in the future.

In a few words, using credo pip

  1. it should automatically install pip without installing it before, it should kinda be like the dependency of numpy for example is pip, in that way is handled by apt autonatically
  2. Same thing should happen for R, using CRAN
    ./credo cran Seurat
    2025/04/08 09:31:08 cran.go:284: [cran] detect: exec: "Rscript": executable file not found in $PATH
    R is a sort of "dependency" of cran so it should be handled automatically by CREDO.
    The previous two points just to be a bit more userfriendly, we could also simply add this part in the setup if we dont want to automatize this part
  3. credo pip numpy is still giving weird error
    2025/04/08 09:29:17 pip.go:235: bareRun, retrieving pip binary: getPipBinary, setting up venv: exit status 1
    even though after the credo apply pip is installed in the system.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions