Installing eyeD3 on Webfaction - django

I'm trying to install eyeD3 on Webfaction for my Django application and I tried to this command
easy_install-2.7 eyeD3
and it didn't work, also Webfaction prevents me from downloading packages as well right?
I could install "boto" with the very same command tho.
Any ideas?
Thanks in advance

You can always pull down whatever packages you need and place them into your /lib/python2.x folder within your application directory. WebFaction doesn't prevent you from downloading or installing packages using pip or easy_install.
Have a look at their documentation: http://docs.webfaction.com/software/python.html?highlight=install%20python%20pacakge#installing-python-packages
If that doesn't help, just contact technical support, their staff is extremely helpful.

eyeD3 is not packaged with a setup.py script, so its installation is a bit more complicated than simply easy_installing it.
Here are the commands you can run in a SSH session to install it in your home directory on your WebFaction server:
mkdir -p ~/tmp ~/src ~/lib/python2.7
export TMPDIR=~/tmp
cd ~/src
wget http://eyed3.nicfit.net/releases/eyeD3-0.6.17.tar.gz
tar zxf eyeD3-0.6.17.tar.gz
cd eyeD3-0.6.17
./configure --prefix=$HOME
cd ..
easy_install-2.7 eyeD3-0.6.17
Hope that helps!

Related

Getting "Could not locate Gemfile" installing a Redmine plugin in docker

Trying to install a plugin in redmine, using docker. I'm new to redmine, and just know the docker basics. I have no knowledge of Ruby, so idk how those Gemfiles installations work.
I'm trying to install Issue recurring. The installation instructions for the plugin look straightforward:
su - redmine
git -C /var/lib/redmine/plugins/ clone https://github.com/cryptogopher/issue_recurring.git
cd /var/lib/redmine
bundle install
RAILS_ENV=production rake redmine:plugins:migrate
So I tried to translate that into a Dockerfile:
FROM redmine:3.3
RUN mkdir -p /var/lib/redmine/plugins/
RUN chown -R redmine:redmine /var/lib/redmine
#su - redmine
USER redmine
RUN git -C /var/lib/redmine/plugins/ clone https://github.com/cryptogopher/issue_recurring.git
#cd /var/lib/redmine
WORKDIR /var/lib/redmine/
#bundle install
RUN bundle install
#RAILS_ENV=production rake redmine:plugins:migrate
ENV RAILS_ENV production
RUN rake redmine:plugins:migrate
But what I get is:
...
Step 7/9 : RUN bundle install
---> Running in 1139cd4ccb43
Could not locate Gemfile
The command '/bin/sh -c bundle install' returned a non-zero code: 10
Am I doing something wrong here, or is there a bug in the plugin? Being inexperienced in Ruby, I cannot tell. I tried running "bundle install" in "/var/lib/redmine/plugins/" and "/var/lib/redmine/plugins/issue-recurring/" too, but same result.
For anyone looking for solution, it's here: https://it.michalczyk.pro/issues/15
Excerpt:
I found the problem. It's not installed under /var/lib/redmine/, it's installed under "/usr/src/redmine"! I was assuming /var/lib/redmine/ is the standard directory...
The installation instruction of the plugin seems to for non-docker scenario. Try "redmine bundle install" like they have done Here:
https://github.com/docker-library/redmine/blob/master/3.3/Dockerfile#L129

cloudfoundry package dependencies in python buildpack

I'm trying to package a couple of dependencies which I need for running my python app. I have it already on my requirements.txt of my application. But dependencies like, Cassandra-driver is taking too much time to install every time I redeploy my app.
How can I package my python modules in the buildpack so that It won't install it every time I redeploy my app?
Thanks Daniel
It worked! Here is what I need, maybe it will help someone.
$ cd yourproject
$ mkdir vendor
$ pip install -d vendor -r requirements.txt
$ cf push
I was looking for the same and found in the documentation: https://docs.cloudfoundry.org/buildpacks/python/index.html#vendoring
Regards.

How to install homebrew packages locally

