简体   繁体   中英

Adding path for python package

I have installed an python package namely tavern using pip install tavern , after installation it didn't added the package into the path, I manually did it after adding it to the path when I type tavern in the shell I end with this err zsh: permission denied: /Users/divyanshurawat/Library/Python/2.7/lib/python/site-packages/tavern .

So, I tried setting up the path with the help of following commands:

1 - open .bash_profile

2 - alias tavern="/Users/divyanshurawat/Library/Python/2.7/lib/python/site-packages/tavern"

3 - source ~/.bash_profile

but it still doesn't seem to work even if you write sudo tavern , I don't know what is missing here, maybe my approach to set the path is wrong.

This is how tavern directory looks like.

__init__.py,
_plugins,
core.pyc,
entry.pyc,
plugins.pyc,
response,
testutils,
__init__.pyc,
core.py,
entry.py,
plugins.py,
request,
schemas,
util

/Users/divyanshurawat/Library/Python/2.7/lib/python/site-packages/tavern 是一个目录,而不是一个可执行文件

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM