jsnapy icon indicating copy to clipboard operation
jsnapy copied to clipboard

Install JSNAPy 1.3.3 from PyPi in Virtual Environment. (Related to Pull #353)

Open gcasella opened this issue 5 years ago • 2 comments

Description of Issue/Question

@vnitinv @rahkumar651991 Thanks guys for reviewing and approving my Pull Request.

Once thing that I've noticed after the official release the is the following ---

etc/ and var/ missing from Virtual Environment when installing with the command pip install jsnapy --no-cache <-- uses the wheel build of the code.

etc/ and var/ will get installed properly in a virtual environment when installing with the command pip install https://<pypi-url>/jsnapy-1.3.3.tar.gz --no-cache

Setup

Python 3.X virtual environment using python3 -m venv venv

Steps to Reproduce Issue

python3 -m venv venv cd venv/ pip install jsnapy ls -lah

The etc/ and var/ directory do not exist.

Before Install image

Successful Install Using pip image

ls -lah of venv/ directly image

If I download the source code from PyPi and do the following it will work.

Successful Install using pip with source code (https://files.pythonhosted.org/packages/6c/83/0c2f278876c159e109001b3bdb926b6dfd5762911c3eff5058924ec5df36/jsnapy-1.3.3.tar.gz) image

ls -lah of venv/ directory image

I have no issue installing the application using the .tar.gz file, just seeing as if there might be a reason as to why it won't create my etc/ and var/ directory inside of my virtual environment only when installing with wheel from pip

In addition, i took the source code and re-built the wheel package using the python setup.py bdist_wheel command to create a fresh wheel package. I tried to install that but unfortunately its the same symptom as running pip install jsnapy --no-cache

Versions Report

(3.8-venv) BMOTEC6079925LT:3.8-venv gianluca.casella$ jsnapy --version JSNAPy version: 1.3.3

gcasella avatar Feb 05 '20 16:02 gcasella

Hi @gcasella - It seemed to be issue with python for not able to create /etc and /var folder depending on how it is packaged. Please try with jsnapy 1.3.4. It should create /etc and /var folder if you do pip install for jsnapy

rahkumar651991 avatar Mar 22 '20 16:03 rahkumar651991

I'm having a similar issue with my install, I'm working in a Conda environment. It would be nice to have a conda package for this.

(ansible-dev) vagrant@ubuntu-bionic:~$ pip list | grep jsn jsnapy 1.3.6

(ansible-dev) vagrant@ubuntu-bionic:~$ jsnapy --version Traceback (most recent call last): File "/home/vagrant/anaconda3/envs/ansible-dev/bin/jsnapy", line 33, in sys.exit(load_entry_point('jsnapy==1.3.6', 'console_scripts', 'jsnapy')()) File "/home/vagrant/anaconda3/envs/ansible-dev/bin/jsnapy", line 25, in importlib_load_entry_point return next(matches).load() File "/home/vagrant/anaconda3/envs/ansible-dev/lib/python3.9/importlib/metadata.py", line 77, in load module = import_module(match.group('module')) File "/home/vagrant/anaconda3/envs/ansible-dev/lib/python3.9/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1030, in _gcd_import File "", line 1007, in _find_and_load File "", line 972, in _find_and_load_unlocked File "", line 228, in _call_with_frames_removed File "", line 1030, in _gcd_import File "", line 1007, in _find_and_load File "", line 986, in _find_and_load_unlocked File "", line 680, in _load_unlocked File "", line 850, in exec_module File "", line 228, in _call_with_frames_removed File "/home/vagrant/anaconda3/envs/ansible-dev/lib/python3.9/site-packages/jnpr/jsnapy/init.py", line 83, in from jnpr.jsnapy.jsnapy import SnapAdmin File "/home/vagrant/anaconda3/envs/ansible-dev/lib/python3.9/site-packages/jnpr/jsnapy/jsnapy.py", line 22, in from jnpr.jsnapy.check import Comparator File "/home/vagrant/anaconda3/envs/ansible-dev/lib/python3.9/site-packages/jnpr/jsnapy/check.py", line 19, in from icdiff import diff, codec_print, get_options, ConsoleDiff ImportError: cannot import name 'get_options' from 'icdiff' (/home/vagrant/anaconda3/envs/ansible-dev/lib/python3.9/site-packages/icdiff.py)

holynakamoto avatar Oct 26 '21 19:10 holynakamoto