Friday 15 May 2015

python - How to install new packages for pyramid without getting a pkg_resources.DistributionNotFound: once a project has been created -


I have installed the pyramid and have successfully created a project, but when I always setup.py requirements to add new packages Let me give a pkg_resources.DistributionNotFound error.

The packages are installed, and this only occurs when I try to install new packages after running .. /bin/python3.3 setup.py Development What is this package.

The only way I have solved (not really), setting up a new virtual environment and setting up packages and setup.py development before creating a project.

Obviously I am doing something wrong, besides installing the package, do I need to do anything? Is this any kind of pathing problem? I'm new to this so your help will be greatly appreciated!

* Adding my installation process, if anyone sees anything wrong with it. Also my wsgi file virtualAnv source env / bin / activate

VirtualAnv easy_install-3.3 env created

Installed pyramid cd env ./bin / easy_install-3.3 pyramid

A project has been created ./ Bin / pcreate -s Starter myprojectname

Run setup.py cd myprojectname ../bin / python3.3 setup.py development

At this point, I get the following error: pkg_resources.DistributionNotFound: Waitress

Installed Waitress .. / bin / easy_install-3.3 Waitress

to setup.py again (not sure if I should do this) ../bin/python3.3 setup.py development

See error even then

My .wsgi file contains the following (Not sure whether this is important for this question): activate_this = "/ Home / account / env / bin / activate_this.py " execfile (activate_this, dict (__ file __ = activate_this))

import os import sys

path = '/home/account/env/lib/python3.3/site-package' < P> If path is not in sys.path: sys.path.append (path)

Div>

PP and setup.py development should not be mixed. Later uses easy_install which is not compatible with PP in Namespace packages (these packages are installed as subpages of any other parent, such as zope.sqlalchemy to full zope * .sqlalchemy Installing part. * Package). Namespace packages will cause problems between will pip and easy_install. On the other hand, most other packages will work well with the system you choose, but it is better to be compatible with you.

One more thing to double check is that you are actually installing packages in your VirtualVen, you should be able to open the python clay and import the package in your virtualwave. If you can not, then maybe it is not installed.

No comments:

Post a Comment