from packaging import version as pack_version ImportError: No module named packaging

David Gabriel davidgab283 at gmail.com
Mon Oct 30 05:48:24 EDT 2017


Dears,

When I run this command I got this error message:

ubuntu at orchestrateur:/tmp/pack$ virtualenv -p $(which python3.5) .
Running virtualenv with interpreter /usr/local/sbin/.
Traceback (most recent call last):
  File "/usr/bin/virtualenv", line 3, in <module>
    virtualenv.main()
  File "/usr/lib/python2.7/dist-packages/virtualenv.py", line 784, in main
    popen = subprocess.Popen([interpreter, file] + sys.argv[1:], env=env)
  File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child
    raise child_exception
OSError: [Errno 13] Permission denied


This error is also reproducible using sudo.
Please advise how to fix it.

Thanks in advance.
Best regards


2017-10-28 14:33 GMT+02:00 David Gabriel <davidgab283 at gmail.com>:

> I forget to precise that I am using pycharm.
> And this issue is reproducible also using command line to run the code.
>
> Best regards
>
> 2017-10-28 14:31 GMT+02:00 David Gabriel <davidgab283 at gmail.com>:
>
>> Thanks so Lutz much for your reply.
>> I am using python2.7 and I am running this code in an Openstack instance.
>> I will apply your recommandation and let you know about the result ...
>>
>> Kind regards.
>>
>> 2017-10-27 16:13 GMT+02:00 Lutz Horn <lutz.horn at posteo.de>:
>>
>>> On Fri, Oct 27, 2017 at 03:56:39PM +0200, David Gabriel wrote:
>>> > from packaging import version as pack_version
>>> > ImportError: No module named packaging
>>> >
>>> > I googled it and I have found so many suggestions regarding updating
>>> > 'pip' and installing python-setuptools but all of these did not fix
>>> > this issue.
>>>
>>> So many questions:
>>>
>>> * What is your Python version?
>>> * Do you use virtualenv?
>>> * How?
>>> * Did you install packaging in this virtualenv?
>>>
>>> Just one example of making this work:
>>>
>>> $ mkdir /tmp/pack
>>> $ cd /tmp/pack
>>> $ virtualenv -p $(which python3.5) .
>>> Running virtualenv with interpreter /usr/bin/python3.5
>>> Using base prefix '/usr'
>>> New python executable in /tmp/pack/bin/python3.5
>>> Also creating executable in /tmp/pack/bin/python
>>> Installing setuptools, pkg_resources, pip, wheel...done.
>>> $ source bin/activate
>>> $ pip3 install packaging
>>> Collecting packaging
>>>   Using cached packaging-16.8-py2.py3-none-any.whl
>>> Collecting six (from packaging)
>>>   Using cached six-1.11.0-py2.py3-none-any.whl
>>> Collecting pyparsing (from packaging)
>>>   Using cached pyparsing-2.2.0-py2.py3-none-any.whl
>>> Installing collected packages: six, pyparsing, packaging
>>> Successfully installed packaging-16.8 pyparsing-2.2.0 six-1.11.0
>>> $ python3.5
>>> Python 3.5.2 (default, Sep 14 2017, 22:51:06)
>>> [GCC 5.4.0 20160609] on linux
>>> Type "help", "copyright", "credits" or "license" for more
>>> information.
>>> >>> from packaging import version as pack_version
>>> >>>
>>> --
>>> https://mail.python.org/mailman/listinfo/python-list
>>>
>>
>>
>



More information about the Python-list mailing list