I am new to Django framework. I need to develop a chat function in my app. I am required to install uWSGI as websocket. As I am using Windows so I will install it using cygwin. I followed the instruction from some of the website and had successfully installed it ($ python3 setup.py install).
However, I couldn't find it in my python project. I have tried to install it in the python project site-packages and also the django python site-packages. Yet, I still couldn't find it in my installed packages. May I know what have done wrong or misunderstood the concept?
Cmd of cygwin
Related
I'm trying to run a python project on a RHEL 7 appliance without PIP installed, nor do I have sudo access. I'm able to deploy and run my python code without issue on the appliance, just without dependencies, so I do not get very far. How do I package a python project with all dependencies so that I can avoid the need for PIP altogether?
I've looked at some examples for packaging the python projects, but they assume the box has no Internet but does have PIP installed. Being that I don't have PIP, this is not very helpful.
I am new to Python and there are some things which I am not able to apprehend. Questions may seem like very kiddish, so bear with me.
As you know, Ubuntu comes with an outdated Python version. I wished to use the latest python. But since it is recommended not to override the system's python, I installed virtualenv.
I installed pip first, using sudo apt-get install python-pip.
Then installed virtualenv, using sudo pip install virtualenv, and did all the configurations required to link it to the latest python.
The questions which I want to ask are-
Where does the command pip install <module> store the module in the system? I am asking this question because there is a section in this link, which says "Installation into Python". I was confused by this, thinking whether installing a python module is sensitive to which python version I am using. If it is so, then where does pip install the module if I am using virtualenv and otherwise.
I have manually installed Apache HTTP Server 2.4.23 using this link. While installing mod_wsgi using command sudo pip install mod_wsgi, I am getting this error
RuntimeError: The 'apxs' command appears not to be installed or is not
executable. Please check the list of prerequisites in the
documentation for this package and install any missing Apache httpd
server packages.
I searched for it and the solution is to install developer package of Apache. But the problem is that I am not able to find it anywhere on it's site. I want to install it manually. What to do? Also, If I install it through sudo apt-get install apache2-dev, Will there be any difference ?
Note: As mentioned on this link, I have already set the value of APXS environment variable to the location of apxs script, which is /usr/local/apache/bin/apxs.
Concerning 1., if I have well understood, you would like to have the last 2.7 or 3.5 Python version on your distribution. Actually, you can have multiple python distribution on your distribution. I would suggest you to have a look on conda/anaconda (https://www.continuum.io/downloads) : it is very powerful and i think it would better suit you than virtualenv: virtualenv would enable you to create a separate python environnement, but it would not install a newer version of Python.
Concerning 2, I am not an expert in Apache2, but I would have used apt-get instead of re-compiling apache. While compiling, you may need some dependancies to build the mod_wsgi module. So I think it is way more easy to use the pre-built packages from your ubuntu.
I am running django python2.7 using Pycharm in windows.
Now I have some issue with redis queue not working in windows because of this
I am trying to do what this person did here. Use a cygwin version of python as pycharm interpreter.
(not sure if I downloaded all the packages or did correct steps)
I downloaded cygwin and install packages python2.7 + python-setuptools and then try to point my Pycharm interpreter to c:/cygwin/bin/python27.exe
see image
After that it seem ok and ask me to install packing tools pip, I clicked it and it give me this error:
see image
"Cannot start process, the working directory '\cygdrive\c\Users\User1G~1.SIS\AppData\Local\Temp\1\tmpYpudf2pycharm-management\pip-7.1.0' does not exist"
According to the error message it looks like pip can't be found... Are you sure you have installed pip?
Take a look here, how you can install pip: Installing Pip-3.2 on Cygwin
You can open a cygwin command line window and try to manually install the packages you want to.
I am trying to establish MYSQL connection with my twisted server script. I found out that txMYSQL is a good choice to use, I dowloaded the package out of Github and tried installing from the setup.py file, but it didn't work.
I tried inslalling txMYSQL by using easy_install txmysql but it dosen't appear to be found through this command since its not on pythons server.
How can I install txMYSQL ?
I am currently using python 2.7.8 on my Windows machine.
Try to install using pip and referencing Github repo. I tried here and worked well on a Ubuntu 12.04.4
pip install git+https://github.com/hybridlogic/txMySQL.git
I'm new to using mac and tornado. I have installed easy_install and tried installing tornado but I am keep getting "Permission denied"
easy_install tornado
Searching for tornado
Best match: tornado 2.3
Processing tornado-2.3-py2.7.egg
Adding tornado 2.3 to easy-install.pth file
error: /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/easy-install.pth: Permission denied
What is going wrong?
Try running it like this:
sudo easy_install tornado
When you are using stock python on OSX the easy_install command will install tornado system wide and it therefore needs admin rights. When using homebrew python (e.g. installed brew and python with "brew install python") then you can install python packages without having to do the sudo.
One word of advice: when working on a lot of python projects it's better to use virtualenv for installing python deps; that way you can have multiple isolated python environments AND you don't need the sudo.
You might want to try running that command as root if you want to install tornado system-wide or take a look at virtualenv for installing python packages in a sandboxed environment. Also, I recommend pythonbrew if you want to experiment with various versions of Python.