You are not logged in.

#1 2014-09-17 17:48:49

adambot
Member
Registered: 2012-01-24
Posts: 32

Path issue [solved]

Greetings,

I created a link to python2 but it doesn't seem to be working

Here's what i've done so far to troubleshoot:

verify link:

$ ls -l python
lrwxrwxrwx 1 adam adam 16 Sep 17 12:39 python -> /usr/bin/python2

verify path:

$ pwd
/home/adam/pagespeed/depot_tools

$ echo $PATH
/home/adam/pagespeed/depot_tools:/home/adam/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/vendor_perl:/usr/bin/core_perl:/opt/brcm/hndtools-mipsel-linux/bin:/opt/brcm/hndtools-mipsel-uclibc/bin

run python expecting the linked version to run:

$ python
Python 3.4.1 (default, May 19 2014, 17:23:49)
[GCC 4.9.0 20140507 (prerelease)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>

verify python 2 exists and prints proper version

$ python2
Python 2.7.8 (default, Jul  1 2014, 17:30:21)
[GCC 4.9.0 20140604 (prerelease)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>

try python in cwd:

$ ./python
Python 2.7.8 (default, Jul  1 2014, 17:30:21)
[GCC 4.9.0 20140604 (prerelease)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>

so i'm stuck trying to figure out why the path isn't obeying as it should

Last edited by adambot (2014-09-17 18:23:30)

Offline

#2 2014-09-17 18:23:17

adambot
Member
Registered: 2012-01-24
Posts: 32

Re: Path issue [solved]

something was corrupt in my session, after doing a

reset

it started working

Offline

#3 2014-09-17 18:29:51

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,931
Website

Re: Path issue [solved]

Out of curiosity, why go through all this trouble instead of just calling "python2"?


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#4 2014-09-17 18:38:17

adambot
Member
Registered: 2012-01-24
Posts: 32

Re: Path issue [solved]

WorMzy wrote:

Out of curiosity, why go through all this trouble instead of just calling "python2"?

i'm working on a pkgbuild and rather than having to patch google's depot_tools which calls to python i'd rather fool it with the path to go to python2 instead of python3 since the scripts are not compatible

Offline

Board footer

Powered by FluxBB