Django 1.7 installation using pyvenv with python 3.4 in Ubuntu Trusty 14.04 -
Django 1.7 installation using pyvenv with python 3.4 in Ubuntu Trusty 14.04 -
just wanted share since used day figure out in many threads.
i wanted utilize pyvenv instead virtualenv since ships python 3.3 , above. called virtualenvironment "pisara"
first of ubuntu 14.04 ships broken pyvenv. need install with:
pyvenv-3.4 --without-pip pisara
if seek install django 1.7 after it, , error point python 2.7 folder:
>(pisara) vagrant@vagrant-ubuntu-trusty-64:/vagrant/projects$ pip install django downloading/unpacking django downloading django-1.7.1-py2.py3-none-any.whl (7.4mb): 7.4mb downloaded installing collected packages: django cleaning up... exception: traceback (most recent phone call last): file "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main status = self.run(options, args) file "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 283, in run requirement_set.install(install_options, global_options, root=options.root_path) file "/usr/lib/python2.7/dist-packages/pip/req.py", line 1435, in install requirement.install(install_options, global_options, *args, **kwargs) file "/usr/lib/python2.7/dist-packages/pip/req.py", line 671, in install self.move_wheel_files(self.source_dir, root=root) file "/usr/lib/python2.7/dist-packages/pip/req.py", line 901, in move_wheel_files pycompile=self.pycompile, file "/usr/lib/python2.7/dist-packages/pip/wheel.py", line 206, in move_wheel_files clobber(source, lib_dir, true) file "/usr/lib/python2.7/dist-packages/pip/wheel.py", line 193, in clobber os.makedirs(destsubdir) file "/usr/lib/python2.7/os.py", line 157, in makedirs mkdir(name, mode) oserror: [errno 13] permission denied: '/usr/local/lib/python2.7/dist-packages/django'
it points out permission errors, can sudo not installed virtual environment...
so, install pip (since pyvenv had installed without it)
source test4/bin/activate curl https://bootstrap.pypa.io/get-pip.py | python deactivate source test4/bin/activate
then install django:
pip install django
the next process installing pip, django , validation works:
(pisara) vagrant@vagrant-ubuntu-trusty-64:/vagrant/projects/pisara/bin$ curl https://bootstrap.pypa.io/get-pip.py | python % total % received % xferd average speed time time time current dload upload total spent left speed 100 1309k 100 1309k 0 0 204k 0 0:00:06 0:00:06 --:--:-- 337k downloading/unpacking pip downloading pip-1.5.6-py2.py3-none-any.whl (1.0mb): 1.0mb downloaded downloading/unpacking setuptools downloading setuptools-7.0-py2.py3-none-any.whl (534kb): 534kb downloaded installing collected packages: pip, setuptools installed pip setuptools cleaning up... (pisara) vagrant@vagrant-ubuntu-trusty-64:/vagrant/projects/pisara/bin$ deactivate vagrant@vagrant-ubuntu-trusty-64:/vagrant/projects/pisara/bin$ source activate (pisara) vagrant@vagrant-ubuntu-trusty-64:/vagrant/projects/pisara/bin$ pip install django downloading/unpacking django downloading django-1.7.1-py2.py3-none-any.whl (7.4mb): 7.4mb downloaded installing collected packages: django installed django cleaning up... (pisara) vagrant@vagrant-ubuntu-trusty-64:/vagrant/projects/pisara/bin$ python python 3.4.0 (default, apr 11 2014, 13:05:11) [gcc 4.8.2] on linux type "help", "copyright", "credits" or "license" more information. >>> import django >>> print(django.get_version()) 1.7.1
ubuntu-14.04 python-3.4 django-1.7
Comments
Post a Comment