我有一些问题让pipenv在OSX上工作
我现在不在任何虚拟环境中。为了确保我有最新版本,我跑了
$ sudo pip3 install pipenv --upgrade
这很成功。
当我运行pipenv install --dev --three
时,我得到:
Traceback (most recent call last):
File "/usr/local/bin/pipenv", line 6, in <module>
from pkg_resources import load_entry_point
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 656, in _load_unlocked
File "<frozen importlib._bootstrap>", line 626, in _load_backward_compatible
File "/Users/frederikcreemers/.venvburrito/lib/python2.7/site-packages/setuptools-8.2-py2.7.egg/pkg_resources.py", line 1649, in <module>
AttributeError: module 'importlib._bootstrap' has no attribute 'SourceFileLoader
我没有认识到这个.venvburrito
,但是查找它,它是一个用于管理virtualenv和virtualenvwrapper虚拟环境的系统。我不记得曾经安装它,但也许这是我用过的其他东西的依赖。
当我用sudo运行命令时:
$ sudo pipenv install --dev --three
Virtualenv already exists!
Removing existing virtualenv…
Creating a virtualenv for this project…
Using /usr/local/bin/python3 to create virtualenv…
⠋Running virtualenv with interpreter /usr/local/bin/python3
Using base prefix '/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6'
New python executable in /Users/frederikcreemers/.local/share/virtualenvs/appointment_tracker-KjOE-2Zx/bin/python3.6
Also creating executable in /Users/frederikcreemers/.local/share/virtualenvs/appointment_tracker-KjOE-2Zx/bin/python
Installing setuptools, pip, wheel...done.
Virtualenv location: /Users/frederikcreemers/.local/share/virtualenvs/appointment_tracker-KjOE-2Zx
Pipfile.lock not found, creating…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
Warning: Your dependencies could not be resolved. You likely have a mismatch in your sub-dependencies.
You can use $ pipenv install --skip-lock to bypass this mechanism, then run $ pipenv graph to inspect the situation.
Could not find a version that matches pylint<1.8,>=1.0,>=1.5.6,>=1.8.2
Tried: 0.15.2, 0.16.0, 0.18.0, 0.18.1, 0.19.0, 0.20.0, 0.21.0, 0.21.1, 0.21.2, 0.21.3, 0.22.0, 0.23.0, 0.24.0, 0.25.0, 0.25.1, 0.25.2, 0.26.0, 0.27.0, 0.28.0, 1.0.0, 1.1.0, 1.2.0, 1.2.1, 1.3.0, 1.3.1, 1.4.0, 1.4.0, 1.4.1, 1.4.1, 1.4.2, 1.4.2, 1.4.3, 1.4.3, 1.4.4, 1.4.4, 1.4.5, 1.4.5, 1.5.0, 1.5.0, 1.5.1, 1.5.1, 1.5.2, 1.5.2, 1.5.3, 1.5.3, 1.5.4, 1.5.4, 1.5.5, 1.5.5, 1.5.6, 1.5.6, 1.6.0, 1.6.0, 1.6.1, 1.6.1, 1.6.2, 1.6.2, 1.6.3, 1.6.3, 1.6.4, 1.6.4, 1.6.5, 1.6.5, 1.7.0, 1.7.0, 1.7.1, 1.7.1, 1.7.2, 1.7.2, 1.7.3, 1.7.3, 1.7.4, 1.7.4, 1.7.5, 1.7.5, 1.8.0, 1.8.0, 1.8.1, 1.8.1, 1.8.2, 1.8.2
CRITICAL:pip.utils:Error [Errno 2] No such file or directory: '"/usr/local/opt/python3/bin/python3.6"': '"/usr/local/opt/python3/bin/python3.6"' while executing command python setup.py egg_info
Traceback (most recent call last):
File "/usr/local/bin/pipenv", line 11, in <module>
load_entry_point('pipenv==9.0.3', 'console_scripts', 'pipenv')()
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 1865, in install
do_init(dev=dev, allow_global=system, ignore_pipfile=ignore_pipfile, system=system, skip_lock=skip_lock, verbose=verbose, concurrent=concurrent, deploy=deploy, pre=pre)
File "/usr/local/lib/python3.6/site-packages/pipenv/cli.py", line 1311, in do_init
do_lock(system=system, pre=pre)
File "/usr/local/lib/python3.6/site-packages/pipenv/cli.py", line 1102, in do_lock
pre=pre
File "/usr/local/lib/python3.6/site-packages/pipenv/utils.py", line 557, in resolve_deps
resolved_tree = actually_resolve_reps(deps, index_lookup, markers_lookup, project, sources, verbose, clear, pre)
File "/usr/local/lib/python3.6/site-packages/pipenv/utils.py", line 507, in actually_resolve_reps
resolved_tree.update(resolver.resolve(max_rounds=PIPENV_MAX_ROUNDS))
File "/usr/local/lib/python3.6/site-packages/pipenv/patched/piptools/resolver.py", line 102, in resolve
has_changed, best_matches = self._resolve_one_round()
File "/usr/local/lib/python3.6/site-packages/pipenv/patched/piptools/resolver.py", line 200, in _resolve_one_round
for dep in self._iter_dependencies(best_match):
File "/usr/local/lib/python3.6/site-packages/pipenv/patched/piptools/resolver.py", line 283, in _iter_dependencies
for dependency in self.repository.get_dependencies(ireq):
File "/usr/local/lib/python3.6/site-packages/pipenv/patched/piptools/repositories/pypi.py", line 153, in get_dependencies
result = reqset._prepare_file(self.finder, ireq)
File "/usr/local/lib/python3.6/site-packages/pipenv/patched/pip/req/req_set.py", line 639, in _prepare_file
abstract_dist.prep_for_dist()
File "/usr/local/lib/python3.6/site-packages/pipenv/patched/pip/req/req_set.py", line 134, in prep_for_dist
self.req_to_install.run_egg_info()
File "/usr/local/lib/python3.6/site-packages/pipenv/patched/pip/req/req_install.py", line 438, in run_egg_info
command_desc='python setup.py egg_info')
File "/usr/local/lib/python3.6/site-packages/pipenv/patched/pip/utils/__init__.py", line 667, in call_subprocess
cwd=cwd, env=env)
File "/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 709, in __init__
restore_signals, start_new_session)
File "/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 1344, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '"/usr/local/opt/python3/bin/python3.6"': '"/usr/local/opt/python3/bin/python3.6"'
答案 0 :(得分:-1)
这可能会有所帮助: pip install -U setuptools (或pip3安装-U setuptools) 然后再次尝试安装包