Pyinstaller打包django遇到No such file or directory: 'django/contrib/auth/password_validation.pyc'
2020-06-06 07:35
1646 查看
需要打包一个django项目
在就是之前遇到的增加隐式依赖的问题,缺什么添加什么就好了
但是遇到这个,就很难受
No such file or directory: 'django/contrib/auth/password_validation.pyc'
在网上搜了一些解决办法
只搜到了将django版本设为2.0,应该是卸掉高版本的django重新
pip3 install django==2.0.0
但是本身装了很多django的依赖,我怕卸掉会影响其他的包,于是我尝试了一些办法最终解决了
一般python文件编译,生成pyc文件会在 pycache 文件夹中,我到对应目录的__pycache__
文件夹,将password_validation.cpython-**.pyc复制到上级目录也就是
~/django/contrib/auth/目录下,重命名为password_validation.pyc解决问题
参考文献
https://blog.csdn.net/qinshihuangabc/article/details/98619575#comments
https://blog.csdn.net/gubenpeiyuan/article/details/86551628
相关文章推荐
- pyinstaller打包selenium webdriver出现错误IOError: [Errno 2] No such file or directory: 'C:\\Users\\Adminis
- postfix auth_getpwent.c:48:20: error: des.h: No such file or directory
- QT编译遇到的初级问题整理 gnu-libstdc++\4.9\include\cstdlib:72: error: stdlib.h: No such file or directory
- ubuntu使用composer时,遇到了/usr/bin/env: php: No such file or directory
- hadoop2.5.2中执行 $ bin/hdfs dfs -put etc/hadoop input遇到put: `input': No such file or directory的解决办法
- ap端编译时遇到fatal error:openssl/opensslv.h: No such file or directory
- Android开发遇到error opening trace file: No such file or directory (2) 错误
- XPBS遇到“Unable to access /var/run/munge/munge.socket.2: no such file or directory”错误的解决办法
- python: can't open file 'django-admin': [Errno 2] No such file or directory
- lmgrd - License Server Manager Linux系统下遇到 bash: ./lmutil: No such file or directory
- 编译boost python模块遇到的错误:../../libraries/boost_1_44_0/boost/python/detail/wrap_python.hpp:75:24: fatal error: patchlevel.h: No such file or directory
- python调用百度API实现车辆识别时遇到 FileNotFoundError: [Errno 2] No such file or directory 的解决办法
- Laravel5遇到的问题以及解决方案 -- PDOException SQLSTATE[HY000] [2002] No such file or directory
- gulp打包时报错 Error: ENOENT: no such file or directory, chmod 'E:\Practice\myWorld\build\img\bg'
- python可以运行,但编译第三包遇到 python.h no such file or directory
- /contrib/contrib-global.mk: No such file or directory
- 今天遇到一个问题,很纠结include(authenticate.php): failed to open stream: No such file or directory
- PriviledgedActionException as:root (auth:SIMPLE) cause:0: No such file or directory
- caffe遇到 ImportError: libcudart.so.7.5: cannot open shared object file: No such file or directory
- android 打包 /${zipalign}" error=2, No such file or directory