pip - django应用打包安装之后,python运行报错Windows error 3,找不到路径,但是手动解压egg之后就可以用了
怪我咯
怪我咯 2017-04-18 10:10:14
0
0
454

按照django官网1.10的说明文档给应用打包,这个是setup.py中的内容。
django打包说明

#coding=utf-8
import os
from setuptools import find_packages, setup

with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme:
    README = readme.read()

os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))

setup(
    name='django-*',
    version='1.0',
    packages=find_packages(),
    include_package_data=True,
    license='**',  
    description='****',
    long_description=README,
    url='***',
    author='ATE',
    author_email='***@gmail.com',
    classifiers=[
        'Environment :: Web Environment',
        'Framework :: Django',
        'Intended Audience :: Developers',
        'Operating System :: OS Independent',
        'Programming Language :: Python :: 2.7',
    ],
)

打包之后生成了文件,在使用了python setup.py install之后,可以安装到我的电脑上,但是之后在运行时,报出了错误:

WindowsError: [Error 3] : C:\\Python27_64\\lib\\site-packages\\django_ate_core-1.0-py2.7.egg\\ate_core\\migrations/*.*

这个应该是找不到目录,然后我把django_ate_core-1.0-py2.7.egg手动删掉,并新建同名文件夹django_ate_core-1.0-py2.7.egg,并把原来egg里面的内容解压这个文件夹中,于是就能正常运行了。我的setup.py文件是不是有问题?为什么安装之后找不到目录呢??

怪我咯
怪我咯

走同样的路,发现不同的人生

Antworte allen(0)
Beliebte Tutorials
Mehr>
Neueste Downloads
Mehr>
Web-Effekte
Quellcode der Website
Website-Materialien
Frontend-Vorlage
Über uns Haftungsausschluss Sitemap
Chinesische PHP-Website:Online-PHP-Schulung für das Gemeinwohl,Helfen Sie PHP-Lernenden, sich schnell weiterzuentwickeln!