JCC permission denied when sudo make'ing pylucene - python

I'm running windows 10 with WSL ubuntu 20.04 installed but I'm definitely a newbie when it comes to binaries and linux distributions.
So I'm trying to install pylucene into one of my anaconda environments. To start, I've downloaded the source from their website, extracted, and tried to build and install JCC. I was able to succesfully run python setup.py build and python setup.py install from the anaconda prompt. I now see the JCC folders in the env site-packages folder and can import it in PyCharms.
Now, I'm attempting to make and make test/install from the ubuntu as I've struggled to do so using cmd. Whenever I run make, I run into errors where Java isn't found. However, running sudo make begins the build process. Unfortunately, towards the end, I receive "permission denied" errors related to the JCC folder:
make: execvp: /mnt/c/users/Me/anaconda3/envs/mimic-iv-dash-pylucene/Lib/site-packages/jcc-3.11-py3.9-win-amd64.egg/jcc: Permission denied
make: *** [Makefile:398: compile] Error 127
I thought sudo would give me all the permissions I needed. As the jcc folder is owned by root:root, I also tried using sudo chown and chmod but none of them seem to do anything. Any ideas?

Related

Python local install python package fails because "account does not have write access"

I've been using python for a while on my unix based machine, but I'm trying to use a windows machine now to install locally some of the packages I made.
What I normally do in unix navigate to the folder with setup.py and run the following command in terminal
python -m pip install -e .
On my windows machine I installed Windows Terminal, which uses powershell. Trying the same thing I get:
C:\Users\username\AppData\Local\Temp\pip-build-env-bohtedqu\overlay\Lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
error: cant create or remove files in install directory
Perhaps your account does not have write access to this directory? If the
installation directory is a system-owned directory, you may need to sign in
as the administrator or "root" account. If you do not have administrative
access to this machine, you may wish to choose a different installation
directory, preferably one that is listed in your PYTHONPATH environment
variable.
I've looked up how to fix this and nothing has worked. I've tried starting Windows Terminal as an administrator, get the same thing. I've also tried downloading gsudo and adding sudo to the start of my command, nothing changes. I'm really not that familiar with python on windows so I might be doing something incredibly dumb, any advice is appreciated.
Run cmd as administrator and activate super administrator as 'net user administrator /active:yes'. Restart your system as super administrator .Hope that will solve problem.

Windows 10 linux subsystem ubuntu trying to install python pip

It's the first time ever for me to use a linux terminal. In my case I activated windows 10 linux subsystem and installed ubuntu because as I have seen it's much more versatile than windows cmd. Now I was trying to create venv for my python project through ubuntu terminal, but i can't undersand why every time i run a command that requires the previous installation of a package such as pip install ... or virtualenv -p python3 venv (which i had already installed time ago through windows cmd) I get
`Command 'virtualenv' not found, but can be installed with:
sudo apt install virtualenv`
and if I run the suggested commands I get:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package virtualenv
In all this my current working directory is the project directory where i intend to place my files, everything worked when i tried to achieve the same result with windows cmd.
Hope what i wrote is clear enough.

Errno 13 Permission denied: '/Library/Python/2.7/site-packages/test-easy-install-18954.pth'

I've downloaded python 3.6.1 and I'm trying to use terminal to setup beautifulsoup4 but it keeps trying to install on python 2.7. Any help?
Jakes-iMac:beautifulsoup4-4.5.3 Jake$ cd /Users/Jake/Downloads/beautifulsoup4-4.5.3
Jakes-iMac:beautifulsoup4-4.5.3 Jake$ python setup.py install
running install
Checking .pth file support in /Library/Python/2.7/site-packages/
error: can't create or remove files in install directory
The following error occurred while trying to add or remove files in the
installation directory:
[Errno 13] Permission denied: '/Library/Python/2.7/site-packages/test-easy-install-18954.pth'
The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:
/Library/Python/2.7/site-packages/
Perhaps your account does not have write access to this directory? If the
installation directory is a system-owned directory, you may need to sign in
as the administrator or "root" account. If you do not have administrative
access to this machine, you may wish to choose a different installation
directory, preferably one that is listed in your PYTHONPATH environment
variable.
For information on other options, you may wish to consult the
documentation at:
https://pythonhosted.org/setuptools/easy_install.html
Please make the appropriate changes for your system and try again
Running the "python" command in your terminal will by default run Python 2 on many systems, even after you have installed Python 3. Try using the "python3" command instead.
try this:
sudo python setup.py install

unable to get pip to work in a shared hosting environment

I was hoping someone might be able to provide a resource that will help me install python 3.6.0 on a shared hosting account at Bluehost. I’ve tried using the documentation for python 2.7 but have been unsuccessful to date. The current state of the machine now is if I run python –V it says 2.6.6 . If, however I place:
export PATH=$HOME/python/Python-3.6.0/:$PATH
in the .bashrc file in my home directory and then run python –V it says 3.6.0 However I am unable to get pip to work. I also noticed that during the python setup procedure permission was denied on a number of files.
I am really at a lost as there seems to be very little documentation for how to do this on a shared hosting environment. Your help would be greatly appreciated.
here's a link to the instructions I followed python
I thought pip would be installed as it said pip 9.0.2 was installed but when I try to run it it say cxommand not found. When I tried easy_install pip I got back the following error message:
[Errno 30] Read-only file system: '/usr/lib/python2.6/site-packages/test-easy-install-13141.write-test'
The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:
/usr/lib/python2.6/site-packages/
You cannot install the package because it is trying to install them in the system directory, and you do not have write access.
If you can, use a virtualenv. Of course this requires virtualenv be installed.
Put the virtualenv somewhere you have write access to. For example, use these instructions.
Enter the following commands to download and extract Python
3.6 to your hosting account.
mkdir ~/python
cd ~/python
wget http://www.python.org/ftp/python/3.6.0/Python-3.6.0.tgz
tar zxfv Python-3.6.0.tgz
find ~/python -type d | xargs chmod 0755
cd Python-3.6.0
Install Python
Once extracted you can use the following commands to
configure and install Python.
./configure --prefix=$HOME/python
make
make install
Modify the .bashrc
For your local version of python to load you will need to add
it to the .bashrc file.
vim ~/.bashrc
Press i
Enter:
export PATH=$HOME/python/Python-3.6.0/:$PATH
export PYTHONPATH=$PYTHONPATH:$HOME/python/python3.6/site-packages/
Write the changes (press ESC) and close vim:
:wq
Press Enter
source ~/.bashrc
Now to use pip:
python -m pip install package-of-interest
You could also ask the system administrator to install the package for you. This might be the only real option if virtualenv hasn't been installed. Ask the administrator to install virtualenv.

Enthought Canopy on Mac OS X installing external program Dolfin (FEniCS)

Over the past few weeks I started programming in Python and have been using Enthought Canopy's python environment (using Mac OS X). I'm interested in modeling incompressible Navier-Stokes equation using the python module FEniCS/DOLFIN, but I have been having problems trying to install it.
Initially, I downloaded DOLFIN for python at: https://pypi.python.org/pypi/DOLFIN/1.2.0 . Inside the DOLFIN folder's Install file, there are steps for a 'Simple build and install' and it says to issue the commands:
cmake .
make install
So, I downloaded Cmake from: www. cmake .org (assuming all I have to do is download and install it, then I'll be able to reference cmake in the terminal).
Then I went into the Mac terminal, went to the location of the DOLFIN folder, and tried the above commands...
(Canopy 64bit) Ryans-MacBook-Pro:~ rms1000watt$ cd
/Users/rms1000watt/Documents/Programs/dolfin-1.2.0
(Canopy 64bit) Ryans-MacBook-Pro:dolfin-1.2.0 rms1000watt$ cmake .
-bash: cmake: command not found
(Canopy 64bit) Ryans-MacBook-Pro:dolfin-1.2.0 rms1000watt$ make install
make: Nothing to be done for `install'.
... which clearly didn't work.
So, I thought I would try to just install FEniCS in its entirety from: fenicsproject.org/download/osx_details.html
However, FEniCS is built against system Python and will not work with other Python packages.
(Enthought Canopy provided information to install external packages: https://support.enthought.com/entries/23389761-Installing-external-packages-into-Canopy-Python . But, I figured I was following step 2 by the 'Follow standard python installation procedures from the command line'.)
So, in short, I'm at a loss for how to install DOLFIN into Enthought Canopy.
Clearly the cmake executable is not in your PATH; that's why you get the cmake: command not found message. Locate your cmake executable with
find / -name 'cmake' -perm -111 -type file
(on my system the result is /Applications/CMake 2.8-9.app/Contents/bin/cmake, for instance; it's likely to be similar on yours). Then run cmake using the full path, e.g.
/Applications/CMake\ 2.8-9.app/Contents/bin/cmake .
(note the backslash before the space in the directory name). Of course you can also add CMake's bin directory to your PATH instead.

Categories

Resources