Tuesday, September 27, 2016

Re: [Help] Advanced tutorial: How to install my Python package with Virtualenv

I don't do development in Windows, so take this with a grain of salt, but under the directory in which you created your virtualenv, there should be a directory called "bin".  In that there will be a couple of files whose names begin with "activate".  There may be one with an obvious Windows extension, such as ".bat".  Try running that, which should leave you at a command prompt, possibly decorated with the name of the virtualenv (but that might be a *nix thing).  Your PATH environment variable probably will have been modified to include this directory early, so that the python executable there will be found first.  There is also a pip there, but I don't know if just typing "pip install package-i-want" will work, but typing "python pip install package-i-want" while cd'ed to that directory should.  There are probably ways to avoid having to cd to the directory.  Hopefully someone who develops on Windows can provide a better answer.

On Tue, Sep 27, 2016 at 3:00 PM, Aline C. R. Souza <linecrsouza@gmail.com> wrote:
Hello ke1g and gary719_list1,

Thank you for your time.

Hi, I am using windows and the cmd terminal. I do not know what you mean by activate the virtual env. I created one virtual enviroment called 'poll-tutorial' and used the command 'workon poll-tutorial' to work on this enviroment.

I think you didn't understand my doubt. I think I was not very clear. The thing is:


At the 'Using your own package' step, there is a choice:  install django-polls as a user library or with virtualenv

The tutorial does not explain how to install with virtualenv, so I am trying to figure it out.

I saw on a blog post that I should use the pip command as installing a user library but whitout the '--user':

pip install django-polls/dist/django-polls-0.1.tar.gz

But did not work, it can not find the file.

I think I am using this command at the wrong directory.

So, suppose that I am at 'mysite' directory, working on the 'poll-tutorial' virtual environment. What would be the correct pip command to install my package that is inside the folder django-polls/dist outside of my project directory?

I think my problem maybe is just about localization of the files. I am little bit lost.



Em terça-feira, 27 de setembro de 2016 08:21:54 UTC-3, Aline C. R. Souza escreveu:
Hello Guys,

I need some help to install my Python package with virtualenv. I follow the 'Advanced tutorial: How to write reusable apps' and moved the polls directory out of the project. Now I want to install my package using virtualenv and pip, but I don't know how.

Consider I am inside of my project diretory (where the manage.py is) and I am working on a virtual environment. What would be the right pip command to install my package, considering that the polls directory is out of the project.

Please help!




--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/04d283f6-4ba3-41e2-b192-d3ba55ebd866%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAB%2BAj0tm9%2Bzr%3D2GEza6YLPCAQoEn0rySZk9_d%3Dg-%3DnsMTyTS2Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment