question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Venv is created without pip

See original GitHub issue

This causes an EnvironmentError: Permission Denied when I try to install anything, because it ends up using system-wide pip. What I find terribly strange is that the necessary flag is actually being passed here: https://github.com/sdispater/poetry/blob/develop/poetry/utils/venv.py#L140

~ $ poetry new foo
Created package foo in foo
~ $ cd foo
~/foo $ poetry add -D mypy
Using version ^0.600.0 for mypy

Updating dependencies
Resolving dependencies... (0.1s)


Package operations: 8 installs, 0 updates, 0 removals

Writing lock file

  - Installing atomicwrites (1.1.5)
                                                                                                                                        
[VenvCommandError]                                                                                                       
Command ['pip', 'install', '--no-deps', '-r', '/tmp/atomicwrites-1.1.55axra81lreqs.txt'] errored with the following output:           
Collecting atomicwrites==1.1.5 (from -r /tmp/atomicwrites-1.1.55axra81lreqs.txt (line 1))                                             
  Using cached https://files.pythonhosted.org/packages/0a/e8/cd6375e7a59664eeea9e1c77a766eeac0fc3083bb958c2b41ec46b95f29c/atomicwrit  
es-1.1.5-py2.py3-none-any.whl                                                                                                         
Installing collected packages: atomicwrites                                                                                           
Could not install packages due to an EnvironmentError: [Errno 13] Permissão negada: '/usr/lib/python3.6/site-packages/atomicwrites-1  
.1.5.dist-info'                                                                                                                       
Consider using the `--user` option or check the permissions.                                                                          
                                                                                                                                        
add [-D|--dev] [--git GIT] [--path PATH] [-E|--extras EXTRAS] [--optional] [--python PYTHON] [--platform PLATFORM] [--allow-prereleases] [--dry-run] [--] <name> (<name>)...

~/foo $ ls .venv/bin
activate  activate.csh  activate.fish  python  python3

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
cauebscommented, Jun 6, 2018

@Victor-Savu It does, I’ve already tried it and commented there 😃

0reactions
cauebscommented, Jun 28, 2018

Ok, the pipsi available on PyPI is outdated (for almost three years, now) and shouldn’t be used. That version always uses virtualenv instead of venv, even on python 3, and that’s why poetry couldn’t properly create virtualenvs. I installed pipsi from the git repo, installed poetry with it, and everything is fine.

Read more comments on GitHub >

github_iconTop Results From Across the Web

venv — Creation of virtual environments — Python 3.11.1 ...
A virtual environment is created on top of an existing Python installation, known as the virtual environment's “base” Python, and may optionally be...
Read more >
virtualenv does not include pip - Stack Overflow
After I run virtualenv venv , it creates new environment, catches Python 2.7.11 from brew -installation, but: there is no pip inside bin ......
Read more >
Venv is created without pip #169 - python-poetry/poetry - GitHub
This causes an EnvironmentError: Permission Denied when I try to install anything, because it ends up using system-wide pip.
Read more >
Python Virtual Environments: A Primer
In this tutorial, you'll learn how to work with Python's venv module to create and manage separate virtual environments for your Python ......
Read more >
pip and venv User Guide | Office of Information Technology
The combination of pip and virtualenv provides package management in isolated environments using Python. pip retrieves packages from the Python Package Index ( ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found