How do I install develompment version of Jupyter Notebook?
$ wget https://bootstrap.pypa.io/get-pip.py
$ sudo python get-pip.py
$ sudo pip install virtualenv
$ cd ~
$ virtualenv local/python/jupyter
$ source local/python/jupyter/bin/activate
$ git clone --recursive https://github.com/ipython/ipython.git
$ cd ipython
$ pip install -e ".[notebook]"
Could not find a version that satisfies the requirement jupyter-notebook (from ipython==4.0.0.dev0) (from versions: )
Some externally hosted files were ignored as access to them may be unreliable (use --allow-external jupyter-notebook to allow).
No matching distribution found for jupyter-notebook (from ipython==4.0.0.dev0)
Could it be you have to install from the Jupyter repo now as things were moving around since the release of jupyter? Next releases will not be only for ipython but also for other kernels like julia and bash etc.
From https://github.com/jupyter/jupyter_notebook
Create a virtual env (ie jupyter-dev)
ensure that you have node/npm installed (ie brew install node on OS X)
Clone this repo and cd into it
pip install -r requirements.txt
pip install -e .
Related
I just created a fresh RHEL VM on GCP to play some Kubernetes on it.
It was not having any git installed on it.
I used yum package manager to install git on it, but it didn't installed the latest version of git.
Current Version: 2.38.0 / 3 October 2022
Version Installed by yum: 1.8.3.1
Create a file:
touch gitupgrade.sh
And add the following to it:
yum -y remove git
yum -y clean packages
mkdir tempgit
cd tempgit
yum install -y autoconf cpio curl-devel expat-devel gcc gettext-devel make openssl-devel perl-ExtUtils-MakeMaker zlib-devel
wget -O v2.24.1.tar.gz https://github.com/git/git/archive/v2.24.1.tar.gz
tar -xzvf ./v2.24.1.tar.gz
cd git-2.24.1/
make configure
./configure --prefix=/usr/local/git
make && make install
ln -sf /usr/local/git/bin/* /usr/bin/
cd ..
rm -fr git-2.24.1
cd ..
rm -fr tempgit
echo "results"
which git
git --version
The run it to upgrade:
sudo sh gitupgrade.sh
And that’s a wrap
Red Hat Enterprise Linux, Oracle Linux, CentOS, Scientific Linux, et al.
RHEL and derivatives typically ship older versions of git. You can download a tarball and build from source, or use a 3rd-party repository such as the IUS Community Project to obtain a more recent version of git.
I needed to install a repository with brew on my Jelastic Environment, and I ended up facing many difficulties to achieve this, so I decided to share my solution here, hope it helps others out.
It has been a hell of a run, but here is the detailed procedure:
WARNING: ONLY USE THE PACKAGE INSTALLER OF POINT 1 AS LAST RESOURCE, IT CAN CAUSE MANY PROBLEMS.
For example: using it to install composer will downgrade your php binary to v5 permanently, and there is nothing you can do to fix it unless creating a new node, if you decide to use it, first clone your node to have a backup in case it destroyes everything.
Install this package installer following the instructions here: https://github.com/jelastic-jps/packages-installer :
Then use it to install gcc.
We need to install anaconda in order to update git and curl to a version recent enough to make brew at least run (src: https://stackoverflow.com/a/52561058/12181662 ) :
curl https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh > Miniconda.sh bash Miniconda.sh -b -p ~/conda
Use anaconda to install git and curl (src: https://www.reddit.com/r/linux4noobs/comments/lzdo9n/comment/gq1fhak/?utm_source=share&utm_medium=web2x&context=3 ) :
source /var/www/conda/bin/activate
conda update conda
conda install git
conda install curl
conda deactivate
echo 'export PATH="/var/www/conda/bin:$PATH"' >> ~/.bash_profile
export PATH="/var/www/conda/bin:$PATH"
install brew locally (src: https://brew.sh/ ) :
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
echo 'eval "$(/var/www/.linuxbrew/bin/brew shellenv)"' >> /var/www/.bash_profile
eval "$(/var/www/.linuxbrew/bin/brew shellenv)"
echo 'export HOMEBREW_CURL_PATH="/var/www/conda/bin/curl"' >> ~/.bash_profile
export HOMEBREW_CURL_PATH="/var/www/conda/bin/curl"
echo 'export HOMEBREW_GIT_PATH="/var/www/conda/bin/git"' >> ~/.bash_profile
export HOMEBREW_GIT_PATH="/var/www/conda/bin/git"
install the most recent version of gcc using brew (src: https://github.com/Homebrew/homebrew-core/issues/101919#issuecomment-1162740031 ) :
brew install gcc#5
brew install --force-bottle gcc
fix brew install for the non-root locations (src: https://github.com/orgs/Homebrew/discussions/3421#discussioncomment-3126807 ) :
echo 'export HOMEBREW_RELOCATE_BUILD_PREFIX=1' >> /var/www/.bash_profile
export HOMEBREW_RELOCATE_BUILD_PREFIX=1
enjoy! Example: brew install composer
Also you can try to run this is you face any errors during installation of anything:
brew link --overwrite libxcrypt
I have problem with activating virtualenv.
I'm working on the server and using SSH secure shell.
My final goal is to activate virtualenv and run the latest version of tensorflow
The following is the command lines:
jeonguyoang#vision6:~$ python3 -m venv tfenv
The virtual environment was not created successfully because ensurepip is not
available. On Debian/Ubuntu systems, you need to install the python3-venv
package using the following command.
apt-get install python3-venv
You may need to use sudo with that command. After installing the python3-venv
package, recreate your virtual environment.
jeonguyoang#vision6:~$ source tfenv/bin/activate
-bash: tfenv/bin/activate: No such file or directory
jeonguyoang#vision6:~$ cd tfenv
jeonguyoang#vision6:~/tfenv$ ls
bin include lib lib64 pyvenv.cfg
jeonguyoang#vision6:~/tfenv$ cd bin
jeonguyoang#vision6:~/tfenv/bin$ ls
python python3
captured image of the commands
I think that there is no activate file.
Maybe re-installing virtualenv is the answer, but I cannot interrupt server settings..
Check if you have python 2 versions of pip and python (python-all & python-pip packages). Venv installs both v2 and v3 versions of python & pip (regardless of python version of venv).
I'm installing this package into a virtualenv using virtualenvwrapper and pip with this command:
pip install -e git+git://github.com/mr-stateradio/django-exchange.git#egg=django_exchange-master
Interestingly the package is then placed into a src folder, and not into the site-packages folder which I would have expected. The package is placed into this folder:
<path-to-my-virtual-env>/testenv/src/django-exchange-master/exchange
Instead of this:
<path-to-my-virtual-env>/testenv/lib/python2.7/site-packages
I assume something is wrong with the pip install command I'm using or with the setup.py of the package.
The -e option tells pip to install packages in “editable” mode. If you remove the -e option, pip will install the package into <venv path>/lib/Python_version/site-packages. Don't forget to remove the packages inside <venv path>/src, because python looks for the packages inside <venv path>/src first.
pip supports installing from Git, Mercurial, Subversion and Bazaar, and detects the type of VCS using url prefixes: “git+”, “hg+”, “bzr+”, “svn+”.
e.g
$ pip install -e git+https://git.repo/some_pkg.git#egg=SomePackage # from git
$ pip install -e hg+https://hg.repo/some_pkg.git#egg=SomePackage # from mercurial
$ pip install -e svn+svn://svn.repo/some_pkg/trunk/#egg=SomePackage # from svn
$ pip install -e git+https://git.repo/some_pkg.git#feature#egg=SomePackage # from 'feature' branch
VCS projects can be installed in editable mode (using the –editable option) or not.
For editable installs, the clone location by default is <venv path>/src/SomeProject in virtual environments, and <cwd>/src/SomeProject for global installs. The –src option can be used to modify this location.
For non-editable installs, the project is built locally in a temp dir and then installed normally. `
I am trying to install scipy 0.10.1 on Ubuntu 10.10 using pip.
I have successfully installed numpy:
$ sudo pip install --upgrade numpy
[snip]
Successfully installed numpy
Cleaning up...
but when I try scipy I get:
$ sudo pip install --upgrade scipy
[snip]
File "/usr/local/lib/python2.6/dist-packages/numpy/linalg/linalg.py", line 23, in <module>
from numpy.linalg import lapack_lite
ImportError: libifport.so.5: cannot open shared object file: No such file or directory
I do have libifport.so.5, but I don't know why the installer isn't finding it.
$ echo $LD_LIBRARY_PATH
:/opt/intel/composerxe-2011.2.137/compiler/lib/intel64
I have also tried to install several other packages in the hope that one of them might help (e.g. libatlas-base-dev liblapack-dev libatlas-base-dev liblapack-dev, etc)
Any thoughts?
Thank you.
Most likely you have not defined the LD_LIBRARY_PATH for root. To check this:
$ sudo su
$echo $LD_LIBRARY_PATH
You can specify environment variables as follows:
$ sudo env LD_LIBRARY_PATH=path/to/compiler' pip install scipy
Check out this blog post to create an alias to save you typing each time:
http://final-world-domination.blogspot.ch/2011/02/sudo-doesnt-export-ldlibrarypath.html
This fixed the problem for me on Debian 9:
conda install -c intel -c conda-forge -c pytorch --override-channels intel-fortran-rt
# find / -iname "libifport*"
./opt/conda/lib/libifport.so
./opt/conda/lib/libifport.so.5
./opt/conda/pkgs/intel-fortran-rt-2021.3.0-intel_3350/lib/libifport.so
./opt/conda/pkgs/intel-fortran-rt-2021.3.0-intel_3350/lib/libifport.so.5