Skip to content

[BUG] visualpy command hard-wired to pip #37

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
psychemedia opened this issue Jun 3, 2021 · 6 comments
Closed

[BUG] visualpy command hard-wired to pip #37

psychemedia opened this issue Jun 3, 2021 · 6 comments
Labels
bug Something isn't working

Comments

@psychemedia
Copy link

psychemedia commented Jun 3, 2021

Installing and running on a Mac or other environment with multiple Pyhton environments where pip refers to a Pyhton 2.7 environment and pip3 is used to reference the Python 3 environment, running the visualpy install command fails due to hard-wired dependence on pip:

############ cat /usr/local/bin/visualpy ###############

#============================================================================
#!/bin/sh
#============================================================================
# Filename : visualpy
# function : control visualpython for Mac/Linux
# Creator  : BlackLogic  - LJ
# version  : 2.1
# License  :
# Date     : 2020 07.27
# Mdate    : 2020 12.29
#============================================================================

v_path1=`pip show visualpython | grep Location | awk -F': ' '{print $2}'`
v_prod='visualpython'
v_str1='jupyter nbextension'
v_str2='visualpython/src/main'
v_unst='pip uninstall '${v_prod}
v_upgr='pip install '${v_prod}' --upgrade'
#v_srch='pip search '${v_prod}
v_str3='pip list -o '
v_str4='pip show '${v_prod}
@psychemedia psychemedia added the bug Something isn't working label Jun 3, 2021
@minjk-bl
Copy link
Collaborator

minjk-bl commented Jun 4, 2021

Hello, psychemedia.
Current version of Visual Python doesn't consider multiple environment with Python 2.7.
So some modification on file need to be done by manually.

Here's the code for searching pip3 command and change it as a default command.
You can replace the code you mentioned with suggested code(in the below).

v_pip=pip
which pip3 > /dev/null 2>&1 && v_pip=pip3

v_path1=`${v_pip} show visualpython | grep Location | awk -F': ' '{print $2}'`
v_prod='visualpython'
v_str1='jupyter nbextension'
v_str2='visualpython/src/main'
v_unst='${v_pip} uninstall '${v_prod}
v_upgr='${v_pip} install '${v_prod}' --upgrade'
#v_srch='${v_pip} search '${v_prod}
v_str3='${v_pip} list -o '
v_str4='${v_pip} show '${v_prod}

We will continuously improve Visual Python!
Thank you for reporting bug. :)

@psychemedia
Copy link
Author

Thanks; I edited the file to use pip3 for my own purposes but the more general solution you suggest is better.

@minjk-bl minjk-bl closed this as completed Jun 7, 2021
minjk-bl added a commit to minjk-bl/visualpython that referenced this issue Jun 13, 2021
@psychemedia
Copy link
Author

Just a note - your installation process is still broken. A user installing visualpython into a Mac environment (which has a default python2.7 installed and perhaps python paths reflecting that that are required for system functioning) and then trying to the visualpython command gets an error arising from trying to run the visualpython command on the command line.

I run doszens of applications successfully (many of them packaged for command line using using thinks like click so I'm not sure what you're doing in the distribution that causes broken command line usage?

@minjk-bl
Copy link
Collaborator

minjk-bl commented Jul 6, 2021

Hello @psychemedia
Renewed batch file was not included on our current releases. We will include new batch file update on VP release ASAP.

After the update, maybe you have to uninstall visualpython using visualpy uninstall and then install with current version. We'll notice you the release through the comment soon.

Sorry for the late update for this issue.

@psychemedia
Copy link
Author

HI - thanks... I tend do a clean/uninstall via pip when checking updates (the visualpy uninstall command errored too, IIRC?).

Great to see work continuing on this app:-)

minjk-bl added a commit to minjk-bl/visualpython that referenced this issue Jul 20, 2021
@minjk-bl
Copy link
Collaborator

@psychemedia
batch file/shell file for visualpy command is updated on the latest version 1.1.6. Thanks for your comment on command file, so we were able to fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants