Open webbsledge opened 2 weeks ago
encountering same issue..
I've had exact same issue but now I figured out by running pipenv sync
. @webbsledge
After running pipenv sync
,
...
: Collecting psycopg2==2.9.9 (from -r /var/folders/zb/82_7gyvx75gbnnh0qqls8bjm0000gn/T/pipenv-a0t8wv86-requirements/pipenv-acc5wlq8-hashed-reqs.txt
(line 62))
: Using cached psycopg2-2.9.9.tar.gz (384 kB)
: Installing build dependencies: started
: Installing build dependencies: finished with status 'done'
: Getting requirements to build wheel: started
: Getting requirements to build wheel: finished with status 'error'
: error: subprocess-exited-with-error
:
: × Getting requirements to build wheel did not run successfully.
: │ exit code: 1
: ╰─> [21 lines of output]
: running egg_info
: writing psycopg2.egg-info/PKG-INFO
: writing dependency_links to psycopg2.egg-info/dependency_links.txt
: writing top-level names to psycopg2.egg-info/top_level.txt
:
: Error: pg_config executable not found.
:
: pg_config is required to build psycopg2 from source. Please add the directory
: containing pg_config to the $PATH or specify the full executable path with the
: option:
:
: python setup.py build_ext --pg-config /path/to/pg_config build ...
:
: or with the pg_config option in 'setup.cfg'.
:
: If you prefer to avoid building psycopg2 from source, please install the PyPI
: 'psycopg2-binary' package instead.
:
: For further information please check the 'doc/src/install.rst' file (also at
: <https://www.psycopg.org/docs/install.html>).
:
:
:
: note: This error originates from a subprocess, and is likely not a problem with pip.
: error: subprocess-exited-with-error
:
: × Getting requirements to build wheel did not run successfully.
: │ exit code: 1
: ╰─> See above for output.
:
: note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Couldn't install package: [1m{}[0m
[33mPackage installation failed...[0m
I've changed psycopg2
→ psycopg2-binary
and now pipenv lock
works back again with no error.
If you have psycopg2
on your Pipfile, then try switching to psycopg2-binary
or try running pipenv sync
to see if it gives more helpful error message.
Issue description
pipenv install -e /path/to\ the\ local/directory/
fails when run from the command line using zsh. I did not test other shells.After further testing, I found that the package installed successfully with
pipenv install -e /path/to_the_local/directory
, which leads me to believe pipenv has a bug which needs to resolve globing/regex from the command lineExpected result
I would have expected pipenv to handle the escaped spaces in the path sequence correctly.
Actual result
Output below from
pipenv install -e /Users/sledge/Development/API/IBKR/IB\ Gateway/IBTJts/source/pythonclient/
Note the escaped space in
.../IB\ Gateway/...
above.Steps to replicate
Provide the steps to replicate (which usually at least includes the commands and the Pipfile).
Simply try to install any local directory as a package, where the local directory has spaces in the path name that need to be escaped in the system shell.
$ pipenv --support
Pipenv version: `'2024.3.1'` Pipenv location: `'/opt/homebrew/Cellar/pipenv/2024.3.1/libexec/lib/python3.13/site-packages/pipenv'` Python location: `'/opt/homebrew/Cellar/pipenv/2024.3.1/libexec/bin/python'` OS Name: `'posix'` User pip version: `'24.2'` user Python installations found: PEP 508 Information: ``` {'implementation_name': 'cpython', 'implementation_version': '3.13.0', 'os_name': 'posix', 'platform_machine': 'arm64', 'platform_python_implementation': 'CPython', 'platform_release': '24.1.0', 'platform_system': 'Darwin', 'platform_version': 'Darwin Kernel Version 24.1.0: Thu Oct 10 21:03:11 PDT ' '2024; root:xnu-11215.41.3~2/RELEASE_ARM64_T6020', 'python_full_version': '3.13.0', 'python_version': '3.13', 'sys_platform': 'darwin'} ``` System environment variables: - `TERM_SESSION_ID` - `SSH_AUTH_SOCK` - `LC_TERMINAL_VERSION` - `COLORFGBG` - `ITERM_PROFILE` - `XPC_FLAGS` - `LANG` - `PWD` - `SHELL` - `__CFBundleIdentifier` - `TERM_FEATURES` - `TERM_PROGRAM_VERSION` - `TERM_PROGRAM` - `PATH` - `LC_TERMINAL` - `COLORTERM` - `COMMAND_MODE` - `TERM` - `TERMINFO_DIRS` - `HOME` - `TMPDIR` - `USER` - `XPC_SERVICE_NAME` - `LOGNAME` - `ITERM_SESSION_ID` - `__CF_USER_TEXT_ENCODING` - `SHLVL` - `OLDPWD` - `HOMEBREW_PREFIX` - `HOMEBREW_CELLAR` - `HOMEBREW_REPOSITORY` - `INFOPATH` - `PYENV_SHELL` - `P9K_TTY` - `_P9K_TTY` - `ZSH` - `LS_COLORS` - `ZSH_COMPDUMP` - `PAGER` - `LESS` - `LSCOLORS` - `P9K_SSH` - `_P9K_SSH_TTY` - `EDITOR` - `FZF_DEFAULT_OPTS` - `FZF_DEFAULT_COMMAND` - `FZF_CTRL_T_COMMAND` - `FZF_ALT_C_COMMAND` - `FZF_CTRL_T_OPTS` - `FZF_ALT_C_OPTS` - `BAT_THEME` - `AICHAT_CONFIG_DIR` - `NVM_DIR` - `NVM_CD_FLAGS` - `NVM_BIN` - `NVM_INC` - `PYENV_ROOT` - `_` - `PIP_DISABLE_PIP_VERSION_CHECK` - `PYTHONDONTWRITEBYTECODE` - `PYTHONFINDER_IGNORE_UNSUPPORTED` Pipenv–specific environment variables: Debug–specific environment variables: - `PATH`: `/Users/sledge/.pyenv/versions/3.11.10/bin:/Users/sledge/.pyenv/versions/3.12.7/bin:/Users/sledge/.pyenv/versions/3.13.0/bin:/Users/sledge/.pyenv/versions/3.10.15/bin:/Users/sledge/.pyenv/shims:/Users/sledge/.nvm/versions/node/v20.16.0/bin:/Users/sledge/.pyenv/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin:/Applications/iTerm.app/Contents/Resources/utilities:/Users/sledge/Library/Application Support/JetBrains/Toolbox/scripts` - `SHELL`: `/opt/homebrew/bin/zsh` - `EDITOR`: `nvim` - `LANG`: `en_US.UTF-8` - `PWD`: `/Users/sledge/Development/Python/security-analysis` --------------------------- Contents of `Pipfile` ('/Users/sledge/Development/Python/security-analysis/Pipfile'): ```toml [[source]] url = "https://pypi.org/simple" verify_ssl = true name = "pypi" [packages] sqlalchemy = "*" psycopg = "*" ipykernel = "*" jupyter = "*" fredapi = "*" schwab-py = "*" quantlib = "*" pandas = "*" numpy = "*" matplotlib = "*" pyarrow = "*" sec-edgar-api = "*" scikit-learn = "*" edgartools = {file = "../edgartools", editable = true} pyportfolioopt = {file = "../PyPortfolioOpt", editable = true} ibapi = {file = "../../API/IBKR/IB_Gateway/IBJts/source/pythonclient", editable = true} [dev-packages] [requires] python_version = "3.13" python_full_version = "3.13.0" ``` Contents of `Pipfile.lock` ('/Users/sledge/Development/Python/security-analysis/Pipfile.lock'): This is too long to include.