Using shodan from the terminal [closed] - python

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 1 year ago.
Improve this question
I've been looking forward to downloading the command-line interface for "Shodan".
On the website they say that i basically have to type "pip install -U --user shodan" in my cmd, so i did multiple times and it now says that the requirement are already satisfied, which feels normal since i did it multiple times trying to fix said problem.
Now the problem is, next step is to basically type "shodan" in the cmd, problem is it says 'shodan' isn't recognized.
What am i supposed to do ! :(

You need to add the path of the scripts to your system PATH variable:
It is something like this:
C:\Python38\Scripts
When you run pip install, it installs an exe file under the Scripts folder of your python installation. You should add this path to the PATH variable as described in the link. This makes the exe available in the terminal.
See this guide for more information:
https://datatofish.com/add-python-to-windows-path/

Related

run my python script easily on any other laptop [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 1 year ago.
Improve this question
I have written a script (around 2k lines) for processing text.
It reads the input form my text file, and print the output in another file.
But, I want it can be run on any other laptop (with Python installed) easily as well. For example,
other people can run it without installing additional libraries (that I had imported in the script).
How can I realize my purpose? By packaging my script in a library or what else I can do? Please provide any hint.
I tried to use the pyinstaller or the py2exe, but I always have a problem of over recursion limit,
and since I have several huge sized libraries being imported, so I guess even I can finally make a .exe file,
it would be in a huge size, so I stopped to using that way. Anyone has a comment on it?
If you're sure that every client has Python and pip installed and present in PATH, you can just pip install the libraries in the beginning of your script. Something like this:
import subprocess
subprocess.run(['pip', 'install', '--user', 'your', 'libs'])
import your
import libs
This is just a general idea, maybe hacky, and definitely requires additional work with error handling, etc.

How to import modified library instead of previously installed one? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I am new to GitHub and as in the title I am asking for help.
I originally installed the library using pip install. Then I have to make some changes in the code and forked it and downloaded it local. I have made my changes and I am trying to import the modified code in python. I have tried to push it on GitHub but I couldn't find a way to import it from there.
Thank you for your time
import <module>
And use the module in python.
You should do the following in the terminal:
cd package_dir
pip install .
This will replace the original and install the modified package.
Now you can import your modified package in python
Additionally, if you intend to keep developing the package, you could check this out: https://setuptools.readthedocs.io/en/latest/setuptools.html#development-mode

Django framework installation [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I have installed django framework with Python 2.7 and created all the paths. The problem is that whenever I type
django-admin.py command
the file itself is opening up. I am using Windows 7 64 bit.
Thank you.
You need to type
python django-admin.py command
If you get an error saying 'python is not recognized as an internal or external command..' you also need to add the python path to your environment path.
The problem is that .py files are not associated with python, so it gets treated as a normal txt file. You can either:
python django-admin.py command
(and see #VladSchnakovszki answer for errors which might pop up with that command), Or configure the files by right clicking > Properties, then (under General options):
Point it to python.exe and tell it to associate all files with the same extension with python as well.
P.S. a personal recommendation: When working in a windows environment I've had a good experience with installing ActiveState Python. It automatically sets the required paths, and also installs pip and other goodies that you'll probably need along the way (don't be scared of the priced version, there's a free community version too).

will installing canopy interfere with my current python setup? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I have a working Python ecosystem on Ubuntu.
Now I want to try Enthought Canopy. Will that installation mess up or interfere somehow with my current system?
Two examples to illustrate my confusion:
will this installation overwrite libraries in my current setup?
which python will start if I invoke ipython in a terminal?
No it wont:
http://docs.enthought.com/canopy/quick-start/install_linux.html
If the check box for making Canopy your default Python environment is checked the following line will be added your .bash_profile or .profile files:
source ~/Enthought/Canopy_32bit/User/bin/activate
But you can always uncheck the box.

Change temp working folder (tmp) with easy_install [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I am trying to install the birdsuite pipeline from the Broad Institute using the included easy install package. The installation fails when trying to find a set up script:
=================================================================
SETTING UP http://pypi.python.org/packages/2.5/p/plinkpipeline/plinkpipeline-1.6.6-py2.5.egg
:
Downloading http://pypi.python.org/packages/2.5/p/plinkpipeline/plinkpipeline-1.6.6-py2.5.egg
Processing plinkpipeline-1.6.6-py2.5.egg
error: Couldn't find a setup script in /tmp/easy_install-hxr0WF/plinkpipeline-1.6.6-py2.5.egg
=================================================================
I agree with the error, I cannot find a script in the specified folder either. I have permission to write files and folders in /tmp/.
Thanks
Unfortunately, that project provides only a python 2.5 egg, which does not include a setup.py file at all.
That is an error on the part of the author of the package. You need to find a .tar.gz source distribution instead. I cannot locate one, though.

Categories