I tried installing Tweepy for python using homebrew by the command brew install tweepy But it showed the following error:
Error: No available formula with the name "tweepy"
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
Error: No formulae found in taps. What command should I use?
Please don't suggest to use pip, I already tried that many times, couldn't succeed.
Edit:
Using pip install tweepy , results in following:
ADITIs-MacBook-Air:~ aditinarware$ pip install tweepy
Collecting tweepy
Downloading tweepy-3.5.0-py2.py3-none-any.whl
Collecting six>=1.7.3 (from tweepy)
Downloading six-1.10.0-py2.py3-none-any.whl
Collecting requests-oauthlib>=0.4.1 (from tweepy)
Downloading requests_oauthlib-0.7.0-py2.py3-none-any.whl
Collecting requests>=2.4.3 (from tweepy)
Downloading requests-2.12.4-py2.py3-none-any.whl (576kB)
100% |████████████████████████████████| 583kB 129kB/s
Collecting oauthlib>=0.6.2 (from requests-oauthlib>=0.4.1->tweepy)
Downloading oauthlib-2.0.1.tar.gz (122kB)
100% |████████████████████████████████| 133kB 117kB/s
Installing collected packages: six, oauthlib, requests, requests-oauthlib, tweepy
Found existing installation: six 1.4.1
DEPRECATION: Uninstalling a distutils installed project (six) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.
Uninstalling six-1.4.1:
Exception:
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/Library/Python/2.7/site-packages/pip/commands/install.py", line 342, in run
prefix=options.prefix_path,
File "/Library/Python/2.7/site-packages/pip/req/req_set.py", line 778, in install
requirement.uninstall(auto_confirm=True)
File "/Library/Python/2.7/site-packages/pip/req/req_install.py", line 754, in uninstall
paths_to_remove.remove(auto_confirm)
File "/Library/Python/2.7/site-packages/pip/req/req_uninstall.py", line 115, in remove
renames(path, new_path)
File "/Library/Python/2.7/site-packages/pip/utils/__init__.py", line 267, in renames
shutil.move(old, new)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 302, in move
copy2(src, real_dst)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 131, in copy2
copystat(src, dst)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 103, in copystat
os.chflags(dst, st.st_flags)
OSError: [Errno 1] Operation not permitted: '/var/folders/_0/qcvk5fqn7yl39jf9g7c1bdh40000gn/T/pip-N2V_my-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six-1.4.1-py2.7.egg-info'
`
Unfortunately, Homebrew doesn't provide packages for python generally.
I have to say you should use pip.
Related
I have a project using Python 3.10.4, i. e., the Pipfile has,
[requires]
python_version = "3.10.4"
I installed Python 3.10.4 using pyenv install 3.10.4 and now pyenv versions returns,
* system (set by /home/username/.config/pyenv/version)
3.10.4
Now when I run pipenv install I get,
Creating a virtualenv for this project…
Using /home/username/.config/pyenv/versions/3.10.4/bin/python3 (3.10.4) to create virtualenv…
⠋created virtual environment CPython3.10.4.final.0-64 in 82ms
creator CPython3Posix(dest=/home/username/.local/share/virtualenvs/project-2ZeatEXR, clear=False, no_vcs_ignore=False, global=False)
seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/username/.local/share/virtualenv)
added seed packages: pip==20.3.4, pkg_resources==0.0.0, setuptools==44.1.1, wheel==0.34.2
activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator
Virtualenv location: /home/username/.local/share/virtualenvs/project-2ZeatEXR
Pipfile.lock not found, creating…
Locking [dev-packages] dependencies…
from . import utils
File "/usr/lib/python3/dist-packages/pipenv/vendor/requests/utils.py", line 27, in <module>
from .cookies import RequestsCookieJar, cookiejar_from_dict
File "/usr/lib/python3/dist-packages/pipenv/vendor/requests/cookies.py", line 172, in <module>
class RequestsCookieJar(cookielib.CookieJar, collections.MutableMapping):
AttributeError: module 'collections' has no attribute 'MutableMapping'
The line Using /home/username/.config/pyenv/versions/3.10.4/bin/python3 (3.10.4) indicates that pipenv has found the right Python version and is using it to create the virtual environment but then when creating the lock file, observe that it uses the lib: /usr/lib/python3/dist-packages/pipenv/vendor/requests/utils.py directory is of the system installation. Which then causes the error since the system's lib is for Python 3.9.
Maybe this is a bug or maybe I have missed some config. Could someone see what is going wrong here?
I am trying to build OpenCV from Source (master branch) using cmake.
I installed Eigen package via apt-get.
sudo apt-get install libeigen3-dev
It was successfully installed, and cmake prints that eigen 3.3.4 is installed.
Eigen: YES(ver 3.3.4)
But when I did 'make', it showed the error
/opencv/modules/core/include/opencv2/core/private.hpp:66.12: fatal error: Eigen/Core: No such file or directory
# include <Eigen/Core>
^~~~~~~~~~~~
compilation teminated.
I found the same question on superuser.
So as the answer did, I have changed cmake/OpenCVFindLibsPerf.cmake from line 44 to 59.
After I have commented out line 46-48 and 59,
and changed find_package(Eigen3 QUIET) in line 44 to find_package(Eigen3 3.0.0), it works.
And this problem only happens on OpenCV 4.0 version.
When I install OpenCV 3.4.6 version(tag 3.4.6 on github), this problem does not occur.
I am creating IoT Edge using the blog https://learn.microsoft.com/en-us/azure/iot-edge/quickstart.
I have installed Python 2.7, azure-iot-edge-runtime-ctl on a Windows 1709 Virtual machine.
I am running Docker version 17.09 CE and Windows Containers. When I am trying to setup IoT-edge runtime module in Windows 10 VM.
iotedgectl setup --connection-string "{device connection string}" --auto-cert-gen-force-no-passwords
when I am running above command facing the issue, Any suggestions appreciated.
Traceback (most recent call last):
File "c:\python27\lib\runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "c:\python27\lib\runpy.py", line 72, in _run_code
exec code in run_globals
File "C:\Python27\Scripts\iotedgectl.exe\__main__.py", line 9, in <module>
File "c:\python27\lib\site-packages\edgectl\__init__.py", line 25, in coremain
return cli.execute_user_command()
File "c:\python27\lib\site-packages\edgectl\edgecli.py", line 54, in execute_user_command
(is_valid, execute_deployment_cmd) = self._process_cli_args()
File "c:\python27\lib\site-packages\edgectl\edgecli.py", line 358, in _process_cli_args
return args.func(args)
File "c:\python27\lib\site-packages\edgectl\edgecli.py", line 379, in _parse_edge_command
if EdgeDefault.is_deployment_supported(self._deployment):
File "c:\python27\lib\site-packages\edgectl\default.py", line 99, in is_deployment_supported
client = EdgeDockerClient()
File "c:\python27\lib\site-packages\edgectl\dockerclient.py", line 13, in __init__
self._client = docker.DockerClient.from_env()
File "c:\python27\lib\site-packages\docker\client.py", line 81, in from_env
**kwargs_from_env(**kwargs))
File "c:\python27\lib\site-packages\docker\client.py", line 38, in __init__
self.api = APIClient(*args, **kwargs)
File "c:\python27\lib\site-packages\docker\api\client.py", line 131, in __init__
'Install pypiwin32 package to enable npipe:// support'
docker.errors.DockerException: Install pypiwin32 package to enable npipe:// support
Any suggestions, please.
Problem Solution:
The “npipe:// broken” problem reported here applicable to Windows machines and is a problem whether Linux or Windows containers are used in Docker.
azure-iot-edge-runtime-ctl 1.0.0rc19 was released recently which addresses this issue by ensuring the correct pypiwin32 package is installed.
To get the latest bits execute:
$> pip install -U azure-iot-edge-runtime-ctl
Check installed version:
$> iotedgectl --version
iotedgectl 1.0.0rc19
Summary of issue:
iotedgectl uses library docker-py to communicate with Docker for kick starting and controlling the Edge runtime.
docker-py uses pypiwin32 for communicating with docker over named pipes (npipe). With the release of v222 of pypiwin32 docker-py is broken on Windows hosts.
As a quick workaround until the official fixes can be incorporated, iotedgectl was released which ensures that correctly working dependencies get pulled in.
Is the version of Python you have installed 2.7.14?It seems that pypiwin32 package has not been installed in your PC.Please use pip to install this package like executing the following command in your computer:
pip install pypiwin32
After "brew upgrade", I found I cannot use Pytables on my Mac.
import tables as tb
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-29-57032f570037> in <module>()
----> 1 import tables as tb
/usr/local/lib/python2.7/site-packages/tables/__init__.py in <module>()
80
81 # Necessary imports to get versions stored on the cython extension
---> 82 from tables.utilsextension import (
83 get_pytables_version, get_hdf5_version, blosc_compressor_list,
84 blosc_compcode_to_compname_ as blosc_compcode_to_compname,
ImportError: dlopen(/usr/local/lib/python2.7/site-packages/tables/utilsextension.so, 2): Library not loaded: /usr/local/lib/libhdf5.9.dylib
Referenced from: /usr/local/lib/python2.7/site-packages/tables/utilsextension.so
Reason: image not found
I found that instead of having libhdf5.9.dylib in the directory, I have libhdf5.10.dylib now.
I can uninstall and install hdf5 without a problem and I also tried to reinstall tables.
I'm not sure how to solve this problem.
You need to reinstall tables. If you are using a recent version of pip, you also need to make sure you don't use a cached version of pytables that was built against the old libhdf. You can do this with pip install -U --force-reinstall --no-binary tables tables.
Problem solved by installing the developing version from GitHub:
pip install git+https://github.com/PyTables/PyTables.git#develop#egg=tables
My configuration :
Ubuntu 14.04 LTS
64bit
Qtcreator 3.1.1
everything is up-to-date
Hello everyone,
I'm trying to just compile and run an HTML5 App for ubuntu Phone, but after trying and searching for a week now, I still can't make it run !
For the moment I just want to run the simple html5 app template.
This is the situation :
I have installed ubuntu sdk as instructed in https://developer.ubuntu.com/en/start/ubuntu-sdk/installing-the-sdk/
I've created in the run click menu, an i386 build target. (15.04) --- which exited with no errors
I created an i386 emulator in devices --> i386 - devel - default password --- which is finally up and running correctly
The problem is when I compile the default template : theses are the errors I get :
desktop_Exec(app): found unexpected Exec with architecture 'all':./qtc_device_debughelper.py
security_policy_groups_safe_app(debug):(REJECT)reserved policy group 'debug':not for production use
security_policy_version_matches_framework(app.apparmor):invalid framework 'ubuntu-core-15.04'
And when I try to edit it anyway :
This is what I get :
Traceback (most recent call last):
File "/tmp/qtc_device_applaunch.py", line 29, in <module>
gi.Repository.get_default().require("UbuntuAppLaunch")
gi.RepositoryError: Typelib file for namespace 'UbuntuAppLaunch' (any version) not found
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<frozen importlib._bootstrap>", line 2158, in _find_spec
AttributeError: 'DynamicImporter' object has no attribute 'find_spec'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/tmp/qtc_device_applaunch.py", line 33, in <module>
from gi.repository import UpstartAppLaunch as UAL
File "/usr/lib/python3/dist-packages/gi/importer.py", line 53, in find_module
'introspection typelib not found' % namespace)
ImportError: cannot import name UpstartAppLaunch, introspection typelib not found
I have been looking for this everywhere but I couldn't find something that works.
I need some of your knowledge to help me understand all this!
I have the same errors. I think that the 'ubuntu-core-15.04'-error is related to the version of Ubuntu you are using. I use Mint 17, which is based on Ubuntu 14.04. Canonical recommends the newer Ubuntu Versions for app-developing, because there is some stuff in it they changed.
unfortunately, I can't help you with the other errors.