【PyInstaller打包文件报错:....Please `conda remove typing` then try again.】

背景

PyCharm 中基于 Anaconda 环境配置 PyInstaller,选中 .py 文件运行 pyInstaller.exe 对指定的 .py 文件进行打包,出现以下报错:

The 'typing' package is an obsolete backport of a standard library package and is incompatible with PyInstaller. Please `conda remove typing` then try again.

尝试

按提示在Anaconda Prompt base环境中运行conda remove typing,问题未解决。

(base) C:\Users\Administrator>conda remove typing
Collecting package metadata: done
Solving environment: /
The environment is inconsistent, please check the package plan carefully
The following packages are causing the inconsistency:

  - defaults/win-64::flask==1.0.2=py36_1
  - defaults/win-64::flask-cors==3.0.4=py36_0
  - defaults/win-64::bokeh==0.12.16=py36_0
  - defaults/win-64::bottleneck==1.2.1=py36hd119dfa_0
  - defaults/win-64::datashape==0.5.4=py36h5770b85_0
  - defaults/win-64::h5py==2.7.1=py36h3bdd7fb_2
  - defaults/win-64::imageio==2.3.0=py36_0
  - defaults/win-64::matplotlib==2.2.2=py36h153e9ff_1
  - defaults/win-64::mkl_fft==1.0.1=py36h452e1ab_0
  - defaults/win-64::mkl_random==1.0.1=py36h9258bd6_0
  - defaults/win-64::numpy==1.14.3=py36h9fa60d3_1
  - defaults/win-64::numba==0.38.0=py36h830ac7b_0
  - defaults/win-64::numexpr==2.6.5=py36hcd2f87e_0
  - defaults/win-64::pandas==0.23.0=py36h830ac7b_0
  - defaults/win-64::pytest-arraydiff==0.2=py36_0
  - defaults/win-64::pytest-doctestplus==0.1.3=py36_0
  - defaults/win-64::pywavelets==0.5.2=py36hc649158_0
  - defaults/win-64::scipy==1.1.0=py36h672f292_0
  - defaults/win-64::bkcharts==0.2=py36h7e685f7_0
  - defaults/win-64::dask==0.17.5=py36_0
  - defaults/win-64::patsy==0.5.0=py36_0
  - defaults/win-64::pytables==3.4.3=py36he6f6034_1
  - defaults/win-64::pytest-astropy==0.3.0=py36_0
  - defaults/win-64::scikit-learn==0.19.1=py36h53aea1b_0
  - defaults/win-64::astropy==3.0.2=py36h452e1ab_1
  - defaults/win-64::odo==0.5.1=py36h7560279_0
  - defaults/win-64::scikit-image==0.13.1=py36hfa6e2cd_1
  - defaults/win-64::statsmodels==0.9.0=py36h452e1ab_0
  - defaults/win-64::blaze==0.11.3=py36h8a29ca5_0
  - defaults/win-64::seaborn==0.8.1=py36h9b69545_0
/

解决方法

参考@海和森林42方法

请不要用:conda remove typing
正确的是:pip uninstall typing

修改命令为 pip uninstall typing


(base) C:\Users\Administrator>pip uninstall typing
Found existing installation: typing 3.6.4
Uninstalling typing-3.6.4:
  Would remove:
    g:\software\anaconda3\lib\site-packages\typing-3.6.4-py3.6.egg-info
    g:\software\anaconda3\lib\site-packages\typing.py
Proceed (Y/n)? y
  Successfully uninstalled typing-3.6.4

