X
X
xozzslip2015-06-18 22:08:56
linux
xozzslip, 2015-06-18 22:08:56

How to deal with versions?

There are several versions of python 2.7, 3.4.0, 3.4.1 on the computer. I want to use the latter, but when I try to download the lib using pip3, it downloads to the directory for 3.4.0.
The problem started with downloading Django. And here the system behaved strangely: django-admin is available for the latest python, but the django module itself is not. It also does not have its own pip3, which, it seems, is out of the box. For 3.4.0, django is there, and is updated with an easy pip3 install, but it's not clear where django-admin is. How do you determine where the lib is being downloaded?
I am writing this question, in parallel I am looking for solutions. Downloaded for 3.4.0 everything is apparently in /usr/local/lib/python3.4/dist-packages. At the same time, the last python in sys.path does not have dist-packages at all. Would it be comme il faut to add this directory to sys-path? They say you need to download some virtualenv.
English is quite difficult to understand, tell me in which direction to proceed. If you can just add the dist-packages directory to sys.path (the versions differ by only one hundredth), then how to do it? Where to look for PYTHONPATH?
UPD: Where is the best place to deploy virtuaenv? In the project directory?
This gives additional goodies when, for example, you post a project on github, all dependencies are included in it, right?
UPD: In virtualenv, the pyhton3 command starts 3.4.0. How to fix?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
L
Leo, 2015-06-18
@xozzslip

There is virtualenv

I
Igor S, 2015-06-18
@xarek1986

if you do virtualenv -h then you can see the -p parameter which allows you to specify the path to a specific interpreter

B
bromzh, 2015-06-18
@bromzh

Discover virtualenv.

D
Dmitry Grebenshchikov, 2015-06-19
@iMeath

pip freeze > requirements.txt
That's all dependencies for you!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question