Hi
In your user .cache dir is there a pip folder? If so, is it owned by you or root?
If so remove it and see if that helps. It will get recreated if you run pip3 list etc, but it may have some install info which should only be for root…
Hi
In your user .cache dir is there a pip folder? If so, is it owned by you or root?
If so remove it and see if that helps. It will get recreated if you run pip3 list etc, but it may have some install info which should only be for root…
I have my ~/.cache deliberately mapped to tmpfs, i.e. it is in RAM, so on each reboot it is recreated.
Hi
OK, so if you run pip3 list as your user, does that work?
~]: pip3
Usage:
pip <command> [options]
Commands:
install Install packages.
uninstall Uninstall packages.
freeze Output installed packages in requirements format.
list List installed packages.
show Show information about installed packages.
search Search PyPI for packages.
wheel Build wheels from your requirements.
help Show help for commands.
General Options:
-h, --help Show help.
--isolated Run pip in an isolated mode, ignoring environment variables and user configuration.
-v, --verbose Give more output. Option is additive, and can be used up to 3 times.
-V, --version Show version and exit.
-q, --quiet Give less output.
--log <path> Path to a verbose appending log.
--proxy <proxy> Specify a proxy in the form [user:passwd@]proxy.server:port.
--retries <retries> Maximum number of retries each connection should attempt (default 5 times).
--timeout <sec> Set the socket timeout (default 15 seconds).
--exists-action <action> Default action when a path already exists: (s)witch, (i)gnore, (w)ipe, (b)ackup.
--trusted-host <hostname> Mark this host as trusted, even though it does not have valid or any HTTPS.
--cert <path> Path to alternate CA bundle.
--client-cert <path> Path to SSL client certificate, a single file containing the private key and the certificate in PEM format.
--cache-dir <dir> Store the cache data in <dir>.
--no-cache-dir Disable the cache.
--disable-pip-version-check
Don't periodically check PyPI to determine whether a new version of pip is available for download. Implied with --no-index.
~]: pip3 install -I mps-youtube youtube-dl
Collecting mps-youtube
Downloading mps_youtube-0.2.7.1-py3-none-any.whl (74kB)
100% |████████████████████████████████| 77kB 2.3MB/s
Collecting youtube-dl
Downloading youtube_dl-2018.1.21-py2.py3-none-any.whl (1.7MB)
100% |████████████████████████████████| 1.7MB 332kB/s
Collecting pafy!=0.4.0,!=0.4.1,!=0.4.2,>=0.3.82 (from mps-youtube)
Downloading pafy-0.5.3.1.tar.gz
Installing collected packages: pafy, mps-youtube, youtube-dl
Running setup.py install for pafy
Complete output from command /usr/bin/python3 -c "import setuptools, tokenize;__file__='/tmp/pip-build-nlya9t8z/pafy/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('
', '
'), __file__, 'exec'))" install --record /tmp/pip-h8v7hrox-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib
creating build/lib/pafy
copying pafy/backend_shared.py -> build/lib/pafy
copying pafy/playlist.py -> build/lib/pafy
copying pafy/backend_youtube_dl.py -> build/lib/pafy
copying pafy/util.py -> build/lib/pafy
copying pafy/g.py -> build/lib/pafy
copying pafy/__init__.py -> build/lib/pafy
copying pafy/pafy.py -> build/lib/pafy
copying pafy/jsinterp.py -> build/lib/pafy
copying pafy/backend_internal.py -> build/lib/pafy
running egg_info
writing pafy.egg-info/PKG-INFO
writing top-level names to pafy.egg-info/top_level.txt
writing dependency_links to pafy.egg-info/dependency_links.txt
writing requirements to pafy.egg-info/requires.txt
warning: manifest_maker: standard file '-c' not found
reading manifest file 'pafy.egg-info/SOURCES.txt'
writing manifest file 'pafy.egg-info/SOURCES.txt'
running build_scripts
creating build/scripts-3.4
copying and adjusting scripts/ytdl -> build/scripts-3.4
changing mode of build/scripts-3.4/ytdl from 600 to 755
running install_lib
copying build/lib/pafy/backend_internal.py -> /usr/lib/python3.4/site-packages/pafy
error: could not create '/usr/lib/python3.4/site-packages/pafy/backend_internal.py': Permission denied
----------------------------------------
Command "/usr/bin/python3 -c "import setuptools, tokenize;__file__='/tmp/pip-build-nlya9t8z/pafy/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('
', '
'), __file__, 'exec'))" install --record /tmp/pip-h8v7hrox-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-nlya9t8z/pafy
You are using pip version 7.1.2, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Hi
You can’t ever run install as user as it can’t write to the system directories… permission will always be denied.
Don’t install as your user… I asked you to run the command pip3 list as your user… nothing else?
pip3 list
I want to compare your list with mine… 
It was the same for me before you told me to forcefully update the packages. So perhaps if you do the same - it will be the same for you too.
~]: pip3 list
apparmor (2.10.3)
bottle (0.12.8)
coverage (4.3.4)
cupshelpers (1.0)
LibAppArmor (2.10.3)
mps-youtube (0.2.7.1)
nose (1.3.7)
numpy (1.9.3)
pafy (0.5.3.1)
Pillow (2.9.0)
pip (7.1.2)
py (1.4.30)
pycups (1.9.72)
pycurl (7.19.5.1)
pygobject (3.20.1)
pysmbc (1.0.15.4)
pyxdg (0.25)
PyYAML (3.11)
requests (2.7.0)
setuptools (18.3.2)
simplejson (3.8.0)
youtube-dl (2018.1.18)
You are using pip version 7.1.2, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Hi
You have a few more than me…
pip3 list
apparmor (2.10.3)
bottle (0.12.8)
Brlapi (0.6.3)
coverage (4.3.4)
cupshelpers (1.0)
LibAppArmor (2.10.3)
louis (2.6.4)
mps-youtube (0.2.7.1)
nose (1.3.7)
pafy (0.5.3.1)
pip (7.1.2)
py (1.4.30)
pycups (1.9.72)
pycurl (7.19.5.1)
pygobject (3.20.1)
pysmbc (1.0.15.4)
requests (2.7.0)
setuptools (18.3.2)
simplejson (3.8.0)
youtube-dl (2018.1.18)
So I have Brlapi (0.6.3) python3-brlapi installed… how where your ones installed, all via system rpm’s of via pip3? Except of course mps-youtube, pafy and youtube-dl.
The different ones which I notice are these 3: numpy, pyxdg, PyYAML. I don’t remember how they were installed but I checked this:
~]: rpm -q python-numpy python3-pyxdg python3-PyYAML
python-numpy-1.8.0-7.1.x86_64
python3-pyxdg-0.25-3.2.noarch
python3-PyYAML-3.11-9.4.x86_64
Considering the suggestion in this comment (the code snippet in the post) which made it possible to run mpsyt, what might be the problem?
On Sun 21 Jan 2018 06:36:01 PM CST, heyjoe wrote:
The different ones which I notice are these 3: numpy, pyxdg, PyYAML. I
don’t remember how they were installed but I checked this:
Code:
~]: rpm -q python-numpy python3-pyxdg python3-PyYAML
python-numpy-1.8.0-7.1.x86_64
python3-pyxdg-0.25-3.2.noarch
python3-PyYAML-3.11-9.4.x86_64
Considering the suggestion in ‘this comment’
(The program doesn't start (error message) · Issue #760 · mps-youtube/yewtube · GitHub) (the code snippet in the post) which made
it possible to run mpsyt, what might be the problem?
Hi
So your running the standard file permissions or one of the others?
–
Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
openSUSE Leap 42.3|GNOME 3.20.2|4.4.104-39-default
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!
Long ago I decided to set:
YaST > Miscellaneous settings > File Permissions = Secure.
Yep that changes things you can apply too much security.
On Mon 22 Jan 2018 01:16:01 PM CST, gogalthorp wrote:
Yep that changes things you can apply too much security.
Hi
Yes, @heyjoe, so if you set it back to standard, does it all then work?
If so your going to have to look at the changes and adjust as
required…
–
Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
openSUSE Leap 42.3|GNOME 3.20.2|4.4.104-39-default
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!
Are you suggesting to reduce the overall security of the system so that a particular python program works? I don’t understand. I have no issues with any other software.
Can you explain or point me to documentation which explains what the results of such change would be, so I can revert to the current state afterwards?
Hi
No, your going to have to adjust the apps to meet your secure requirements and determine what needs to change and add the appropriate files and settings into your permissions.secure file (or /etc/permissions.d/ would be better).
On Mon 22 Jan 2018 02:46:01 PM CST, heyjoe wrote:
malcolmlewis;2852145 Wrote:
>
> so if you set it back to standard, does it all then work?
>
Can you explain or point me to documentation which explains what the
results of such change would be, so I can revert to the current state
afterwards?
Hi
Just revert your YaST change back to default, test go back into YaST
and set back to secure. If you look at the /etc/permissions file it
explains at the beginning of the file what to do. As the admin of your
machine you need to add files/permissions/ownership as required…
I’m guessing it will be something like a file in /etc/permissions.d/mpsyt.secure;
/usr/bin/mpsyt root:root 0755
I would suggest some research on some of the bug references in the file
to see what and why it’s set that way.
–
Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
openSUSE Leap 42.3|GNOME 3.20.2|4.4.104-39-default
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!
@OP
It should be noted that there is considerable confusion in this thread about your objectives and solution(s).
In your original post,
You describe being unable to use pip or pip3 to install as a normal User and then you use “pip list” to test and display your problem.
“pip list” may not require elevated permissions, whereas a conventionally installed python will usually require elevated permissions(as Malcolm pointed out).
So, whether or not you can execute “pip list” as a normal User is an unrelated matter to any kind of “pip install”
As noted,
Because during an install packages may often install into system folder locations (everywhere that’s not a subdirectory in /home/heyjoe/) you’ll almost always need elevated permissions to install an application. A noteworthy exception is if you install python in a way that’s not provided by openSUSE… for example Anaconda will install a complete replacement Python system as a subdirectory of your User home folder to accommodate cloud installs when you don’t have access outside your home folder.
So,
Unless your python app doesn’t install system components and you install into a subdirectory of your User folder, elevate your permissions to do the install.
And, I’ve personally always upgraded my pip/pip3 as recommended(and usually is necessary) because the default openSUSE versions are never the latest. When you download from PyPi (the official Python repos), packages will expect the features in the upgraded version.
HTH,
TSU
This has always been so on the file system itself:
/usr/bin/mpsyt root:root 0755
Adding it to /etc/permissions.d/mpsyt.secure didn’t change anything.
I went to YaST, and changed Secure to Easy.
Reinstalled the python programs (with -I option as before) as root
Tried to run mpsyt as user.
Result: absolutely same as before.
Reverted Easy to Secure.
What do you mean? I don’t understand what to research. In the bug report I was told to do this:
cd ~
pyvenv test
source test/bin/activate
pip3 install youtube_dl pafy
git clone https://github.com/mps-youtube/mps-youtube.git
cd mps-youtube
python3 mpsyt
and then I can start mpsyt.
But still I am looking to do it without this ‘gym’ as the need for it seems an indication that something may be wrong. That is what I am trying to find out.
Initially (when starting the thread) I wasn’t able to run ‘pip list’ as normal user. After forcefully reinstalling the python packages through yast (as Malcolm suggested) that changed. Of course even after that I was unable to run ‘pip install’ which I suppose is normal.
Hi
Your running it in a python virtual environment… so isolated and pulling the latest git version (not the released version), which contains 169 commits develop since this release…
Perhaps something you have changed like your permissions, could it be a result of the .cache to tmpfs, have no idea. When you start locking things down it should ideally be at a point where your happy with your installed apps etc and unlikely to change anything going forward, then make a change to foo and test, then make a change to bar and test, small steps so you can more easily determine what changed etc.
It’s a lot easier to do with a server because once things are setup unlikely to change over the release lifetime…
So it works on my system, I only use two repos oss and oss-update, I do have my amdgpu repo (a kmp) and the odd downloaded rpm and a few tarballs that run as my user.
I’ve not changed my permissions and I never use sudo… Suggest you go back through your list of tweaks and changes to see what may be impacting it not working.
I also use oss and oss-update, as well as NVidia’s repo (for drivers). Packman for just a few packages. Nothing extraordinary. I haven’t done any tweaks regarding python.
After installing 13.2 some years ago I have set default file permissions to secure. It has never caused such problem and reverting it to “Easy” obviously shows that it is unrelated. Later I upgraded to 42.1, 42.2, then to 42.3. This system has been working for some years now… I really don’t know what to look for.