Ich habe gerade pipenv auf einem von pyenv installierten Python 3.7.0-Interpreter installiert. Das Starten in einem sauberen Verzeichnis fĂŒhrte zu einer Ausnahme.
pipenv
um nicht abzustĂŒrzen.
$ pip install pipenv
Requirement already satisfied: pipenv in /Users/pradyunsg/.pyenv/versions/3.7.0/lib/python3.7/site-packages (2018.7.1)
Requirement already satisfied: virtualenv-clone>=0.2.5 in /Users/pradyunsg/.pyenv/versions/3.7.0/lib/python3.7/site-packages (from pipenv) (0.3.0)
Requirement already satisfied: pip>=9.0.1 in /Users/pradyunsg/Projects/pip/src (from pipenv) (18.1.dev0)
Requirement already satisfied: setuptools>=36.2.1 in /Users/pradyunsg/.pyenv/versions/3.7.0/lib/python3.7/site-packages (from pipenv) (39.0.1)
Requirement already satisfied: certifi in /Users/pradyunsg/.pyenv/versions/3.7.0/lib/python3.7/site-packages (from pipenv) (2018.8.24)
Requirement already satisfied: virtualenv in /Users/pradyunsg/.pyenv/versions/3.7.0/lib/python3.7/site-packages (from pipenv) (16.0.0)
$ pipenv --version
pipenv, version 2018.7.1
$ pipenv install django --verbose
Creating a Pipfile for this project...
Installing django...
â Installing 'django'
Traceback (most recent call last):
File "/Users/pradyunsg/.pyenv/versions/3.7.0/bin/pipenv", line 11, in <module>
sys.exit(cli())
File "/Users/pradyunsg/.pyenv/versions/3.7.0/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/Users/pradyunsg/.pyenv/versions/3.7.0/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/Users/pradyunsg/.pyenv/versions/3.7.0/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/pradyunsg/.pyenv/versions/3.7.0/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/pradyunsg/.pyenv/versions/3.7.0/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/Users/pradyunsg/.pyenv/versions/3.7.0/lib/python3.7/site-packages/pipenv/cli.py", line 435, in install
selective_upgrade=selective_upgrade,
File "/Users/pradyunsg/.pyenv/versions/3.7.0/lib/python3.7/site-packages/pipenv/core.py", line 1971, in do_install
pypi_mirror=pypi_mirror,
File "/Users/pradyunsg/.pyenv/versions/3.7.0/lib/python3.7/site-packages/pipenv/core.py", line 1375, in pip_install
package_name.split('--hash')[0].split('--trusted-host')[0]
File "/Users/pradyunsg/.pyenv/versions/3.7.0/lib/python3.7/site-packages/pipenv/vendor/requirementslib/models/requirements.py", line 704, in from_line
line, extras = _strip_extras(line)
TypeError: 'module' object is not callable
$ pipenv --support
Pipenv-Version: '2018.7.1'
Pipenv-Standort: '/Users/pradyunsg/.pyenv/versions/3.7.0/lib/python3.7/site-packages/pipenv'
Python-Speicherort: '/Users/pradyunsg/.pyenv/versions/3.7.0/bin/python3.7'
Andere Python-Installationen in PATH
:
2.7
: /Users/pradyunsg/.pyenv/shims/python2.7
2.7
: /Users/pradyunsg/.pyenv/shims/python2.7
2.7
: /usr/local/bin/python2.7
2.7
: /usr/bin/python2.7
2.7
: /Users/pradyunsg/.pyenv/shims/python2.7
3.4
: /Users/pradyunsg/.pyenv/shims/python3.4m
3.4
: /Users/pradyunsg/.pyenv/shims/python3.4
3.4
: /Users/pradyunsg/.pyenv/shims/python3.4
3.5
: /Users/pradyunsg/.pyenv/shims/python3.5m
3.5
: /Users/pradyunsg/.pyenv/shims/python3.5
3.5
: /Users/pradyunsg/.pyenv/shims/python3.5
3.6
: /Users/pradyunsg/.pyenv/shims/python3.6m
3.6
: /Users/pradyunsg/.pyenv/shims/python3.6
3.6
: /Users/pradyunsg/.pyenv/shims/python3.6
3.7
: /Users/pradyunsg/.pyenv/versions/3.7.0/bin/python3.7m
3.7
: /Users/pradyunsg/.pyenv/versions/3.7.0/bin/python3.7
3.7
: /Users/pradyunsg/.pyenv/shims/python3.7
3.7
: /usr/local/bin/python3.7
3.7
: /Users/pradyunsg/.pyenv/shims/python3.7
3.7.0
: /Users/pradyunsg/.pyenv/versions/3.7.0/bin/python
3.7.0
: /Users/pradyunsg/.pyenv/shims/python
2.7.15
: /usr/local/bin/python
2.7.10
: /usr/bin/python
3.7.0
: /Users/pradyunsg/.pyenv/shims/python
2.7.15
: /Users/pradyunsg/.pyenv/shims/python2
2.7.15
: /usr/local/bin/python2
2.7.15
: /Users/pradyunsg/.pyenv/shims/python2
3.7.0
: /Users/pradyunsg/.pyenv/versions/3.7.0/bin/python3
3.7.0
: /Users/pradyunsg/.pyenv/shims/python3
3.7.0
: /usr/local/bin/python3
3.7.0
: /Users/pradyunsg/.pyenv/shims/python3
PEP 508-Informationen:
{'implementation_name': 'cpython',
'implementation_version': '3.7.0',
'os_name': 'posix',
'platform_machine': 'x86_64',
'platform_python_implementation': 'CPython',
'platform_release': '17.7.0',
'platform_system': 'Darwin',
'platform_version': 'Darwin Kernel Version 17.7.0: Thu Jun 21 22:53:14 PDT '
'2018; root:xnu-4570.71.2~1/RELEASE_X86_64',
'python_full_version': '3.7.0',
'python_version': '3.7',
'sys_platform': 'darwin'}
Systemumgebungsvariablen:
RBENV_VERSION
TERM_PROGRAM
VIRTUALENVWRAPPER_SCRIPT
PYENV_ROOT
TERM
SHELL
ZPLUG_LOADFILE
TMPDIR
Apple_PubSub_Socket_Render
TERM_PROGRAM_VERSION
FPATH
PYENV_VERSION
DEFAULT_RBENV
ZPLUG_USE_CACHE
USER
ZPLUG_ERROR_LOG
ZPLUG_PROTOCOL
SSH_AUTH_SOCK
PYENV_DIR
__CF_USER_TEXT_ENCODING
VIRTUAL_ENV_DISABLE_PROMPT
_ZPLUG_VERSION
_ZPLUG_PREZTO
PERIOD
_ZPLUG_AWKPATH
VIRTUALENVWRAPPER_PYTHON
PATH
PYENV_VIRTUALENVWRAPPER_PYENV_VERSION
PWD
LANG
PYENV_HOOK_PATH
_ZPLUG_CONFIG_SUBSHELL
XPC_FLAGS
_ZPLUG_OHMYZSH
ZPLUG_BIN
VIRTUALENVWRAPPER_VIRTUALENV
_ZPLUG_URL
RBENV_SHELL
HISTIGNORE
HISTCONTROL
XPC_SERVICE_NAME
GPG_TTY
ZPLUG_CACHE_DIR
SHLVL
PYENV_SHELL
HOME
_VIRTUALENVWRAPPER_API
ZPLUG_THREADS
ZPLUG_REPOS
LOGNAME
VIRTUALENVWRAPPER_VIRTUALENV_CLONE
ZPLUG_FILTER
ZPLUG_HOME
ZPLUG_ROOT
SECURITYSESSIONID
VIRTUALENVWRAPPER_LAZY_SCRIPT
HISTFILE
PYTHONDONTWRITEBYTECODE
PIP_PYTHON_PATH
Pipenv-spezifische Umgebungsvariablen:
Debug-spezifische Umgebungsvariablen:
PATH
: /Users/pradyunsg/.pyenv/versions/3.7.0/bin:/usr/local/Cellar/pyenv/1.2.7/libexec:/Users/pradyunsg/.rbenv/shims:/Users/pradyunsg/.pyenv/shims:/usr/local/Cellar/zplug/2.4.2/bin:/usr/local/opt/zplug/bin:/Users/pradyunsg/.cargo/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/pradyunsg/.rbenv/shims:/Users/pradyunsg/.pyenv/shims:/Applications/Visual Studio Code.app/Contents/Resources/app/bin
SHELL
: /usr/local/bin/zsh
LANG
: en_US.UTF-8
PWD
: /Users/pradyunsg/Projects/csi-18/polling
Inhalt von Pipfile
('/Users/pradyunsg/Projects/csi-18/polling/Pipfile'):
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[packages]
django = "*"
[dev-packages]
[requires]
python_version = "3.7"
Inhalt von Pipfile.lock
('/Users/pradyunsg/Projects/csi-18/polling/Pipfile.lock'):
{
"_meta": {
"hash": {
"sha256": "627ef89f247ecee27e9ef0dabe116108d09c47abf171c900a8817befa64f9dd2"
},
"pipfile-spec": 6,
"requires": {
"python_version": "3.7"
},
"sources": [
{
"name": "pypi",
"url": "https://pypi.org/simple",
"verify_ssl": true
}
]
},
"default": {
"django": {
"hashes": [
"sha256:04f2e423f2e60943c02bd2959174b844f7d1bcd19eabb7f8e4282999958021fd",
"sha256:e1cc1cd6b658aa4e052f5f2b148bfda08091d7c3558529708342e37e4e33f72c"
],
"index": "pypi",
"version": "==2.1.1"
},
"pytz": {
"hashes": [
"sha256:a061aa0a9e06881eb8b3b2b43f05b9439d6583c206d0a6c340ff72a7b6669053",
"sha256:ffb9ef1de172603304d9d2819af6f5ece76f2e85ec10692a524dd876e72bf277"
],
"version": "==2018.5"
}
},
"develop": {}
}
Oh! Die Umgebung hatte eine in Entwicklung befindliche Version von Pip. đ
pip 18.1 wurde vor einigen Minuten veröffentlicht und jetzt funktioniert pipenv auch bei mir nicht, also musste ich pip als schnelle Problemumgehung an 18.0 anheften.
Dies betraf mich auch auf Python 3.6.
Das Upgrade von pip und pipenv bringt sie zu 18.1
und 2018.7.1
und diese Kombination fĂŒhrt zu TypeError
im Zusammenhang mit _strip_extras
.
Dieses Problem sollte erneut geöffnet oder dupliziert werden. Aktualisierung: siehe #2924.
Ich habe ein Àhnliches Problem. Ich versuche, eine neue Umgebung mit Python 3.6 zu erstellen
$ pipenv install pandas
Creating a Pipfile for this project...
Installing pandas...
Requirement already satisfied: pandas in /home/echo66/.local/share/virtualenvs/LDSSA-2ApiwGJI/lib/python3.6/site-packages (0.23.4)
Requirement already satisfied: pytz>=2011k in /home/echo66/.local/share/virtualenvs/LDSSA-2ApiwGJI/lib/python3.6/site-packages (from pandas) (2018.5)
Requirement already satisfied: numpy>=1.9.0 in /home/echo66/.local/share/virtualenvs/LDSSA-2ApiwGJI/lib/python3.6/site-packages (from pandas) (1.15.2)
Requirement already satisfied: python-dateutil>=2.5.0 in /home/echo66/.local/share/virtualenvs/LDSSA-2ApiwGJI/lib/python3.6/site-packages (from pandas) (2.7.3)
Requirement already satisfied: six>=1.5 in /home/echo66/.local/share/virtualenvs/LDSSA-2ApiwGJI/lib/python3.6/site-packages (from python-dateutil>=2.5.0->pandas) (1.11.0)
Adding pandas to Pipfile's [packages]...
Pipfile.lock not found, creating...
Locking [dev-packages] dependencies...
Locking [packages] dependencies...
kages/pipenv/utils.py", line 402, in resolve_deps
req_dir=req_dir
File "/home/echo66/.local/lib/python3.6/site-packages/pipenv/utils.py", line 250, in actually_resolve_deps
req = Requirement.from_line(dep)
File "/home/echo66/.local/lib/python3.6/site-packages/pipenv/vendor/requirementslib/models/requirements.py", line 704, in from_line
line, extras = _strip_extras(line)
TypeError: 'module' object is not callable
Das Pipfile hat folgenden Inhalt
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[packages]
pandas = "*"
[dev-packages]
[requires]
python_version = "3.6"
Es wurde keine Pipfile.lock erzeugt. Aber ich kann pipenv shell
verwenden.
Dazu neue Ausgabe erstellt: #2924
Dies ist eine Problemumgehung, um die Pip-Version auf 18.0 zu sperren
pip install pipenv
pipenv run pip install pip==18.0
pipenv install
Dieser Workaround funktioniert bei mir nicht.
@joao-geru Und willst du Hilfe? Sie mĂŒssen uns mehr als das geben. Welche Befehle fĂŒhren Sie aus? Ausgabe? Fehlermeldungen? pipenv run pip --version
Das obige hat bei mir nicht ganz funktioniert, was tat, war:
pip install pipenv==2018.6.25
pip install pip==18.0
pipenv install
Hallo Williams,
Ich habe Pip und Pipenv aktualisiert:
pip install --user -U --no-cache-dir pip pipenv
Collecting pip
Downloading https://files.pythonhosted.org/packages/c2/d7/90f34cb0d83a6c5631cf71dfe64cc1054598c843a92b400e55675cc2ac37/pip-18.1-py2.py3-none-any.whl (1.3MB)
100% |ââââââââââââââââââââââââââââââââ| 1.3MB 101.9MB/s
Requirement already up-to-date: pipenv in /usr/local/lib/python3.6/site-packages (2018.7.1)
Requirement already satisfied, skipping upgrade: virtualenv-clone>=0.2.5 in /usr/local/lib/python3.6/site-packages (from pipenv) (0.3.0)
Requirement already satisfied, skipping upgrade: certifi in /usr/local/lib/python3.6/site-packages (from pipenv) (2018.8.24)
Requirement already satisfied, skipping upgrade: virtualenv in /usr/local/lib/python3.6/site-packages (from pipenv) (16.0.0)
Requirement already satisfied, skipping upgrade: setuptools>=36.2.1 in /usr/local/lib/python3.6/site-packages (from pipenv) (40.2.0)
Installing collected packages: pip
Successfully installed pip-18.1
Also sollte ich pipenv ausfĂŒhren:
pipenv install --dev
Creating a virtualenv for this project...
Pipfile: /home/joao/project/Pipfile
Using /usr/local/bin/python3.6m (3.6.6) to create virtualenv...
Running virtualenv with interpreter /usr/local/bin/python3.6m
Using base prefix '/usr/local'
New python executable in /home/joao/.local/share/virtualenvs/project-zxI9dQ-Q/bin/python3.6m
Also creating executable in /home/joao/.local/share/virtualenvs/project-zxI9dQ-Q/bin/python
Installing setuptools, pip, wheel...done.
Setting project for project-zxI9dQ-Q to /home/joao/project
Virtualenv location: /home/joao/.local/share/virtualenvs/project-zxI9dQ-Q
Installing dependencies from Pipfile.lock (431696)...
Traceback (most recent call last):
File "/usr/local/bin/pipenv", line 11, in <module>
sys.exit(cli())
File "/usr/local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/pipenv/cli.py", line 435, in install
selective_upgrade=selective_upgrade,
File "/usr/local/lib/python3.6/site-packages/pipenv/core.py", line 1943, in do_install
pypi_mirror=pypi_mirror,
File "/usr/local/lib/python3.6/site-packages/pipenv/core.py", line 1322, in do_init
pypi_mirror=pypi_mirror,
File "/usr/local/lib/python3.6/site-packages/pipenv/core.py", line 807, in do_install_dependencies
pypi_mirror=pypi_mirror,
File "/usr/local/lib/python3.6/site-packages/pipenv/core.py", line 1375, in pip_install
package_name.split('--hash')[0].split('--trusted-host')[0]
File "/usr/local/lib/python3.6/site-packages/pipenv/vendor/requirementslib/models/requirements.py", line 704, in from_line
line, extras = _strip_extras(line)
TypeError: 'module' object is not callable
đ ââââââââââââââââââââââââââââââââ 0/88 â 00:00:00
Exited with code 1
@joao-geru schau dir deine Pip-Installation an
Pip-18.1 erfolgreich installiert
Wie bereits erwÀhnt, benötigen Sie pip-18.0 und nicht 18.1
FĂŒr mich musste ich nicht in der Pipenv installieren, ich habe in meiner Python-spezifischen Version installiert
python3.5 -m pip install pip=18.0
pipenv installieren
Betroffen ist auch Pypy3 (Python 3.5).
Heruntergestufter Pip auf 18,0 - alles hat gut funktioniert.
(in Shell eingeloggt, dann gemacht: pip install pip==18.0
)
Installing dependencies from Pipfile...
Traceback (most recent call last):
File "/usr/local/bin/pipenv", line 11, in <module>
sys.exit(cli())
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/pipenv/cli.py", line 435, in install
selective_upgrade=selective_upgrade,
File "/usr/local/lib/python3.7/site-packages/pipenv/core.py", line 1943, in do_install
pypi_mirror=pypi_mirror,
File "/usr/local/lib/python3.7/site-packages/pipenv/core.py", line 1322, in do_init
pypi_mirror=pypi_mirror,
File "/usr/local/lib/python3.7/site-packages/pipenv/core.py", line 807, in do_install_dependencies
pypi_mirror=pypi_mirror,
File "/usr/local/lib/python3.7/site-packages/pipenv/core.py", line 1375, in pip_install
package_name.split('--hash')[0].split('--trusted-host')[0]
File "/usr/local/lib/python3.7/site-packages/pipenv/vendor/requirementslib/models/requirements.py", line 704, in from_line
line, extras = _strip_extras(line)
TypeError: 'module' object is not callable
Ich habe ein Àhnliches Problem
Python 3.7
Ubuntu 18.4, Windows 10
# RUN pip install --upgrade pip
RUN pip install pip==18.0
Es funktioniert gut fĂŒr meinen Docker
Ich habe ein Àhnliches Problem.
>pipenv install requests
Installing requests...
Requirement already satisfied: requests in c:\users\yuji3\.virtualenvs\myproject-sgdw-lry\lib\site-packages (2.19.1)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in c:\users\yuji3\.virtualenvs\myproject-sgdw-lry\lib\site-packages (from requests) (3.0.4)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\yuji3\.virtualenvs\myproject-sgdw-lry\lib\site-packages (from requests) (2018.8.24)
Requirement already satisfied: urllib3<1.24,>=1.21.1 in c:\users\yuji3\.virtualenvs\myproject-sgdw-lry\lib\site-packages (from requests) (1.23)
Requirement already satisfied: idna<2.8,>=2.5 in c:\users\yuji3\.virtualenvs\myproject-sgdw-lry\lib\site-packages (from requests) (2.7)
Adding requests to Pipfile's [packages]...
Pipfile.lock not found, creating...
Locking [dev-packages] dependencies...
Locking [packages] dependencies...
0\envs\visualization\lib\site-packages\pipenv\utils.py", line 402, in resolve_deps
req_dir=req_dir
File "c:\users\yuji3\anaconda3_5.2.0\envs\visualization\lib\site-packages\pipenv\utils.py", line 250, in actually_resolve_deps
req = Requirement.from_line(dep)
File "c:\users\yuji3\anaconda3_5.2.0\envs\visualization\lib\site-packages\pipenv\vendor\requirementslib\models\requirements.py", line 704, in from_line
line, extras = _strip_extras(line)
TypeError: 'module' object is not callable
@yuji38kwmt stellen Sie sicher, dass Pip 18.0 in Ihrer virtuellen Umgebung ist
Danke, dass ihr alle gemeldet habt!
Bitte kommentieren Sie hier nicht und geben Sie Ihre Kommentare unter #2924 ein. Der Grund fĂŒr das Problem wurde identifiziert und der Fix sollte in naher Zukunft mit einer neuen Version von pipenv verfĂŒgbar sein.
Das obige hat bei mir nicht ganz funktioniert, was tat, war:
pip install pipenv==2018.6.25 pip install pip==18.0 pipenv install
Diese Lösung wird möglicherweise nicht sofort wirksam, weshalb es groĂartig wĂ€re, die Shell zu beenden und erneut zu aktivieren. FYI.
FĂŒr mich wurde dies durch den Wechsel zur neuesten Version von pipenv ( pipenv, version 2018.10.9
) behoben.
Ubuntu 16.04 LTS
Python 3.5
Ich habe ein Rollback auf pip==9.0.3 durchgefĂŒhrt. Pipenv versuchte immer noch, pip==18.0.1 zu verwenden.
> pip install pip==9.0.3
> pip run pip install pip==9.0.3
> pipenv install #success
es funktioniert danke!
Diese Problemumgehung funktioniert unter Linux Mint 18.3 âSylviaâ (basierend auf Ubuntu Xenial) mit Python 3.7, das von Deadsnakes PPA installiert wurde:
pipenv-Shell
pip installieren pip==18.0
pipenv installieren
pipenv muss nicht geĂ€ndert werden. Das heiĂt, Sie mĂŒssen diesen Befehl nicht ausfĂŒhren:
pip install pipenv==2018.6.25
Ich habe noch:
pipenv, Version 2018.7.1
Installieren Sie einfach pip in Ihrer virtuellen Umgebung (nicht in Ihrem Hauptbetriebssystem). Das heiĂt: Aktivieren Sie Ihre virtuelle Umgebung mit:
pipenv-Shell
bevor Sie die gewĂŒnschte Pip-Version installieren.
jetzt pipenv run pip install pip==18.0
Scheint mit #2924 behoben zu sein.
Aktualisieren Sie pipenv und es funktioniert.
pip install pipenv -U
pipenv install
vielleicht sollte dieses Thema nochmal aufgemacht werden
Ja nein, das ist gelöst. Wenn Sie einen Fehler in der neuesten Version haben, öffnen Sie ein Problem. Posten Sie nicht mit 0 Kontext und sagen Sie, wir sollten etwas wiedereröffnen.
Hilfreichster Kommentar
Dies ist eine Problemumgehung, um die Pip-Version auf 18.0 zu sperren