Get a List of Keys From a Dictionary in Both Python 2 and Python 3
http://askubuntu.com/questions/656610/trying-to-install-mysql-connector-for-python-3?rq=1
|
my experience is minimal with Linux so i need a little help! i am trying to install the python mysql-connector for python3.2, i was able to use pip to install it for python2.7 with 'pip install mysql-connector'. To install it for python 3 i believe you have to use the python3 pip instead of the python2 pip, i read that somewhere but im not sure if its correct, does the python3 pip know to get the correct connector or do you have to specify the specific version like 'pip install mysql-connector1.2'. anyways, i was finding it difficult to get the py3 pip, then i came across a post advising the use of 'virtualenv' to make it easier to work with different versions of python. This post: How to install pip for python 3 in ubuntu 12.04 LTS says to create the virtual environment, activate it and then proceed to pip install whatever package you need. however, when i get as far as pip install it doesnt seem to get the mysql-connector that i need, and running 'pip --version' from inside the virtualenv it tells me that the python2.7 pip is being used. i've tried other things to try get pip3 such as 'easy-install pip3' which doesnt seem to work either. Is this the only route to take to get the correct mysql-connector? or is there another way i can get pip3 (for py3.2)? thanks, any advice greatly appreciated! |
|||
|
Ah! The problem you seem to be facing is you can't create virtualenv with python3. And to install dependencies for Follow these steps for creating virtualenv in python3 environment:
|
Get a List of Keys From a Dictionary in Both Python 2 and Python 3的更多相关文章
- 【LeetCode】650. 2 Keys Keyboard 只有两个键的键盘(Python)
作者: 负雪明烛 id: fuxuemingzhu 个人博客: http://fuxuemingzhu.cn/ 目录 题目描述 题目大意 解题方法 递归 素数分解 日期 题目地址:https://le ...
- How to return dictionary keys as a list in Python 3.3
http://btmiller.com/2015/04/13/get-list-of-keys-from-dictionary-in-python-2-and-3.html Get a List of ...
- C#集合--Dictionary
字典(dictionary)是一个集合,其中每个元素都是一个键/值对.字典(Dictionaries)是常用于查找和排序的列表. .NET Framework通过IDictionary接口和IDict ...
- js实现Dictionary
js是有Dictionary对象的,只是只有在IE浏览器下可以使用. var dic = new ActiveXObject("Scripting.Dictionary"); 但是 ...
- 集合的概念 Stack和Queue Dictionary ArrayList和List<T>方法及用法
Stack和stack<T>方法一样// 管理方式: 后进先出 LIFO 栈// Stack<string> s=new Stack<string>();//(放一 ...
- C# 集合类 :(Array、 Arraylist、List、Hashtable、Dictionary、Stack、Queue)
我们用的比较多的非泛型集合类主要有 ArrayList类 和 HashTable类.我们经常用HashTable 来存储将要写入到数据库或者返回的信息,在这之间要不断的进行类型的转化,增加了系统装箱和 ...
- [转] C#中的Dictionary的使用
txw1958 的 原文 说明 必须包含名空间System.Collection.Generic Dictionary里面的每一个元素都是一个键值对(由二个元素组成:键和值) 键 ...
- 泛型Dictionary的用法详解
泛型最常见的用途是泛型集合,命名空间System.Collections.Generic 中包含了一些基于泛型的集合类,使用泛型集合类可以提供更高的类型安全性,还有更高的性能,避免了非泛型集合的重复的 ...
- C#中如何查找Dictionary中的重复值
简介 在这篇帮助文档中,我将向你展示如何实现c#里字典中重复值的查找.你知道的对于一个老鸟来说,这是非常简单的代码.但是尽管如此,这也是一篇对c#初学者非常有用的帮助文档. 背景 多数程序员对小型数据 ...
随机推荐
- Oracle Redo 以及 Archived日志简述
Oracle通过Redo Archived实现数据的归档 什么是Redo日志 Redo日志记录了数据的变更,用于在数据库出现故障后,进行数据恢复. 功能主要由三个组件实现:Redo Log Buffe ...
- Fiddler实战深入研究(二)
Fiddler实战深入研究(二) 阅读目录 Fiddler不能捕获chrome的session的设置 理解数据包统计 请求重定向(AutoResponder) Composer选项卡 Filters选 ...
- NET中Application,Session,Cookie,ViewState,Cache,Hidden 缓存机制 .
Application 1. Application用来保存所有用户共用的信息 2. 在Asp时代,如果要保存的数据在应用程序生存期内不会或者很少发生改变,那么使用Ap ...
- KnockoutJS 3.X API 第四章 数据绑定(2) 控制流foreach绑定
foreach绑定 foreach绑定主要用于循环展示监控数组属性中的每一个元素,一般用于table标签中 假设你有一个监控属性数组,每当您添加,删除或重新排序数组项时,绑定将有效地更新UI的DOM- ...
- 解析大型.NET ERP系统 代码的坏味道
1 对用户输入做过多的约定和假设 配置文件App.config中有一个设定报表路径的配置节: <add key="ReportPath" value="C:\Us ...
- 对HTML5新增JS Api的思考
1.为什么javascript的变量名不使用css中的命名方法,而选择使用驼峰命名法 因为在javascript中“-”表示减法,所以如果使用“-”的话会出现不必要的问题. 2.在javascript ...
- opcode的执行
原文链接:http://www.orlion.ga/1001/ 当.php文件被编译为opcode后,下一步的执行并非是把opcode编译为机器码而是类似于如下的方式执行: while (TRUE) ...
- PHP的学习--cookie和session
最近读了一点<PHP核心技术与最佳实践>,看了cookie和session,有所收获,结合之前的认识参考了几篇博客,总结一下-- 1. PHP的COOKIE cookie 是一种在远程浏览 ...
- annotation-config vs component-scan – Spring Core--转
原文地址:http://techidiocy.com/annotation-config-vs-component-scan-spring-core/ <context:annotation-c ...
- Spring集成MyBatis完整示例
该文详细的通过Spring IOC.MyBatis.Servlet.Maven及Spring整合MyBatis的等技术完成一个简单的图书管理功能,实现图书列表.删除.多删除.编辑.新增功能.梳理前面学 ...
