Twint: [NEW FEATURE] Twint.py disappeared, what now?

Created on 16 Nov 2018  路  11Comments  路  Source: twintproject/twint

What happened?

We added a new feature: run Twint via CLI from everywhere https://github.com/twintproject/twint/pull/287

What now?

For users

You can install Twint with the latest update pip3 install --upgrade -e git+https://github.com/twintproject/twint.git@origin/master#egg=twint and call twint -u username ... from everywhere

If you cloned the repository just do pip3 install --upgrade -e git+file:///path/to/twint/repo@origin/master#egg=twint and call twint -u username ... from everywhere

For contributors

Create a new branch, apply changes and then install the local repository specifying the correct branch: pip3 install --upgrade -e git+file:///path/to/twint/repo@newFeature#egg=twint

But I use Twint as module!

Nothing changes on this side, so everything is still the same as the previous commit

In conclusion, feel free to provide us Your feedback, if You do or not like this feature and everything else that you want to let us know!

#

Some users are reporting that these installing ways are not working, in that case we suggest you to clone the repo and install with setup.py, python3 setup.py install

New Feature question

All 11 comments

When I try install Twint with the latest updat, it give me this error. pip install --upgrade -e git+https://github.com/twintproject/twint.git@origin/master#egg=twint

Error [WinError 2] El sistema no puede encontrar el archivo especificado while executing command git clone -q https://github.com/twintproject/twint.git C:UsersDavidPereaDesktoptwint-mastersrctwint
Cannot find command 'git' - do you have 'git' installed and in your PATH?

@DavidPerea git is required, just install it

When I install Twint with pip3 install --upgrade -e git+https://github.com/twintproject/twint.git@origin/master#egg=twint, I can't use it from CLI (zsh: command not found: twint). However, it's possible to use it from CLI after cloning the repository and installing Twint with python3 setup.py install. I'm using Python 3.7 installed via Homebrew on macOS Mojave (10.4.1).

@SpinningVinyl thank you for reporting, do you use specific python settings or something? Anyway, I'll add your solution to help users in cases similar to your one

@pielco11 No, I don't use any specific Python settings. In fact, I only installed python 3 on this machine (with brew install python3) because I needed to run Twint.

@SpinningVinyl I understand, we tested and everything was working right so this issue was not expected

I'll do some test to find out what's wrong

Hello,

I have a problem with the execution of Twint via CLI. The issue is:

self.init = f"TWEET-{config.Resume}-0
SyntaxError: invalid syntax.

I was searching for a solution, and found that in the issue #288 they had the same problem and the solution was that Twint.py have been executed with python3.6 instead of python3. The problem is that now you must execute with CLI, so and don't know how to resolve the issue.

Thank you.

@MaryTop that issue happens (usually) because you are running python3.5, please be sure to use python3.6

May you provide us the output of python3 --version, please?

PLUS:
Twint.py has been moved to twint/cli.py so almost nothing changed, basically we just moved the file and added some details (outside Twint) that allow you to call Twint from everywhere

Solved!!

Use update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 1 for change python3.5 to python3.6.

318

Hi there,

My OS is MacOS Mojave (10.14.4). My Python version is 3.6.4.
I tried to install twint by using this commandpip install --upgrade -e git+https://github.com/twintproject/twint.git@origin/master#egg=twint
It generates following error after a while

Building wheel for cchardet (setup.py) ... error
  ERROR: Complete output from command /Users/yasirmuhammad/anaconda3/bin/python -u -c 'import setuptools, tokenize;__file__='"'"'/private/var/folders/t_/blb5k35x34j54cclfnfj82qm0000gn/T/pip-install-wmhto49s/cchardet/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/t_/blb5k35x34j54cclfnfj82qm0000gn/T/pip-wheel-hp3ex3b9 --python-tag cp36:
  ERROR: cythonize: ['src/cchardet/_cchardet.pyx']

Then I downloaded the clone and tried to install it using python3 setup.py install, it generates this error

library not found for -lstdc++
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: Setup script exited with error: command 'g++' failed with exit status 1

Any help would be really appreciated.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

PatricioAlvarado picture PatricioAlvarado  路  4Comments

sahildeo picture sahildeo  路  3Comments

wagerpascal picture wagerpascal  路  4Comments

edsu picture edsu  路  3Comments

Nestor75 picture Nestor75  路  3Comments