iPython local install error - ipython

I am trying to install iPython and iPython notebook as a local install:
pip install --install-option="--prefix=$BINF" ipython[notebook]
and receive the error
re: jinja2 installing in /usr/local/lib:
Exception:
Traceback (most recent call last):
...
OSError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/jinja2'
Can I direct pip to install this in $BINF/lib?
I do not have sudo, but I do have admin on the BINF tree.

Related

Using pip in conda for SCCmecfinder install from CGE errors

I want to install SCCmecfinder from CGE (bitbucket). Im in Ubuntu (18.04.2) and using conda (4.7.5) with pip to install. Is this the best way to go about it, or directly using python outside of conda be better?
(NB: I'm very new to all of this and learning on the fly with low skill level, so please explain clearly and simply.)
I created a new environment in Anaconda3/envs/SCCmecfinder, activated it and used:
pip install git+https://bitbucket.org/genomicepidemiology/sccmecfinder
this returned error code:
python setup.py egg_info" failed with error code 1 in /tmp/pip-req-build-92mzn1kf/
I followed feedback from others and used:
pip install --upgrade setuptools
retried the install instruction as above and this returned error code:
"python setup.py egg_info" failed with error code 1 in /tmp/pip-req-build-92mzn1kf/
I deactivated the environment, installed pip into it, reactivated it and retried the installation line again. New error returned - see below:
final error message:
ERROR: Complete output from command python setup.py egg_info:
ERROR: Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/sharb/anaconda3/envs/SCCmecfinder/lib/python3.7/tokenize.py", line 447, in open
buffer = _builtin_open(filename, 'rb')
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pip-req-build-pobis9bg/setup.py'
----------------------------------------
ERROR: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-req-build-pobis9bg/
The repository at https://bitbucket.org/genomicepidemiology/sccmecfinder doesn't have setup.py so it's not pip-installable.
All files in the repository are scripts (not libraries) so just copy them to any directory in your $PATH and make them executable.

Rasa NLU installation issue

I had rasa nlu version 0.12.3 installed. I had some issues and uninstalled rasa nlu and other requirements using
pip uninstall rasa_nlu
pip uninstall -r requirements.txt
Now when I am installing rasa nlu again using pip install rasa_nlu
I see below messages in the terminal
Error processing line 1 of /Users/uername/anaconda3/lib/python3.6/site-packages/matplotlib-2.0.2-py3.6-nspkg.pth:
Traceback (most recent call last):
File "/Users/username/anaconda3/lib/python3.6/site.py", line 168, in addpackage
exec(line)
File "<string>", line 1, in <module>
File "<frozen importlib._bootstrap>", line 557, in module_from_spec
AttributeError: 'NoneType' object has no attribute 'loader'
Remainder of file ignored
There are more messages regarding installation and the final message is
Found existing installation: greenlet 0.4.12
Cannot uninstall 'greenlet'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
And it turns out that rasa nlu is not installed. I know that the nlu is not installed because when I check the nlu version with below command
python -c "import rasa_nlu; print(rasa_nlu.__version__);"
I get error
Error processing line 1 of /Users/username/anaconda3/lib/python3.6/site-packages/matplotlib-2.0.2-py3.6-nspkg.pth:
Traceback (most recent call last):
File "/Users/username/anaconda3/lib/python3.6/site.py", line 168, in addpackage
exec(line)
File "<string>", line 1, in <module>
File "<frozen importlib._bootstrap>", line 557, in module_from_spec
AttributeError: 'NoneType' object has no attribute 'loader'
Remainder of file ignored
Traceback (most recent call last):
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'rasa_nlu'
Turns out the problem was happening due to a distutils installed project which the pip install couldn't uninstall before installation.
So I had to use --ignore-installed
In short, below command solved the problem
sudo pip install --ignore-installed rasa_nlu
If you want to uninstall python package which is part of distutils, you can manually remove the folder from 'site-packages' folder. If it is Anaconda distribution, it will be in following folder. I suggest to cut the folder and paste it somewhere else for the backup purpose.
In windows:
C:\Users\\AppData\Local\Continuum\Anaconda3\Lib\site-packages
I'm sure Linux will have similar folder structure.
Following 2 items needs to be removed.
Folder [package version no.]
File - [package>.egg-info]
As mentioned in Rasa's official documentation, Install it with
pip3 install rasa-x --extra-index-url https://pypi.rasa.com/simple
It will install Rasa X and Rasa. It works great.
pip3 install rasa-x -U --extra-index-url https://pypi.rasa.com/simple
installation guide

Unable to install Python cloudstorage module

I'm using Ubuntu 17.04 on Dell Laptop.
I'm trying to install the cloudstorage module.
When installing the module with Python2 using sudo, it works, however on importing it fails:
python storage2.py
Traceback (most recent call last):
File "storage2.py", line 6, in
import cloudstorage as gcs
File "/home/maxim/.local/lib/python2.7/site-packages/cloudstorage/init.py", line 56
def get_driver(driver: DriverName) -> Drivers:
Also, when I try installing this module with Python3 it fails:
https://apaste.info/QKYD
Why the import fails and how to fix it?
How to install this module in Python3?

orange3-associate install fails, other add-ons install without issue

Install error for Orang3-Associate add-on on a Windows7 PC
Command:
pip install Orange3-Associate (same result from UI Options - Add-Ons)
Error:
Collecting Orange3-Associate
Using cached Orange3-Associate-0.1.1.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 20, in <module>
File "C:\cygwin64\tmp\pip-build-nzb1zehp\Orange3-Associate\setup.py", line 32, in <module>
long_description=open(path.join(path.dirname(__file__), 'README.md')).re ad(),
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\cygwin64\\tmp\\ pip-build-nzb1zehp\\Orange3-Associate\\README.md'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\cygwin64\tmp\p ip-build-nzb1zehp\Orange3-Associate
Add-ons DataFusion and Text successfully installed.
Thanks. This was a bug in Orange3-Associate 0.1.1. It is hopefully fixed in 0.1.2, already available through pip or Options | Add-ons.

installing from Git errors python setupegg.py develop

I want to install the dev v. of ipython for Python3.2x
my environment
/usr/bin/python3.2
Python 3.2.3
Linux Mint 13 64bit
git version 1.7.9.5
I want to be able to pull the dev versions using:
git pull
as described in
http://ipython.org/ipython-doc/stable/install/install.html
but python3.2 setupegg.py develop throws an error
as regular user
/usr/local/src/ipython $ python3.2 setupegg.py develop
Traceback (most recent call last):
File "setupegg.py", line 6, in <module>
execfile('setup.py')
NameError: name 'execfile' is not defined
and as sudo
/usr/local/src/ipython $ sudo python3.2 setupegg.py develop
Traceback (most recent call last):
File "setupegg.py", line 6, in <module>
execfile('setup.py')
NameError: name 'execfile' is not defined
What's the fix? Are the instructions accurate?
IPython cannot be installed as an egg with python 3+. Use setup.py to install.