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

Can't install '.' requirement when virtualenv is local #4295

Closed
frostming opened this issue May 30, 2020 · 0 comments · Fixed by #4302
Closed

Can't install '.' requirement when virtualenv is local #4295

frostming opened this issue May 30, 2020 · 0 comments · Fixed by #4302
Labels
Type: Bug 🐛 This issue is a bug. Type: Regression This issue is a regression of a previous behavior.

Comments

@frostming
Copy link
Contributor

frostming commented May 30, 2020

Steps to replicate

$ git clone https://github.com/pallets/flask.git
$ cd flask
$ virtualenv venv
$ . venv/bin/activate
$ pipenv install -e .

Actual result

Courtesy Notice: Pipenv found itself running within a virtual environment, so it will automatically use that environment, instead of creating its own for any project. You can set PIPENV_IGNORE_VIRTUALENVS=1 to force pipenv to ignore that environment and create its own instead. You can set PIPENV_VERBOSITY=-1 to suppress this warning.
Installing -e .…
Adding setuptools to Pipfile's [packages]…
✔ Installation Succeeded
Pipfile.lock (0ba3fc) out of date, updating to (77786a)…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
Building requirements...
Traceback (most recent call last):
  File "/Users/fming/.local/bin/pipenv", line 11, in <module>
    load_entry_point('pipenv', 'console_scripts', 'pipenv')()
  File "/Users/fming/wkspace/github/pipenv/pipenv/vendor/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/Users/fming/wkspace/github/pipenv/pipenv/vendor/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/Users/fming/wkspace/github/pipenv/pipenv/vendor/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/fming/wkspace/github/pipenv/pipenv/vendor/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/fming/wkspace/github/pipenv/pipenv/vendor/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/Users/fming/wkspace/github/pipenv/pipenv/vendor/click/decorators.py", line 73, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "/Users/fming/wkspace/github/pipenv/pipenv/vendor/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/Users/fming/wkspace/github/pipenv/pipenv/vendor/click/decorators.py", line 21, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/Users/fming/wkspace/github/pipenv/pipenv/cli/command.py", line 252, in install
    site_packages=state.site_packages
  File "/Users/fming/wkspace/github/pipenv/pipenv/core.py", line 2201, in do_install
    skip_lock=skip_lock,
  File "/Users/fming/wkspace/github/pipenv/pipenv/core.py", line 1281, in do_init
    pypi_mirror=pypi_mirror,
  File "/Users/fming/wkspace/github/pipenv/pipenv/core.py", line 1114, in do_lock
    keep_outdated=keep_outdated
  File "/Users/fming/wkspace/github/pipenv/pipenv/utils.py", line 1318, in venv_resolve_deps
    deps, project, r=False, include_index=True
  File "/Users/fming/wkspace/github/pipenv/pipenv/utils.py", line 1434, in convert_deps_to_pip
    new_dep = Requirement.from_pipfile(dep_name, dep)
  File "/Users/fming/wkspace/github/pipenv/pipenv/vendor/requirementslib/models/requirements.py", line 2743, in from_pipfile
    r = FileRequirement.from_pipfile(name, pipfile)
  File "/Users/fming/wkspace/github/pipenv/pipenv/vendor/requirementslib/models/requirements.py", line 1843, in from_pipfile
    arg_dict["setup_info"] = arg_dict["parsed_line"].setup_info
  File "/Users/fming/wkspace/github/pipenv/pipenv/vendor/requirementslib/models/requirements.py", line 813, in setup_info
    self.setup_info = self.get_setup_info()
  File "/Users/fming/wkspace/github/pipenv/pipenv/vendor/requirementslib/models/requirements.py", line 802, in get_setup_info
    setup_info = SetupInfo.from_ireq(self.ireq, subdir=self.subdirectory)
  File "/Users/fming/wkspace/github/pipenv/pipenv/vendor/requirementslib/models/setup_info.py", line 1851, in from_ireq
    shutil.copytree(path, target)
  File "/Users/fming/Library/PythonUp/versions/3.7/lib/python3.7/shutil.py", line 368, in copytree
    raise Error(errors)
shutil.Error: [('/Users/fming/wkspace/github/flask/venv/bin/python3', '/var/folders/vh/5_b6mbg93vg2npbb21v03vwr0000gn/T/reqlib-src7cnho_yw/flask/venv/bin/python3', "[Errno 13] Permission denied: '/Users/fming/wkspace/github/flask/venv/bin/python3'"), ('/Users/fming/wkspace/github/flask/venv/bin/python', '/var/folders/vh/5_b6mbg93vg2npbb21v03vwr0000gn/T/reqlib-src7cnho_yw/flask/venv/bin/python', "[Errno 13] Permission denied: '/Users/fming/wkspace/github/flask/venv/bin/python'")]

It is caused by the copy_tree call introduced in recent releases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug 🐛 This issue is a bug. Type: Regression This issue is a regression of a previous behavior.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant