# Python3のインストール sudo yum install python3 cd python3 -m venv ~/myvenv/ # 仮想環境に切り替え source ~/myvenv/bin/activate # Djangoインストール pip install Django # Djangoのチュートリアルをやろうとしてプロジェクト作成 $ django-admin startproject mysite # 開発用サーバー起動 $ python manage.py runserver # 大量に出るので一部だけ # SQLite3は3.8.3、または、3.8.3以降のバージョンにしてくださいエラー packages/django/db/backends/sqlite3/base.py", line 63, in check_sqlite_version raise Imp
会社で Redmine を使ってるんですが、バージョンが 0.8.7 で、Wiki の編集をしたときにメールが飛ばせなくて困ってました。 そこで、調べるてみたら 0.9.0 に関するページを発見。 Redmine 0.9のCHANGELOG (日本語訳付き) 0.9.0 では、Wiki 編集時にメールの送信ができるそうです。タイミングよく、1/9 に 0.9.0 がリリースされたので、バージョンアップをすることにしました。 バージョンアップの方法を選択 バージョンアップは、どうやってインストールしたかによって方法が異なります。 今回は、1 の方法でバージョンアップを行いました。(でもたぶん、2 で行うほうが簡単です。 参考:Redmine.JP | アップグレード) アーカイブをダウンロードし利用している場合 Subversion リポジトリから、ソースコードをチェックアウトして利用してい
おなじみのadminページが表示できるようになりました。 あとは普通に INSTALLED_APPS の models.py を書いて syncdb すればいけるだろうと思い早速やってみたのだが、ログインフォームでIDとパスワードを入力してアクセスしたところ以下のようなエラーになってしまった・・・。 OperationalError at /admin/ attempt to write a readonly database パーミッションの問題かなと思いつつググってみると、「データベースファイルのパーミッション変えたら解決しました」って書いてあるので案の定そうだったらしい。 http://stackoverflow.com/questions/17641993/operationalerror-attempt-to-write-a-readonly-database-in-ubuntu
Twitter名刺ジェネレータを作るにあたって、 ActiveRecord と SQLite3 を使ったので、勉強になったことを適当にメモします。 関連記事 Canvasでハマった点まとめ ActiveRecord は initialize が遅すぎて CGI には使えない ActiveRecord をCGIで単体で使おうとしたのですが、ActiveRecord の初期化に数秒かかってしまい、 レスポンスが遅すぎて使い物になりませんでした。 結局、ActiveRecord の部分を生のSQLite3で再実装しました。 Rails のようにサーバが起動したらずっと同じプロセスで動作するようなものであれは、初期化が遅くても問題にはならないのですが、 CGI のように、appache が毎回プロセスを起動するようなものだと、ActiveRecord を使うのは諦めたほうがいいようです。 Acti
ソースコードから Python をインストールするとき、環境によってはビルドされないモジュールが出てくる。 今回は、どんなモジュールがビルドされなかったかを確認する方法について。 先に結論から書くと、ビルドされなかったモジュールがあるときはログにメッセージが残る。 使った環境は次の通り。 $ cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=18.04 DISTRIB_CODENAME=bionic DISTRIB_DESCRIPTION="Ubuntu 18.04.1 LTS" $ uname -r 4.15.0-20-generic 下準備 まずは、あえてビルドされないモジュールが出るように環境を整える。 最低限のビルドだけはできるように build-essential パッケージだけインストールしておこう。 $ sudo a
CentOS7にPython3をインストールするには? CentOSにPythonあるいはパッケージ全般をインストールには、以下の2つ方法があります。 yumコマンドでインストール ソースファイルからビルドする(原始的な方法) 簡単かつ安全なため、なるべくyumでのインストールをおススメします。しかし、今回のPython3.7のように、最新バージョンがまだ主要リポジトリに置いていない場合もあります。 yumでインストールできません yumでPython3.7がインストールできるか確認します。 ①「IUS Community Project」が提供しているRPMをインストールします。 yum install -y https://centos7.iuscommunity.org/ius-release.rpm ②yumコマンドが「IUS Community Project」のリポジトリを参照
djangoのインストールが終わったので早速チュートリアルをやろうとしたら、変なエラーが出る。 Traceback (most recent call last): File "/home/vagrant/.virtualenvs/django/lib/python3.6/site-packages/django/db/backends/sqlite3/base.py", line 33, in <module> from sqlite3 import dbapi2 as Database File "/usr/local/bin/python-3.6.2/lib/python3.6/sqlite3/__init__.py", line 23, in <module> from sqlite3.dbapi2 import * File "/usr/local/bin/python-3.6.
Flask簡単で小さなアプリを作るには良い感じ☆ ってことでApacheで動かしてみることにしました Apache上で動かすのにwsgiっていうのがあるしい 今回の環境は下記の通り CentOS5.7 python 2.6.5 wsgiインストール WSGIをソースからインストールします cd/usr/local/src wget http://modwsgi.googlecode.com/files/mod_wsgi-3.3.tar.gz tar xzvf mod_wsgi-3.3.tar.gz cd mod_wsgi-3.3 ./configure--with-python=/usr/bin/python make make install ちゃんとインストールできたかはこれで確認 ls /etc/httpd/modules/mod_wsgi.so ファイルがあればOKです これでイン
平素よりQA@ITをご利用いただき、誠にありがとうございます。 QA@ITは「質問や回答を『共有』し『編集』していくことでベストなQAを蓄積できる、ITエンジニアのための問題解決コミュニティー」として約7年間運営をしてきました。これまでサービスを続けることができたのは、QA@ITのコンセプトに共感をいただき、適切な質問や回答をお寄せいただいた皆さまのご支援があったからこそと考えております。重ねて御礼申し上げます。 しかしながら、エンジニアの情報入手方法の多様化やQAサービス市場の状況、@ITの今後のメディア運営方針などを検討した結果、2020年2月28日(金)15:00をもちましてQA@ITのサービスを終了することにしました。 これまでご利用をいただきました皆さまには残念なお知らせとなり、誠に心苦しく思っております。何とぞ、ご理解をいただけますと幸いです。 QA@ITの7年間で皆さまの知識
たまにしか使わないと忘れるのでメモ。 コマンド 説明 .tables テーブル名の一覧を表示する .schema <テーブル名> テーブル定義を表示する .exit sqlite3を終了する sqlite3 コマンドにより db ファイルを開く。 root@generic:/ # sqlite3 /data/data/com.android.providers.contacts/datab ases/contacts2.db providers.contacts/databases/contacts2.db < SQLite version 3.7.11 2012-03-20 11:35:50 Enter ".help" for instructions Enter SQL statements terminated with a ";" sqlite> .tables によりテーブル名の
データをsqlite3からsqlite2へ変換して、phpのfile is encrypted or is not a databaseを解決。 個人的には、ずっとOracleとMySqlばかり使っていたが、sqliteを使ってみるととっても手軽で、適度に適当で、でも十分高速なことを発見。最近は、iphoneのsafariにもJavaScriptからsqlite触れるので、さっそくphpでもsqliteを使ってみた。 PupSQLiteという、とっても便利なGUIツールでデータを整備して、server上のsqlite+phpからアクセスすると、 file is encrypted or is not a database というエラーがでた。エンクリプトした覚えはないのだけど、、調べてみると、sqlite3で作成したdbをsqlite2で操作するとこのエラーが出るみたい。 そこで、wind
SQLite2から3へDB形式を変更するのに役立つスクリプトを紹介します。Windowsのバッチファイルで紹介します。 まず、SQLite2のDBをSQLに変換します。 file: sqlite2dump.bat rem 前回の作業ファイルを削除 del tmp.* rem SQL形式で出力 copy %1 tmp.sqlite sqlite tmp.sqlite ".dump" > tmp.txt pause そして、大抵のSQLite2のデータは、Shift_JISだったりするので、何かしらの方法で、出力されたSQLデータの「tmp.txt」をUTF-8に変換してください。 続けて、以下のバッチファイルを実行すると「out.sqlite3」というファイルが出力されます。 file: sqlite3update.bat sqlite3 tmp.sqlite3 ".read tmp.txt
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く