首页 \ 问答 \ 使用WIndows 10中的pip在Virtualenv中安装Python 3.6.3?(Install Python 3.6.3 in Virtualenv using pip in WIndows 10?)

使用WIndows 10中的pip在Virtualenv中安装Python 3.6.3?(Install Python 3.6.3 in Virtualenv using pip in WIndows 10?)

如何在Windows 10中使用pip在virtualenv中安装Python 3.6.x?

pip install python,pip install python3,pip install python3.6不起作用。


How do you install Python 3.6.x in a virtualenv using pip in Windows 10?

pip install python, pip install python3, pip install python3.6 don't work.


原文:https://stackoverflow.com/questions/46869528
更新时间:2022-03-11 08:03

最满意答案

一些选择:

  1. 如果您不太担心内存(您没有打开大量或非常大的位图),则可以将其存储为32位数字。 通常,第四个字节被解释为“alpha”(在背景上渲染图像时的混合说明符。)大多数现代图像处理库现在以这种方式处理彩色图像。

  2. 您可以将颜色打包到字节数组中并单独访问它们。 RGB和BGR是两种最常见的包装订单。 通常,您最终也会在每行的末尾添加填充字节,以便以字节为单位的宽度与DWORD(4字节)边界对齐。

  3. 您可以将图像分成三个独立的字节数组“平面”,这些平面基本上分别是红色,绿色和蓝色的8位图像。 这是进行图像处理时的另一种常见格式,因为您的过滤步骤通常独立地对通道进行操作。


A few options:

  1. If you're not too worried about memory (you don't have a large number or very large bitmaps open), you can store it as 32-bit numbers instead. Often the fourth byte is then interpreted as "alpha" (a blending specifier when rendering the image on a background.) Most modern image manipulation libraries treat color images in this way now.

  2. You can pack the colors into a byte array and access them individually. RGB and BGR are the two most common packing orders. Usually you also end up putting padding bytes at the end of each row so that the width in bytes lines up with DWORD (4-byte) boundaries.

  3. You can split the image into three separate byte array 'planes', which are basically 8-bit images for Red, Green and Blue respectively. This is another common format when doing image processing, as often your filtering steps operate on channels independently.

相关问答

更多
  • 这不是一个在Python中处理的好文件! Python非常适合处理文本文件,因为它在内部缓冲区中以大块的形式读取它们,然后在线上进行迭代,但不能轻松访问文本读取之后出现的二进制数据。 此外, struct模块不支持24位值。 我能想象的唯一方法是一次读取一个字节的文件,首先在行尾跳过52个字节,然后每次读取3个字节,并将它们连接成4个字节的字节串并将其解压缩。 可能的代码可能是: eol = b'\n' # or whatever is the end of line in your fi ...
  • 在Python结构模块格式字符中 , x被定义为填充字节。 你在那里的格式字符串表示读取3个字节,然后丢弃它们。 还没有一个格式说明符来处理24位数据,所以自己构建一个: >>> def unpack_24bit(bytes): ... return bytes[0] | (bytes[1] << 8) | (bytes[2] << 16) ... >>> bytes '\x02\x00\x00' >>> unpack_24bit(struct.unpack('BBB', bytes)) 2 In ...
  • 只需使用除法来获取数组中的索引,其余部分将是要设置的位数。 int N = 24; int index = N / 16; int bit = N % 16; words[index] |= (1 << bit); Just use division to obtain the index in the array, and the remainder will be the bit number to set. int N = 24; int index = N / 16; int bit = N % ...
  • 基于我给你的其他响应 ,唯一的问题是将Int32 Int24为Int24 。 最简单的方法是使用返回byte[4]然后删除最后一个byte[4]的BitConverter.GetBytes(int) ...或者我们可以使用一些特殊的struct ,如: [StructLayout(LayoutKind.Explicit)] struct Int32ToBytes { [FieldOffset(0)] public int Int32; [FieldOffset(0)] pu ...
  • 试试这段代码: public static Bitmap ConvertTo24bpp(Image img) { var bmp = new Bitmap(img.Width, img.Height, System.Drawing.Imaging.PixelFormat.Format24bppRgb); using (var gr = Graphics.FromImage(bmp)) gr.DrawImage(img, new Rectangle(0, 0, img.Width, img.H ...
  • 不,通常2对齐的非功率将为硬件单元创建各种各样的havok。 一些负载单元将发生总线故障,其他负载单元以1/4速度运行。 出于这个原因,Vec3类型都被存储,就像它们是vec4一样。 No, Typically non-power of 2 alignment will create all sorts of havok for hardware units. Some load units will bus fault, other runs at 1/4 speed. For this reason t ...
  • 我假设你的意思是左移8,而不是右移8。 在这种情况下,符号扩展的概念是不必要的。 想象一下,你有一个负的24位值0x800000。 然后左移版本将是0x80000000。 没有任何符号扩展,但它仍然有正确的负号。 总之,我认为大胆的做法应该完全按照它应该做的那样,就是简单地把这些比特换掉。 除非由于某种原因,否则您的数据是无符号的,这是非常不寻常的。 Upon more search was pointed a way to do this is using sox - on linux. sox -t s ...
  • 该方法将根据您是24位数据打包还是仅存储在32位字中的24位而变化。 我将假设它没有打包并在整数内左对齐,因为这是最常见的。 该技术只是简单地将数据转换为16位数据类型 ABCDEFxx => ABCD 这里我展示了一个32位整数的半字节,其中ABCDEF包含24位音频数据,而xx字节不包含任何值。 向右移动16将丢弃EFxx 。 short outBuffer[256] int* inBuffer = ((int*)bufferRawData); for (int i = 0 ; i < 256 ; ...
  • 一些选择: 如果您不太担心内存(您没有打开大量或非常大的位图),则可以将其存储为32位数字。 通常,第四个字节被解释为“alpha”(在背景上渲染图像时的混合说明符。)大多数现代图像处理库现在以这种方式处理彩色图像。 您可以将颜色打包到字节数组中并单独访问它们。 RGB和BGR是两种最常见的包装订单。 通常,您最终也会在每行的末尾添加填充字节,以便以字节为单位的宽度与DWORD(4字节)边界对齐。 您可以将图像分成三个独立的字节数组“平面”,这些平面基本上分别是红色,绿色和蓝色的8位图像。 这是进行图像处理 ...
  • 24位音频文件具有3 *通道数的块对齐。 为什么不去寻找100ms的音频: int blockSize = 3 * channels * (sampleRate / 10); 这适用于24位WAV。 您的FLAC阅读器是否允许您读取该粒度取决于其内部实现。 24 bit audio files have a block align of 3 * number of channels. Why not go for 100ms of audio: int blockSize = 3 * channels * ...

相关文章

更多

最新问答

更多
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)
  • 是否可以嵌套hazelcast IMaps?(Is it possible to nest hazelcast IMaps? And whick side effects can I expect? Is it a good Idea anyway?)
  • UIViewAnimationOptionRepeat在两个动画之间暂停(UIViewAnimationOptionRepeat pausing in between two animations)
  • 在x-kendo-template中使用Razor查询(Using Razor query within x-kendo-template)
  • 在BeautifulSoup中替换文本而不转义(Replace text without escaping in BeautifulSoup)
  • 如何在存根或模拟不存在的方法时配置Rspec以引发错误?(How can I configure Rspec to raise error when stubbing or mocking non-existing methods?)
  • asp用javascript(asp with javascript)
  • “%()s”在sql查询中的含义是什么?(What does “%()s” means in sql query?)
  • 如何为其编辑的内容提供自定义UITableViewCell上下文?(How to give a custom UITableViewCell context of what it is editing?)
  • c ++十进制到二进制,然后使用操作,然后回到十进制(c++ Decimal to binary, then use operation, then back to decimal)
  • 以编程方式创建视频?(Create videos programmatically?)
  • 无法在BeautifulSoup中正确解析数据(Unable to parse data correctly in BeautifulSoup)
  • webform和mvc的区别 知乎
  • 如何使用wadl2java生成REST服务模板,其中POST / PUT方法具有参数?(How do you generate REST service template with wadl2java where POST/PUT methods have parameters?)
  • 我无法理解我的travis构建有什么问题(I am having trouble understanding what is wrong with my travis build)
  • iOS9 Scope Bar出现在Search Bar后面或旁边(iOS9 Scope Bar appears either behind or beside Search Bar)
  • 为什么开机慢上面还显示;Inetrnet,Explorer
  • 有关调用远程WCF服务的超时问题(Timeout Question about Invoking a Remote WCF Service)