Im trying to install Pandas using pip, but I'm having a bit of trouble. I just ran sudo pip install pandas which successfully downloaded pandas. However, it did not get downloaded to the location that I wanted. Here's what I see when I use pip show pandas:
So it is installed. But I was confused when I created a new Python Project and searched under System Libs/lib/python for pandas, because it didn't show up. Some of the other packages that I've downloaded in the past did show up, however, so I tried to take a look at where those were. Running pip show numpy (which I can import with no problem) yielded:
The .libPaths command that I added to the Rprofile.site doesn't seem to have had any effect! Why is this the case? Or more importantly, how can I fix the problem so that I can install and load packages without typing in the library location?
To set environment variable R_LIBS_USER in Windows, go to the Control Panel (System Properties -> Advanced system properties -> Environment Variables -> User Variables) to a desired value (the path to your library folder), e.g.
If for some reason you do not have access to the control panel, you can try running rundll32 sysdm.cpl,EditEnvironmentVariables from the command line on Windows and add the environment variable from there.
The Rprofile solution can work if RStudio is always started by clicking the RStudio shortcut. In this case, setting the default working directory to the directory that houses your Rprofile will be sufficient. The Rprofile solution does not work when clicking on a file to start RStudio because that changes the working directory away from the default working directory.
The .libPaths function is a bit different than most other nongraphics functions. It works via side-effect. The functions Sys.getenv and Sys.setenv that report and alter the R environment variables have been split apart but .libPaths can either report or alter its target.
In your case it appears that RStudio is not respecting the Rprofile.site settings or perhaps is overriding them by reading an .Rprofile setting from one of the RStudio defaults. It should also be mentioned that the result from this operation also appends the contents of calls to .Library and .Library.site, which is further reason why an RStudio- (or any other IDE or network installed-) hosted R might exhibit different behavior.
I found what I think is a solution here (thank you Carl Schwarz at SFU) for adding a personal library that is permanently (you don't have to define it each session) recognized whether using R or Rstudio, and Rstudio treats it as the default on my Mac machine. I hadn't seen it laid out this explicitly on SO, so I summarized the steps they provided, for Windows and then for Mac.
If your default package library has been changed after installing a new version of R or by any other means, you can append both the libraries to use all the packages with the help of the commands below.Get the existing library path :
I had the same problem and I run into this. If you want to create another location c("C:/Users/mynewlocation") should be working as well. As mentioned in here "You should be able to right-click on the Rstudio.exe icon, click Properties, and select an option to always run Rstudio as administrator. Be sure you use that same icon whenever you want to open Rstudio."
I read the readme. In that they mentioned use .libPaths() in command line to check which paths are there. I had 2 library paths earlier. When I used the command .libpath("C:/Program Files/R/R-3.2.4revised/library") where I wanted, it changed the library path. When I typed in .libPaths() at the command line again it showed me the correct path. Hope this helps
Since most of the answers here are related to Windows & Mac OS, (and considering that I also struggled with this) I decided to post the process that helped me solve this problem on my Arch Linux setup.
I was looking into this because R was having issues installing into the default location and was instead just putting the packages into the temp folder. It turned out to be the latest update for Mcaffee Endpoint Security which apparently has issues with R. You can disable the threat protection while you install the packages and it will work properly.
I would like to know if it is possible to choose where a .deb file will be installed, or if it is possible to move it after the installation to another directory without troubles for the app.
Use symlinks. Open the *.deb package with the archive manager. This tells you where the files go. Move those directories to your external harddisc and put a symlink at the origin. Be careful to move only directories from your games and not shared libraries or so!
Mount your external hardrive or some of its folders (a second time) at the game's path. E.g. /usr/share/games might be good candidate for your external harddisc. You can use the bind option, e.g.:
As I know extracted files like libraries and executables must be extracted into fixed directories that use these files during program execution. Also I think this debs contains large resources and lightweight files separately. For example many games unpack their resources to /opt directory. You can mount your HDD as /opt that store resources there:
Many users have R installed in a personal workspace, but want to install packages into a common area so that their entire team can use them and preserve version consistency. It is also common to need to install R packages, but users can encounter problems due to lacking administrator permissions on the computer on which they are working. Using the default install.packages command can result in a series of frustrating messages like this:
Finally, you many have noticed that the steps above only last for the current R session. To make the changes permanent, you will need to change the Rprofile file for your instance of R/RStudio. This is a little tricky if you have multiple version of R running. To determine what you are interested in and where to go, do the following:
Open up this file in a standard text editor. It is the startup file used by R to handle global settings and is run every time you launch an instance. To avoid breaking any existing code, I find it best to put custom code at the bottom. Use the code above to ensure the correct libraries are inserted into your environment at startup. For the example above, I used this:
Is there a way to tell the pack installer to install to a different directory? I would think that I would like to install to a more "global" directory so that the entire software tree is visible to multiple users on my team - and not have each person install fundamental files to a unique location on each of their machines. The situation is made worse in that the vendor has placed the RTE_Device.h (and other files) in this location and has instructed me to edit them for certain configurations. I feel like I am missing something fundamental about the pack as I can't see User\Appdata\Local\.... as a useful place to store code that will be edited as part of a development/production process.
When you create a new project, files that you need to modify for you project will likely be copied to the project directory. Best not to modify items in the PACK directory. IF you need to modify something, you should copy it to your project and edit it from there.
However, when I run the Pack Installer, it comes up at the top with: Pack Installer - C:\Users\username\AppData\Local\Arm\Packs - and then, as far as I can find, no option to change this. It does appear that I can "Manage Local Repositories" and set up a development repo to sort of do what I want ... but again, I am mostly surprised that Keil picking my directory is the standard operation.
I expect that it should be easy to have my project software all installed to a standard network location that makes it easy for me to share it with team members and include it in multiple different projects.
And I agree that I shouldn't have to edit anything in there - but that is where my vendor put files (like RTE_Device.h). Is it standard procedure to just copy files you want to edit into the project? And then the compile knows to take them from the local project before the pack? I am guessing that must be in the include directory order specified somewhere?
If it was a fresh install, it asked on the 1st screen where you wanted the tools and where you wanted the packs. This is stored in the TOOLS.INI file. You can always change the path and then copy the packs to where you changed this too.
You are going to want to actually create a new project using your processor of interest (if you have more than 1, just pick one) before you to go far. This will clear some things up for you. Where the PACKS are stored is not an issue.
As to editing RTE_Device.h - could you please expand on why I don't need to edit it? And by edit - I mean use the configuration wizard - because it has to be writable for me to use the configuration wizard - and as far as I can tell, that is certainly required - at least on a board by board basis.
What you should not do is edit the RTE_Device.h file in the PACK directory. Create a new project and place it where you want to (not in the PACK directory). Feel free to run the configuration wizard and change the RTE_Device.h for your project. The reason they install these are read-only is so that people don't accidentally change the files in the PACK directory.
If you are using an example project from the PACK, don't try and edit it in the PACK area. You can copy a whole set of examples to some place that is yours and you can feel free to edit them there. If they are still read-only after copying them you can modify them so they are read-write.. You may use the configuration wizard on these files.
Thanks again - to be clear, I have made new projects as well as copied example projects. I agree that one shouldn't edit the files in the pack. I guess that is why I am so confused about how the pack is distributed and how the pack install directory isn't easily changeable. If I want to have my entire team to share the same codebase - then this pack needs to be placed in an area that isn't isolated on a single machine (neither the Appdata/Local nor the tool install directory C:\Keil_v5). I guess I will change the directory using the TOOLS.INI and have everyone on the team do the same.
3a8082e126