再次运行打包文件,问题解决!!!

  • 5
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
-10/09/2014 Made a cross platform TcpClient class to remove WP8 shenanigans with prebuilt DLL. -02/09/2014 Bugfix for certain chunked-encoding transfers. Removed Ionic ZLib dependency. -14/04/2014 Added experimental KeepAlive support. Uncomment #USE_KEEPALIVE in Request.cs to enable. -08/04/2014 Added a tiny embeddable web server with REST style components. UniWeb now includes the UniExtender package in DLL form. Source code is available. See: https://www.assetstore.unity3d.com/#/content/2597 -03/04/2014 Added new TcpClient from SocketEx, and BouncyCastle crypto library. This means we should have full WP8 support! -24/03/2014 Corrected proxy support on mobile devices. -07/03/2014 Added proxy support. Added FAQ. - 28/02/2014 Added demo server scripts for nodejs. Added exception feedback to WebSocket. Added SocketIOClient and WebSocketClient examples. - 03/01/2014 Added default Accept header if not specified. Removed Authorisation header if uri.UserInfo is null or == "" - 05/12/2013 Added new ZLib DLL that allows compilation with .NET 2.0 Subset. Added comments showing where to implement SSL certificate check. - 26/11/2013 Fixed Disposed object exception when using GZip. Fixed Redirect Handling (change Method to "GET" on 301, 302, leave unchanged on 307) - 22/11/2013 Refactoring Marathon: Modified Socket.IO to be closer to the offical API. Merged all examples into one file. Removed obsolete methods. Removed some extra methods, so there should only be one way to do something. (or 2 ;-) Bugs Fixed: Dead requests when coming back from sleep on iOS Added close messages to discarded websockets.
Deep learning is making waves. At the time of this writing (March 2016), Google’s AlghaGo program just beat 9-dan professional Go player Lee Sedol at the game of Go, a Chinese board game. Experts in the field of Artificial Intelligence thought we were 10 years away from achieving a victory against a top professional Go player, but progress seems to have accelerated! While deep learning is a complex subject, it is not any more difficult to learn than any other machine learning algorithm. I wrote this book to introduce you to the basics of neural networks. You will get along fine with undergraduate-level math and programming skill. All the materials in this book can be downloaded and installed for free. We will use the Python programming language, along with the numerical computing library Numpy. I will also show you in the later chapters how to build a deep network using Theano and TensorFlow, which are libraries built specifically for deep learning and can accelerate computation by taking advantage of the GPU. Unlike other machine learning algorithms, deep learning is particularly powerful because it automatically learns features. That means you don’t need to spend your time trying to come up with and test “kernels” or “interaction effects” - something only statisticians love to do. Instead, we will let the neural network learn these things for us. Each layer of the neural network learns a different abstraction than the previous layers. For example, in image classification, the first layer might learn different strokes, and in the next layer put the strokes together to learn shapes, and in the next layer put the shapes together to form facial features, and in the next layer have a high level representation of faces. On top of all this, deep learning is known for winning its fair share Kaggle contests. These are machine learning contests that are open to anyone in the world who are allowed to use any machine learning technique they want. Deep learning is that powerful. Do you want a gentle introduction to this “dark art”, with practical code examples that you can try right away and apply to your own data? Then this book is for you. Who is this book NOT for? Deep Learning and Neural Networks are usually taught at the upper-year undergraduate level. That should give you some idea of the type of knowledge you need to understand this kind of material. You absolutely need exposure to calculus to understand deep learning, no matter how simple the instructor makes things. Linear algebra would help. I will assume familiarity with Python (although it is an easy language to pick up). You will need to have some concept of machine learning. If you know about algorithms like logistic regression already, this book is perfect for you. If not, you might want to check out my “prerequisites” book, at: http://amzn.com/B01D7GDRQ2 On the other hand, this book is more like a casual primer than a dry textbook. If you are looking for material on more advanced topics, like LSTMs, convolutional neural networks, or reinforcement learning, I have online courses that teach this material, for example: https://www.udemy.com/deep-learning-convolutional-neural-networks-theano-tensorflow New libraries like TensorFlow are being updated constantly. This is not an encyclopedia for these libraries (as such a thing would be impossible to keep up to date). In the one (1!!!) month since the book was first published, no less than THREE new wrapper libraries for TensorFlow have been released to make coding deep networks easier. To try and incorporate every little update would not only be impossible, but would continually cause parts of the book to be obsolete. Nobody wants that. This book, rather, includes fundamentals. Understanding these building blocks will make tackling these new libraries and features a piece of cake - that is my goal.

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值