I got homebrew installed, however I do not have admin access. How do I install homebrew packages without admin access? Is there a local tag or something that I keep missing?
Homebrew needs /usr/local to be chown-ed to your user, and you need sudo for that. If you can’t you have to install it elsewhere. Some people use ~/.brew or ~/homebrew; you can use anything but avoid paths with spaces. See the docs here.
Let’s say you want to install in ~/.brew; run the following command:
git clone --depth=1 https://github.com/Homebrew/brew ~/.brew
Then ensure the bin and sbin directories are in your PATH. If you’re using Bash add the following in your ~/.bash_profile:
export PATH="$HOME/.brew/bin:$HOME/.brew/sbin:$PATH"
Run source ~/.bash_profile or restart your shell and run brew doctor to see if it’s installed correctly. It should warn you it’s not installed into /usr/local but that’s expected here.
To install homebrew without sudo.
git clone https://github.com/mxcl/homebrew.git
echo 'export PATH="/path/to/cloned_folder/homebrew/bin:$PATH"' >> ~/.bash_profile
Update the /path/to/cloned_folder with the path of the homebrew cloned folder.
Restart terminal and run
brew update
brew --version
git clone https://github.com/Homebrew/brew
pwd
echo 'export PATH="*RESULT_OF_PWD*/brew/bin:$PATH"' >> ~/.bash_profile
if it's for programming/building purposes you could also is easy to download the formula, extract the download url, and unzip it in your prefix (is your local folder): it's json https://formulae.brew.sh/api/formula/gtk+3.json

How do you install Docutils from the Terminal so that Django admindocs will work?

Docutils is a great package. If you are using Django the admindocs package needs docutils. Instructions are available for installing with a web browser, but what if you are remote and logging in with a terminal over SSH? How to install in that case? What if you just want a quick recipe to do the job with the terminal?
I know I'm rather late to this question, but the accepted answer doesn't really reflect the common best practices from Python community members (and even less so from the Django community members.) While the outlined manual installation process does work, is is far more pains taking and error prone than the following:
You really should be using Pip. With Pip installing docutils system wide is as simple as:
$ sudo pip install docutils
This not only works for docutils but nearly any package on the 'Cheese Shop' as well as many other code repositories (Github, Bitbucket, etc.)
You may also want to look into other common Python best practice tools like virtualenv and virtualenvwrapper so that you can avoid global package installation.
To install Pip on Ubuntu/Debain I generally do the following:
$ sudo apt-get install python-pip
BTW: for virtualenv 'sudo apt-get install python-virtualenv' and for virtualenvwrapper 'sudo apt-get install virtualenvwrapper'.
The key to the install is to use the curl utility. The following will install docutils:
mkdir docutilsetup
cd docutilsetup
curl -o docutils-docutils.tar.gz http://docutils.svn.sourceforge.net/viewvc/docutils/trunk/docutils/?view=tar
gunzip docutils-docutils.tar.gz
tar -xf docutils-docutils.tar
cd docutils
sudo python setup.py install
This performs the following steps: Create a directory to download docutils into. cd into the directory just made, and use curl to download the zipped version of docutils. Unzip the file which creates a subdirectory docutils. cd into that directory and install with root permissions.
If you are using Django you will have to restart Django for admindocs to start working.
Although it is an old thread, I want to share the answer I found. To install type command
sudo apt install python-docutils
or
sudo apt install python3-docutils
This will install the dependencies too. Yesterday, I installed docutils using this command for Geany editor and it is working fine.

How to install image processing just for a virtualenv project with pip for django

But I'm looking to install freetype, libjpeg, PIL build to add image processing to my django projects I've followed this installation http://dakrauth.com/blog/entry/python-and-django-setup-mac-os-x-leopard/ which installs it site wide but I can get it inside my virtualenv project.
Do I just cd into the working directory of the virtualenv (project) and install it there and will it just be available for that project or do I use pip? I couldn't find the packages in the pip repository. Can someone enlighten me please.
curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.21.tar.gz
tar -xzvf distribute-0.6.21.tar.gz
cd distribute-0.6.21
python distribute_setup.py
easy_install pip
pip install virtualenv
virtualenv --distribute --no-site-packages [myproject]
cd [myproject]
source bin/activate (this activates the sandbox that virtualenv created)
pip install django mysql-python
Go to the working directory of the virtualenv and then run
$ source bin/activate
This will set that virtual environment as your active one. So now that it's active, you can install what you want, either manually (by following those steps on the site you linked to) or with pip and it will automatically install it into your active virtualenv.
If you then, say, run python manage.py runserver while the same virtualenv is active, django will have access to your newly installed package. Once you want to unset that virtual environment as your active one, simply do deactivate.
I ran into something similar; what I did was install it into the default directory (e.g. Python27/Lib/site-packages) then cut and paste all the new files put there into the created environment's site-packages. Hacky, but works.
After that you can follow EEVIAC's instructions to actually get your server running.