from packaging import version as pack_version ImportError: No module named packaging
Cameron Simpson
cs at cskk.id.au
Mon Oct 30 16:59:35 EDT 2017
On 30Oct2017 10:48, David Gabriel <davidgab283 at gmail.com> wrote:
>When I run this command I got this error message:
>
>ubuntu at orchestrateur:/tmp/pack$ virtualenv -p $(which python3.5) .
[...]
>OSError: [Errno 13] Permission denied
Peter has explained this failure. Note that in the shell you can show command
execution, which is very helpful for figuring out this kind of thing:
set -x
virtualenv -p $(which python3.5) .
set +x
which would show you the actual virtualenv command invoked. In particular, it
would be apparent (if Peter's suggestion is correct) that the result of "which
python3.5" was empty, leading to an invalid "virtualenv" incantation.
However, I write about something else:
>This error is also reproducible using sudo.
I've seen this before. NEVER EVER do this! If something fails, DO NOT reach for
"sudo" to "fix" the problem. Usually things fail because of mistaken use (such
as your example) or because of some system policy forbidding the action.
In both cases the correct process is to understand why the failure occurred,
NOT to try to run the action in some special privileged mode to avoid the
check.
Please try not to reach for "sudo" by reflex. It _will_ get you into trouble
one day, either by doing unintended damage to your stuff or by raising the ire
of some sysadmin when you try it on some system that is their responsibility.
Thank you,
Cameron Simpson <cs at cskk.id.au> (formerly cs at zip.com.au)
More information about the Python-list
mailing list