Skip to content
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

install on ubuntu 18.04 LTS #7

Open
fahamjv opened this issue May 29, 2018 · 2 comments
Open

install on ubuntu 18.04 LTS #7

fahamjv opened this issue May 29, 2018 · 2 comments

Comments

@fahamjv
Copy link

fahamjv commented May 29, 2018

gh0st@GH0ST:~/Desktop/pangolin$ python setup.py install
running install
Traceback (most recent call last):
File "setup.py", line 49, in
graphical data."""
File "/usr/local/lib/python2.7/dist-packages/setuptools/init.py", line 129, in setup
return distutils.core.setup(**attrs)
File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "setup.py", line 22, in run
assert len(lib_file) == 1 and len(install_dirs) >= 1
NameError: global name 'install_dirs' is not defined

@Tien94
Copy link

Tien94 commented Jun 13, 2018

Hi,
Some modifies in setup.py worked for me, hope it also works for you.
Please open the file "setup.py" in which there is a inconsistency in a variable's name. Particularly, in line 19 and line 25, it's " install_dir", meanwhile it's "install_dirs" in line 22 and 24. Correct them to a consistent name and reinstall it.

@medakk
Copy link

medakk commented Jun 8, 2019

I also had to remove the array index. get_python_lib() is returning a single string:

diff --git a/setup.py b/setup.py
index 3be4a43..dfe69d2 100644
--- a/setup.py
+++ b/setup.py
@@ -19,9 +19,9 @@ class CopyLibFile(install):
         install_dir = get_python_lib()
 
         lib_file = glob.glob(__library_file__)
-        assert len(lib_file) == 1 and len(install_dirs) >= 1     
+        assert len(lib_file) == 1 and len(install_dir) >= 1
 
-        print('copying {} -> {}'.format(lib_file[0], install_dirs[0]))
+        print('copying {} -> {}'.format(lib_file[0], install_dir))
         shutil.copy(lib_file[0], install_dir)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants