简体   繁体   中英

Django project loads in site-packages

After I run setup.py to install a project, the project admin works fine but here's the problem.

Except of the project running from my c:\\project.
It's runs from another location at C:\\Python27\\Lib\\site-packages\\project-0.1-py2.7.egg\\project

Why does it clone my project to the site-packages location? And why does it run from that location instead of my c:/project?

The funny thing is I was able to do a "runserver" from c:\\project yet it loads in the site-packages location.

Can anyone help? thanks.

Either you chose a name for your project that conflicts with an existing python package and it's merely coincidental, or you somehow managed to build your project as an egg. I'm not sure how you would do that and not realize you had done that, though.

Regardless, check the package to make sure that it is in fact your code and not some other python package. If it's not your code, change your project name to avoid the conflict. If it is your code, you can simply remove the egg from your 'site-packages' directory. You may have to sudo, though.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM