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

Issue with installing GitPython on Windows 10 / Python 3.7 #1243

Closed
3 tasks done
aaront opened this issue Jul 23, 2019 · 6 comments
Closed
3 tasks done

Issue with installing GitPython on Windows 10 / Python 3.7 #1243

aaront opened this issue Jul 23, 2019 · 6 comments

Comments

@aaront
Copy link

aaront commented Jul 23, 2019

  • I am on the latest Poetry version.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).

Issue

When trying to install the GitPython dependency on Windows 10 (with Python 3.7) in a project, I get the following error:

[PermissionError]
[WinError 5] Access is denied: 'C:\\Users\\aaron\\AppData\\Local\\Temp\\tmplx22xv9u\\unpacked\\gitdb-0.6.4\\gitdb\\test\\fixtures\\objects\\88\\8401851f15db0eed60eb1bc29dec5ddcace911'

(I've logged the output of poetry install -vvv in the gist: https://gist.github.com/aaront/9c1156015284a29f7c2bb5cd9435fdc8 )

Repeated attempts to install the package yield the same result (even attempted on 2 different machines). Also attempted to install the gitdb dependency itself first, to the same issue.

Installing this inside Ubuntu/WSL works without issues:

Creating virtualenv gitypython-test-py3.7 in /home/aaron/.cache/pypoetry/virtualenvs
Updating dependencies
Resolving dependencies... (1.1s)

Writing lock file


Package operations: 14 installs, 0 updates, 0 removals

  - Installing zipp (0.5.2)
  - Installing importlib-metadata (0.18)
  - Installing smmap2 (2.0.5)
  - Installing atomicwrites (1.3.0)
  - Installing attrs (19.1.0)
  - Installing ddt (1.2.1)
  - Installing gitdb (0.6.4)
  - Installing gitdb2 (2.0.5)
  - Installing more-itertools (7.2.0)
  - Installing pluggy (0.12.0)
  - Installing py (1.8.0)
  - Installing six (1.12.0)
  - Installing gitpython (2.1.12)
  - Installing pytest (3.10.1)
  - Installing gitypython-test (0.1.0)
@aaront
Copy link
Author

aaront commented Jul 23, 2019

I should also note installing this with pip inside when running poetry shell does work.

@kmray
Copy link

kmray commented Jul 25, 2019

I have also run into this issue:

Poetry 1.0.0a5
Python 3.6.6
Windows 10.0.17134

poetry lock -vvv
...
PyPI: Getting info for gitdb (0.6.4) from PyPI
PyPI: No dependencies found, downloading archives
PyPI: Downloading sdist: gitdb-0.6.4.tar.gz
   1: Version solving took 8.980 seconds.
   1: Tried 1 solutions.

[PermissionError]
[WinError 5] Access is denied: 'C:\\Users\\kmray\\AppData\\Local\\Temp\\tmp4d1wsfpx\\unpacked\\gitdb-0.6.4\\gitdb\\test\\fixtures\\objects\\88\\8401851f15db0eed60eb1bc29dec5ddcace911'

Traceback (most recent call last):
  File "C:\Users\kmray\.poetry\lib\poetry\_vendor\py3.6\clikit\console_application.py", line 132, in run
    status_code = command.handle(parsed_args, io)
  File "C:\Users\kmray\.poetry\lib\poetry\_vendor\py3.6\clikit\api\command\command.py", line 119, in handle
    status_code = self._do_handle(args, io)
  File "C:\Users\kmray\.poetry\lib\poetry\_vendor\py3.6\clikit\api\command\command.py", line 167, in _do_handle
    return getattr(handler, handler_method)(args, io, self)
  File "C:\Users\kmray\.poetry\lib\poetry\_vendor\py3.6\cleo\commands\command.py", line 92, in wrap_handle
    return self.handle()
  File "C:\Users\kmray\.poetry\lib\poetry\console\commands\lock.py", line 26, in handle
    return installer.run()
  File "C:\Users\kmray\.poetry\lib\poetry\installation\installer.py", line 75, in run
    self._do_install(local_repo)
  File "C:\Users\kmray\.poetry\lib\poetry\installation\installer.py", line 167, in _do_install
    ops = solver.solve(use_latest=self._whitelist)
  File "C:\Users\kmray\.poetry\lib\poetry\puzzle\solver.py", line 38, in solve
    packages, depths = self._solve(use_latest=use_latest)
  File "C:\Users\kmray\.poetry\lib\poetry\puzzle\solver.py", line 173, in _solve
    self._package, self._provider, locked=locked, use_latest=use_latest
  File "C:\Users\kmray\.poetry\lib\poetry\mixology\__init__.py", line 7, in resolve_version
    return solver.solve()
  File "C:\Users\kmray\.poetry\lib\poetry\mixology\version_solver.py", line 79, in solve
    next = self._choose_package_version()
  File "C:\Users\kmray\.poetry\lib\poetry\mixology\version_solver.py", line 377, in _choose_package_version
    version = self._provider.complete_package(version)
  File "C:\Users\kmray\.poetry\lib\poetry\puzzle\provider.py", line 506, in complete_package
    repository=package.dependency.source_name,
  File "C:\Users\kmray\.poetry\lib\poetry\repositories\pool.py", line 115, in package
    package = repo.package(name, version, extras=extras)
  File "C:\Users\kmray\.poetry\lib\poetry\repositories\pypi_repository.py", line 175, in package
    release_info = self.get_release_info(name, version)
  File "C:\Users\kmray\.poetry\lib\poetry\repositories\pypi_repository.py", line 278, in get_release_info
    '{}:{}'.format(name, version), lambda: self._get_release_info(name, version)
  File "C:\Users\kmray\.poetry\lib\poetry\_vendor\py3.6\cachy\repository.py", line 174, in remember_forever
    val = value(callback)
  File "C:\Users\kmray\.poetry\lib\poetry\_vendor\py3.6\cachy\helpers.py", line 6, in value
    return val()
  File "C:\Users\kmray\.poetry\lib\poetry\repositories\pypi_repository.py", line 278, in <lambda>
    '{}:{}'.format(name, version), lambda: self._get_release_info(name, version)
  File "C:\Users\kmray\.poetry\lib\poetry\repositories\pypi_repository.py", line 340, in _get_release_info
    info = self._get_info_from_urls(urls)
  File "C:\Users\kmray\.poetry\lib\poetry\repositories\pypi_repository.py", line 450, in _get_info_from_urls
    return self._get_info_from_sdist(urls['sdist'][0])
  File "C:\Users\kmray\.poetry\lib\poetry\repositories\pypi_repository.py", line 588, in _get_info_from_sdist
    return info
  File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\contextlib.py", line 88, in __exit__
    next(self.gen)
  File "C:\Users\kmray\.poetry\lib\poetry\utils\helpers.py", line 39, in temporary_directory
    yield name
  File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\tempfile.py", line 809, in __exit__
    self.cleanup()
  File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\tempfile.py", line 813, in cleanup
    _shutil.rmtree(self.name)
  File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\shutil.py", line 494, in rmtree
    return _rmtree_unsafe(path, onerror)
  File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\shutil.py", line 384, in _rmtree_unsafe
    _rmtree_unsafe(fullname, onerror)
  File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\shutil.py", line 384, in _rmtree_unsafe
    _rmtree_unsafe(fullname, onerror)
  File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\shutil.py", line 384, in _rmtree_unsafe
    _rmtree_unsafe(fullname, onerror)
  [Previous line repeated 3 more times]
  File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\shutil.py", line 389, in _rmtree_unsafe
    onerror(os.unlink, fullname, sys.exc_info())
  File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\shutil.py", line 387, in _rmtree_unsafe
    os.unlink(fullname)

@brno32
Copy link

brno32 commented Aug 13, 2019

Several coworkers and I are also getting this issue on Windows 10 with a variety of poetry commands (though we're on Python 3.6). Usually, making a new virtualenv seems to help, but we've come across some operations that do not work even in a fresh environment

@absassi
Copy link

absassi commented Nov 11, 2019

This seems to be duplicate of #1031 and would be fixed by #1032.

@abn
Copy link
Member

abn commented Apr 28, 2022

The reported issue was fixed with c12d86b7. Other cases covered in #5510.

Copy link

github-actions bot commented Mar 2, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants