FenixEdu / fenixedu-python-sdk

8 stars 6 forks source link

error installing - command: pip install fenixedu #15

Closed lidiamcfreitas closed 8 years ago

lidiamcfreitas commented 9 years ago
  Exception:
  Traceback (most recent call last):
    File "/Library/Python/2.7/site-packages/pip-6.0.6-py2.7.egg/pip/basecommand.py", line 232, in main
      status = self.run(options, args)
    File "/Library/Python/2.7/site-packages/pip-6.0.6-py2.7.egg/pip/commands/install.py", line 347, in run
      root=options.root_path,
    File "/Library/Python/2.7/site-packages/pip-6.0.6-py2.7.egg/pip/req/req_set.py", line 549, in install
      **kwargs
    File "/Library/Python/2.7/site-packages/pip-6.0.6-py2.7.egg/pip/req/req_install.py", line 751, in install
      self.move_wheel_files(self.source_dir, root=root)
    File "/Library/Python/2.7/site-packages/pip-6.0.6-py2.7.egg/pip/req/req_install.py", line 960, in move_wheel_files
      isolated=self.isolated,
    File "/Library/Python/2.7/site-packages/pip-6.0.6-py2.7.egg/pip/wheel.py", line 234, in move_wheel_files
      clobber(source, lib_dir, True)
    File "/Library/Python/2.7/site-packages/pip-6.0.6-py2.7.egg/pip/wheel.py", line 205, in clobber
      os.makedirs(destdir)
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 157, in makedirs
      mkdir(name, mode)
  OSError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/requests'
samfcmc commented 9 years ago

Are you running the command inside a virtual environment?

lidiamcfreitas commented 9 years ago

No, I'm running it on the OSX terminal

On Monday, February 23, 2015, Samuel Coelho notifications@github.com wrote:

Are you running the command inside a virtual environment?

— Reply to this email directly or view it on GitHub https://github.com/FenixEdu/fenixedu-python-sdk/issues/15#issuecomment-75613366 .

Lídia Freitas

nurv commented 9 years ago

@lidiamcfreitas What he means is if you are running pip inside a virtualenv . If you are running without a virtualenv, you need to run it with sudo:

$ sudo pip install fenixedu

With virtualenv:

$ virtualenv project-env
$ cd project-env
$ source bin/activate
$ pip install fenixedu

I strongly, strongly advise you to use virtualenv, mainly if you are new to python.

lidiamcfreitas commented 9 years ago

I've installed fenixedu, but when I import it, it doesn't seem to recognize it. ImportError: No module named 'fenixedu'

what am I doing wrong?

nurv commented 9 years ago

Welcome back @lidiamcfreitas.

Did you use the steps I've mentioned before?

lidiamcfreitas commented 9 years ago

yes, it's weird

nurv commented 9 years ago

I've just ran the steps and it worked. Can you share a similar log, please?

[nurv@lucy ~]: virtualenv project-env
New python executable in project-env/bin/python
Installing setuptools, pip...done.
[nurv@lucy ~]: cd project-env
[nurv@lucy ~/project-env]: source bin/activate
[nurv@lucy ~/project-env ⚡ project-env]: pip install fenixedu
You are using pip version 6.0.8, however version 7.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Collecting fenixedu
  Downloading fenixedu-1.0.0.tar.gz
Collecting requests (from fenixedu)
  Using cached requests-2.7.0-py2.py3-none-any.whl
Installing collected packages: requests, fenixedu

  Running setup.py install for fenixedu
Successfully installed fenixedu-1.0.0 requests-2.7.0
[nurv@lucy ~/project-env ⚡ project-env]: python 
Python 2.7.6 (default, Sep  9 2014, 15:04:36) 
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import fenixedu
>>> 
lidiamcfreitas commented 9 years ago

ok, it's working if I run it on terminal. I was using and IDE and it wasn't working there, but that mustn't be a problem. Thanks!

lidiamcfreitas commented 9 years ago

podem-me só dizer o que é que significam os parâmetros client_id= client_secret= redirect_uri=

que é para alterar?

nurv commented 9 years ago

@lidiamcfreitas If you don't know what those parameters are, it seems you aren't familiarised with OAuth2 or our API Authorization. Fret not, you will find all information here.

lidiamcfreitas commented 9 years ago

thanks, once again