install

How to include a text file in a python installed package?

孤者浪人 提交于 2020-01-15 06:26:09
问题 I have created a python package that looks like this: /command /command module.py __main__.py README.md setup.py file.txt To install i run: sudo python setup.py install Now when i call $ command it shows this error: FileNotFoundError: [Errno 2] No such file or directory: '../file.txt' There are approximately the contents of modules setup.py , __main__.py and module.py setup.py import setuptools setuptools.setup( name='command', ... entry_points={ 'console_scripts': [ 'command = command.__main

Anyone installed rails 3 on solaris 10x86

风流意气都作罢 提交于 2020-01-15 06:20:28
问题 I would like an easy way of installing Rails 3 on Solaris 10 x86 server that is not attached to the internet. I can download files and burn to DVD or mem stick and install that way. Some Packages would be best as not really looking forward to compiling from source. Has anyone done this or seen any guides releating on how to do this ? I have seen an old post (2009) but that doesn't really help me. Regards Andy 回答1: Assuming you need to install all the requirements for running Ruby and RoR 3.0.

Linux系统用cmake安装opencv

◇◆丶佛笑我妖孽 提交于 2020-01-15 04:52:37
c++接口安装 采用源码编译的安装方式,基本也就是这种方法了,首先在官网下载你想安装的版本的opencv压缩包; 首先,安装一些依赖,根据自己的情况选择,如果不知道自己安装了那些依赖,就都输入一遍,如果已经安装系统会自动跳过,不会重复安装。 sudo apt-get install build-essential sudo apt-get install cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev sudo apt-get install python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev 然后,将压缩包解压,我下载我是opencv3.4.3版本,所以最后解压出来的文件夹就是opencv-3.4.3,接着,先用命令行进入该文件夹,然后执行命令,如下所示:( 注:(make)编译时候尽量不要多线程编译,容易出问题 ) cd ~/opencv-3.4.3 # 进入opencv文件夹 mkdir build # 创建build文件夹 cd build # 进入build文件夹 #cmake指令

pip install mysqlclient 报错:error: Microsoft Visual C++ 14.0 is required.

▼魔方 西西 提交于 2020-01-15 04:38:24
解决办法: 1. 在网址: https://www.lfd.uci.edu/~gohlke/pythonlibs/ 下载对应的whl文件,如我的环境是python3.7.2 windows32位版本,则下载 mysqlclient-1.4.2-cp37-cp37m-win32.whl 2. 在dos控制台页面进入下载whl文件目录执行 pip install mysqlclient-1.4.2-cp37-cp37m-win32.whl 在搜索解决方法的过程中还有一种方法但未经测试: 1. pip install --upgrade setuptools 2. pip install mysqlclient 参考博客: https://blog.51cto.com/jiaszwx/2327440 参考博客: https://blog.csdn.net/weixin_40744265/article/details/82048334 来源: https://www.cnblogs.com/xingphimo/p/11005077.html

Python igraph unable to plot

纵然是瞬间 提交于 2020-01-15 03:46:27
问题 I wanted to perform a simple plot with igraph but i get the following error: File "testigraph.py", line 51, in <module> plot(g, **visual_style) File "/Library/Python/2.7/site-packages/igraph/drawing/__init__.py", line 446, in plot result = Plot(target, bbox, background=kwds.get("background", "white")) File "/Library/Python/2.7/site-packages/igraph/drawing/__init__.py", line 117, in __init__ self._surface_was_created = not isinstance(target, cairo.Surface) File "/Library/Python/2.7/site

VitualBox centos7 最小化安装

丶灬走出姿态 提交于 2020-01-14 23:30:30
1: 安装虚拟机 过程就不说了 , 主要是网络设置, 如下 : 2 设置网络 : 如果是按照上图设置的 , 那么开机后网络就能自动连接上了 。 如果ip需要改,如下 : 使用静态 IP 地址配置网络 # ip addr show # vi /etc/sysconfig/network-scripts/ifcfg-enp0s3 增加下面内容 BOOTPROTO=none ONBOOT=yes IPADDR=192.168.100.123 GATEWAY=192.168.100.253 DNS1=192.168.100.253 DNS2=202.96.128.68 3. 关闭firewall: systemctl stop firewalld.service #停止firewall systemctl disable firewalld.service #禁止firewall开机启动 firewall-cmd --state #查看默认防火墙状态(关闭后显示notrunning,开启后显示running) 4. 关闭 SELinux vi /etc/selinux/config #注释掉下面两行 #SELINUX=enforcing #SELINUXTYPE=targeted #增加一行 SELINUX=disabled setenforce 0 shutdown -r now 5

ubuntu12.04 server + apache2 + wsgi + django1.6 部署

南笙酒味 提交于 2020-01-14 23:26:33
最近在学Python和Django,想自己部署一个服务器试试 环境:ubuntu12.04 server | apache2 | django1.6 | python2.7 | mod_wsgi 在网上找了好多参考都不起作用,不是老版本的方法就是过于复杂 今天柳暗花明又一村,在Django官网(djangoproject.com)上找到了最简单的方法: 1. 安装apache2: sudo apt-get install apache2 apache2相关的操作: 启动:sudo service apache2 start 停止:sudo service apache2 stop 重启:sudo service apache2 restart(更改配置后的常用操作) 启动测试:在浏览器中输入http://localhost 配置文件的位置: 可执行程序:/usr/sbin/apache2 配置文件:/etc/apache2 网站文件:/var/www (网站的默认位置可以在/etc/apache2/sites-available/default中更改,修改DocumentRoot /var/www改成自己的网站存放地址即可) apache2主要配置为/etc/apache2/apache2.conf,但是并没有配置所有的东西,端口配置在ports.conf,网站根目录在/etc

以太坊私链与智能合约部署学习(博主修正篇)—— 第一篇

廉价感情. 提交于 2020-01-14 18:42:32
以太坊(Ethereum)自2017年5月诞生以来,发展迅速。作为了一个小白,博主初步打算上个车,过个瘾。那什么是以太坊?请参看度娘的解释(https://baike.baidu.com/item/%E4%BB%A5%E5%A4%AA%E5%9D%8A/20865117?fr=aladdin)。 事物是个新事物,也是个好东西,但资料不多,所以小白博主也只能慢慢找寻资料,慢慢记录自己填坑的过程。 第一篇的主题是:以太坊私链的创建:) 一、配置环境与软件安装 1、安装geth 以下的资料来自:http://8btc.com/article-4537-1.html MAC OSX 首先确保已安装 homebrew,没有安装过的可以在命令行下执行/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 进行安装 brew tap ethereum/ethereum brew install ethereum WINDOWS 访问 https://geth.ethereum.org/downloads/ 下载并安装 Geth for Windows LINUX git clone https://github.com/ethereum/go

Install Visual Studio 2010 Beta 2 beside VS2008

拜拜、爱过 提交于 2020-01-14 16:36:14
问题 I am too paranoid to install VS2010 Beta 2 on my production machine beside VS2008 without hearing from people who have already took the plunge. I know MS says it's OK, but that does not necessarily mean it will work. Has anyone successfully installed VS2010 Beta 2 (preferably Ultimate edition) on their production machine with no negative consequences? 回答1: I have installed VS2010 beta 2 in my machine, together with VS2008, and it seems to work fine. There were two compelling reasons for me to

Error when installing TDA package on R

匆匆过客 提交于 2020-01-14 13:41:32
问题 I'm trying install TDA package on R > install.packages("TDA") Installing package into ‘/home/more/R/x86_64-redhat-linux-gnu-library/3.3’ (as ‘lib’ is unspecified) trying URL 'https://cran.rstudio.com/src/contrib/TDA_1.5.tar.gz' Content type 'unknown' length 2006514 bytes (1.9 MB) ================================================== downloaded 1.9 MB and I got this error ./gmpxx.h:41:17: fatal error: gmp.h: No such file or directory #include <gmp.h> ^ compilation terminated. make: *** [diag.o]