How to install virtualenv for python3?
我正在创建一个Django应用程序并坚持virtualenv安装。 我已经看到了这一点,并试图遵循,但每次我尝试的东西都会导致这种情况。 为什么不能使用python 3进行安装,但这可以工作
1 2 3 4 5 6 7 8 9 | virtualenv -p python3 venv Running virtualenv with interpreter /home/oroborus/anaconda3/bin/python3 Using base prefix '/home/oroborus/anaconda3' New python executable in venv/bin/python3 Also creating executable in venv/bin/python venv/bin/python3: error while loading shared libraries: libpython3.5m.so.1.0: cannot open shared object file: No such file or directory ERROR: The executable venv/bin/python3 is not functioning ERROR: It thinks sys.prefix is '/home/oroborus/PycharmProjects/test-app' (should be '/home/oroborus/PycharmProjects/test-app/venv') ERROR: virtualenv is not compatible with this system or executable |
输入
1 2 3 4 5 6 7 8 9 10 | locate libpython3.5 /home/oroborus/anaconda3/envs/tensorflow/lib/libpython3.5m.so /home/oroborus/anaconda3/envs/tensorflow/lib/libpython3.5m.so.1.0 /home/oroborus/anaconda3/envs/tensorflow/lib/python3.5/config-3.5m/libpython3.5m.a /home/oroborus/anaconda3/lib/libpython3.5m.so /home/oroborus/anaconda3/lib/libpython3.5m.so.1.0 /home/oroborus/anaconda3/lib/python3.5/config-3.5m/libpython3.5m.a /home/oroborus/anaconda3/pkgs/python-3.5.2-0/lib/libpython3.5m.so /home/oroborus/anaconda3/pkgs/python-3.5.2-0/lib/libpython3.5m.so.1.0 /home/oroborus/anaconda3/pkgs/python-3.5.2-0/lib/python3.5/config-3.5m/libpython3.5m.a |
像debian这样的debian可以使用
使用apt
然后像那样
编辑:
在这种情况下,使用anaconda,它具有替换
使用conda创建virtualenv可以这样做: