pyvenv-3.4 returned non-zero exit status 1

前端 未结 16 924
我寻月下人不归
我寻月下人不归 2020-12-12 15:35

I\'m in Kubuntu 14.04 , I want to create a virtualenv with python3.4. I did with python2.7 before in other folder. But when I try:

pyvenv-3.4 venv

相关标签:
16条回答
  • 2020-12-12 15:59

    You are missing the venv lib for python 3.4, just run:

    $ apt-get install python3.4-dev python3.4-venv
    

    And then create your virtualenv

    python3.4 -m venv myVenv
    
    0 讨论(0)
  • 2020-12-12 16:01

    Pyvenv comes bundled with newer version of python 3 and is supposed to replace virtualenv, so it's not quite the same thing.

    There was some problem with the python 3.4 in the first release of Ubuntu 14.04 that caused this error.

    Upgrading the distro solved this issue for me. I guess it probably works with Kubuntu as well.

    sudo do-release-upgrade -d # this takes a while, and involves a reboot as well. 
    sudo apt-get install python3.4-venv
    pyvenv-3.4 venv
    

    Please read the docs for do-release-upgrade before running it. Using the -d flag will upgrade to latest devel release, which might include some unstable software.

    You can't undo do-release-upgrade

    0 讨论(0)
  • 2020-12-12 16:05

    This is my solution for the error:

    $ python3.6 -m venv venv

    Failing command: ['/venv/bin/python3.6', '-Im', 'ensurepip', '--upgrade', '--default-pip']

    Solution:

    $ rm -rf venv
    $ apt install python3.6-venv
    $ python3.6 -m venv venv
    
    0 讨论(0)
  • 2020-12-12 16:08

    I was also facing the same issue.

    [niraj@abc ~]$/python/v3.7.0/bin/python3 -m venv avd
    Error: Command '['/home/niraj/avd/bin/python3', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1.
    

    After adding libffi3.3 on my LD_LIBRARY_PATH it works

    setenv LD_LIBRARY_PATH /libffi/v3.3/lib64

    0 讨论(0)
  • 2020-12-12 16:10

    Just run the command:

    $ apt-get install python3-venv
    

    and then create your virtual environment by running:

    $ python3.6 -m venv
    
    0 讨论(0)
  • 2020-12-12 16:11

    This worked for me in python 3.6 and OSX

    $ python -m venv --without-pip my_dir
    $ source my_dir/bin/activate
    $ curl https://bootstrap.pypa.io/get-pip.py | python
    $ deactivate
    $ source my_dir/bin/activate
    (my_dir) user$
    
    0 讨论(0)
提交回复
热议问题