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 JSNAPy 1.3.3 from PyPi in Virtual Environment. (Related to Pull #353) #363

Open
gcasella opened this issue Feb 5, 2020 · 2 comments
Labels

Comments

@gcasella
Copy link
Contributor

gcasella commented Feb 5, 2020

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

@rahkumar651991
Copy link
Contributor

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

@holynakamoto
Copy link

holynakamoto commented Oct 26, 2021

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)

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

No branches or pull requests

3 participants